gitlab-fog-azure-rm 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.arclint +8 -0
- data/.codeclimate.yml +17 -0
- data/.gitignore +6 -0
- data/.gitlab-ci.yml +17 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +274 -0
- data/.travis.yml +49 -0
- data/CHANGELOG.md +414 -0
- data/CONTRIBUTING.md +40 -0
- data/CONTRIBUTORS.md +12 -0
- data/Gemfile +3 -0
- data/LICENSE.md +20 -0
- data/README.md +100 -0
- data/gitlab-fog-azure-rm.gemspec +31 -0
- data/lib/fog/azurerm.rb +30 -0
- data/lib/fog/azurerm/async_response.rb +44 -0
- data/lib/fog/azurerm/config.rb +1 -0
- data/lib/fog/azurerm/constants.rb +72 -0
- data/lib/fog/azurerm/credentials.rb +40 -0
- data/lib/fog/azurerm/custom_fog_errors.rb +52 -0
- data/lib/fog/azurerm/docs/storage.md +398 -0
- data/lib/fog/azurerm/docs/structure.md +53 -0
- data/lib/fog/azurerm/models/resources/azure_resource.rb +25 -0
- data/lib/fog/azurerm/models/resources/azure_resources.rb +40 -0
- data/lib/fog/azurerm/models/resources/dependency.rb +27 -0
- data/lib/fog/azurerm/models/resources/deployment.rb +65 -0
- data/lib/fog/azurerm/models/resources/deployments.rb +30 -0
- data/lib/fog/azurerm/models/resources/provider.rb +27 -0
- data/lib/fog/azurerm/models/resources/provider_resource_type.rb +22 -0
- data/lib/fog/azurerm/models/resources/resource_group.rb +34 -0
- data/lib/fog/azurerm/models/resources/resource_groups.rb +29 -0
- data/lib/fog/azurerm/models/storage/directories.rb +75 -0
- data/lib/fog/azurerm/models/storage/directory.rb +151 -0
- data/lib/fog/azurerm/models/storage/file.rb +265 -0
- data/lib/fog/azurerm/models/storage/files.rb +183 -0
- data/lib/fog/azurerm/models/storage/kind.rb +12 -0
- data/lib/fog/azurerm/models/storage/sku_name.rb +15 -0
- data/lib/fog/azurerm/models/storage/sku_tier.rb +12 -0
- data/lib/fog/azurerm/models/storage/storage_account.rb +92 -0
- data/lib/fog/azurerm/models/storage/storage_accounts.rb +47 -0
- data/lib/fog/azurerm/requests/storage/acquire_blob_lease.rb +32 -0
- data/lib/fog/azurerm/requests/storage/acquire_container_lease.rb +32 -0
- data/lib/fog/azurerm/requests/storage/check_container_exists.rb +30 -0
- data/lib/fog/azurerm/requests/storage/commit_blob_blocks.rb +30 -0
- data/lib/fog/azurerm/requests/storage/compare_container_blobs.rb +148 -0
- data/lib/fog/azurerm/requests/storage/copy_blob.rb +30 -0
- data/lib/fog/azurerm/requests/storage/copy_blob_from_uri.rb +30 -0
- data/lib/fog/azurerm/requests/storage/copy_object.rb +20 -0
- data/lib/fog/azurerm/requests/storage/create_block_blob.rb +108 -0
- data/lib/fog/azurerm/requests/storage/create_container.rb +40 -0
- data/lib/fog/azurerm/requests/storage/create_disk.rb +62 -0
- data/lib/fog/azurerm/requests/storage/create_page_blob.rb +31 -0
- data/lib/fog/azurerm/requests/storage/delete_blob.rb +32 -0
- data/lib/fog/azurerm/requests/storage/delete_blob_https_url.rb +39 -0
- data/lib/fog/azurerm/requests/storage/delete_container.rb +31 -0
- data/lib/fog/azurerm/requests/storage/delete_disk.rb +36 -0
- data/lib/fog/azurerm/requests/storage/delete_object_url.rb +30 -0
- data/lib/fog/azurerm/requests/storage/get_blob.rb +163 -0
- data/lib/fog/azurerm/requests/storage/get_blob_http_url.rb +39 -0
- data/lib/fog/azurerm/requests/storage/get_blob_https_url.rb +39 -0
- data/lib/fog/azurerm/requests/storage/get_blob_properties.rb +55 -0
- data/lib/fog/azurerm/requests/storage/get_blob_url.rb +28 -0
- data/lib/fog/azurerm/requests/storage/get_container_acl.rb +30 -0
- data/lib/fog/azurerm/requests/storage/get_container_properties.rb +41 -0
- data/lib/fog/azurerm/requests/storage/get_container_url.rb +34 -0
- data/lib/fog/azurerm/requests/storage/get_object_url.rb +21 -0
- data/lib/fog/azurerm/requests/storage/list_blobs.rb +168 -0
- data/lib/fog/azurerm/requests/storage/list_containers.rb +73 -0
- data/lib/fog/azurerm/requests/storage/multipart_save_block_blob.rb +110 -0
- data/lib/fog/azurerm/requests/storage/put_blob_block.rb +30 -0
- data/lib/fog/azurerm/requests/storage/put_blob_https_url.rb +39 -0
- data/lib/fog/azurerm/requests/storage/put_blob_metadata.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_blob_pages.rb +30 -0
- data/lib/fog/azurerm/requests/storage/put_blob_properties.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_container_acl.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_container_metadata.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_object_url.rb +30 -0
- data/lib/fog/azurerm/requests/storage/release_blob_lease.rb +30 -0
- data/lib/fog/azurerm/requests/storage/release_container_lease.rb +30 -0
- data/lib/fog/azurerm/requests/storage/save_page_blob.rb +111 -0
- data/lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb +56 -0
- data/lib/fog/azurerm/storage.rb +126 -0
- data/lib/fog/azurerm/utilities/general.rb +186 -0
- data/lib/fog/azurerm/utilities/logger_messages.yml +19 -0
- data/lib/fog/azurerm/version.rb +5 -0
- data/rake-script.sh +10 -0
- data/rakefile +29 -0
- data/test/api_stub.rb +147 -0
- data/test/api_stub/models/storage/directory.rb +178 -0
- data/test/api_stub/models/storage/file.rb +181 -0
- data/test/api_stub/requests/storage/directory.rb +89 -0
- data/test/api_stub/requests/storage/file.rb +252 -0
- data/test/integration/README.md +14 -0
- data/test/integration/blob.rb +297 -0
- data/test/integration/container.rb +160 -0
- data/test/integration/credentials/azure.yml +5 -0
- data/test/integration/storage_account.rb +135 -0
- data/test/models/storage/test_directories.rb +74 -0
- data/test/models/storage/test_directory.rb +178 -0
- data/test/models/storage/test_file.rb +294 -0
- data/test/models/storage/test_files.rb +234 -0
- data/test/requests/storage/test_acquire_blob_lease.rb +36 -0
- data/test/requests/storage/test_acquire_container_lease.rb +36 -0
- data/test/requests/storage/test_check_container_exists.rb +18 -0
- data/test/requests/storage/test_commit_blob_blocks.rb +34 -0
- data/test/requests/storage/test_compare_container_blobs.rb +36 -0
- data/test/requests/storage/test_copy_blob.rb +39 -0
- data/test/requests/storage/test_copy_blob_from_uri.rb +36 -0
- data/test/requests/storage/test_create_block_blob.rb +80 -0
- data/test/requests/storage/test_create_container.rb +36 -0
- data/test/requests/storage/test_create_disk.rb +70 -0
- data/test/requests/storage/test_create_page_blob.rb +34 -0
- data/test/requests/storage/test_delete_blob.rb +42 -0
- data/test/requests/storage/test_delete_blob_https_url.rb +32 -0
- data/test/requests/storage/test_delete_container.rb +42 -0
- data/test/requests/storage/test_delete_disk.rb +30 -0
- data/test/requests/storage/test_get_blob.rb +141 -0
- data/test/requests/storage/test_get_blob_http_url.rb +30 -0
- data/test/requests/storage/test_get_blob_https_url.rb +32 -0
- data/test/requests/storage/test_get_blob_properties.rb +47 -0
- data/test/requests/storage/test_get_blob_url.rb +75 -0
- data/test/requests/storage/test_get_container_acl.rb +37 -0
- data/test/requests/storage/test_get_container_properties.rb +45 -0
- data/test/requests/storage/test_get_container_url.rb +33 -0
- data/test/requests/storage/test_list_blobs.rb +77 -0
- data/test/requests/storage/test_list_containers.rb +54 -0
- data/test/requests/storage/test_multipart_save_block_blob.rb +105 -0
- data/test/requests/storage/test_put_blob_block.rb +34 -0
- data/test/requests/storage/test_put_blob_https_url.rb +32 -0
- data/test/requests/storage/test_put_blob_metadata.rb +36 -0
- data/test/requests/storage/test_put_blob_pages.rb +34 -0
- data/test/requests/storage/test_put_blob_properties.rb +39 -0
- data/test/requests/storage/test_put_container_acl.rb +34 -0
- data/test/requests/storage/test_put_container_metadata.rb +36 -0
- data/test/requests/storage/test_release_blob_lease.rb +34 -0
- data/test/requests/storage/test_release_container_lease.rb +34 -0
- data/test/requests/storage/test_save_page_blob.rb +115 -0
- data/test/requests/storage/test_wait_blob_copy_operation_to_finish.rb +148 -0
- data/test/smoke_tests/compute/test_resource_group_smoke.rb +37 -0
- data/test/test_credentials.rb +63 -0
- data/test/test_helper.rb +846 -0
- metadata +352 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
module Fog
|
2
|
+
module ARM
|
3
|
+
module Storage
|
4
|
+
module Models
|
5
|
+
module SkuName
|
6
|
+
StandardLRS = 'Standard_LRS'.freeze
|
7
|
+
StandardGRS = 'Standard_GRS'.freeze
|
8
|
+
StandardRAGRS = 'Standard_RAGRS'.freeze
|
9
|
+
StandardZRS = 'Standard_ZRS'.freeze
|
10
|
+
PremiumLRS = 'Premium_LRS'.freeze
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
module Fog
|
2
|
+
module Storage
|
3
|
+
class AzureRM
|
4
|
+
# This class is giving implementation of create/save and
|
5
|
+
# delete/destroy for storage account.
|
6
|
+
class StorageAccount < Fog::Model
|
7
|
+
identity :name
|
8
|
+
attribute :id
|
9
|
+
attribute :location
|
10
|
+
attribute :resource_group
|
11
|
+
attribute :sku_name
|
12
|
+
attribute :replication
|
13
|
+
attribute :encryption
|
14
|
+
attribute :tags
|
15
|
+
|
16
|
+
def self.parse(storage_account)
|
17
|
+
hash = {}
|
18
|
+
hash['id'] = storage_account.id
|
19
|
+
hash['name'] = storage_account.name
|
20
|
+
hash['location'] = storage_account.location
|
21
|
+
hash['resource_group'] = get_resource_group_from_id(storage_account.id)
|
22
|
+
hash['sku_name'] = storage_account.sku.name.split('_').first
|
23
|
+
hash['replication'] = storage_account.sku.name.split('_').last
|
24
|
+
hash['encryption'] = storage_account.encryption.services.blob.enabled unless storage_account.encryption.nil?
|
25
|
+
hash['tags'] = storage_account.tags
|
26
|
+
hash
|
27
|
+
end
|
28
|
+
|
29
|
+
def save
|
30
|
+
requires :name
|
31
|
+
requires :location
|
32
|
+
requires :resource_group
|
33
|
+
# Create a model for new storage account.
|
34
|
+
self.sku_name = STANDARD_STORAGE if sku_name.nil?
|
35
|
+
self.replication = ALLOWED_STANDARD_REPLICATION.first if replication.nil?
|
36
|
+
validate_sku_name!
|
37
|
+
storage_account = service.create_storage_account(storage_account_params)
|
38
|
+
merge_attributes(Fog::Storage::AzureRM::StorageAccount.parse(storage_account))
|
39
|
+
end
|
40
|
+
|
41
|
+
def storage_account_params
|
42
|
+
{
|
43
|
+
resource_group: resource_group,
|
44
|
+
name: name,
|
45
|
+
sku_name: sku_name,
|
46
|
+
location: location,
|
47
|
+
replication: replication,
|
48
|
+
encryption: encryption,
|
49
|
+
tags: tags
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
def update(storage_account_params)
|
54
|
+
validate_input(storage_account_params)
|
55
|
+
storage_account_params = merge_attributes(storage_account_params).all_attributes
|
56
|
+
|
57
|
+
storage_account = service.update_storage_account(storage_account_params)
|
58
|
+
merge_attributes(Fog::Storage::AzureRM::StorageAccount.parse(storage_account))
|
59
|
+
end
|
60
|
+
|
61
|
+
def validate_sku_name!
|
62
|
+
case sku_name
|
63
|
+
when STANDARD_STORAGE
|
64
|
+
raise 'Standard Replications can only be LRS, ZRS, GRS or RAGRS.' unless ALLOWED_STANDARD_REPLICATION.include?(replication)
|
65
|
+
when PREMIUM_STORAGE
|
66
|
+
raise 'Premium Replication can only be LRS.' if replication != 'LRS'
|
67
|
+
else
|
68
|
+
raise 'Account Type can only be Standard or Premium'
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def get_access_keys(options = {})
|
73
|
+
service.get_storage_access_keys(resource_group, name, options)
|
74
|
+
end
|
75
|
+
|
76
|
+
def destroy
|
77
|
+
service.delete_storage_account(resource_group, name)
|
78
|
+
end
|
79
|
+
|
80
|
+
private
|
81
|
+
|
82
|
+
def validate_input(attr_hash)
|
83
|
+
invalid_attr = [:resource_group, :name, :location, :id]
|
84
|
+
result = invalid_attr & attr_hash.keys
|
85
|
+
raise 'Cannot modify the given attribute' unless result.empty?
|
86
|
+
end
|
87
|
+
|
88
|
+
private :storage_account_params, :validate_sku_name!
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Fog
|
2
|
+
module Storage
|
3
|
+
class AzureRM
|
4
|
+
# This class is giving implementation of all/list, get and
|
5
|
+
# check name availability for storage account.
|
6
|
+
class StorageAccounts < Fog::Collection
|
7
|
+
model Fog::Storage::AzureRM::StorageAccount
|
8
|
+
attribute :resource_group
|
9
|
+
|
10
|
+
def all
|
11
|
+
accounts = []
|
12
|
+
if !resource_group.nil?
|
13
|
+
requires :resource_group
|
14
|
+
hash_of_storage_accounts = service.list_storage_account_for_rg(resource_group)
|
15
|
+
else
|
16
|
+
hash_of_storage_accounts = service.list_storage_accounts
|
17
|
+
end
|
18
|
+
hash_of_storage_accounts.each do |account|
|
19
|
+
accounts << Fog::Storage::AzureRM::StorageAccount.parse(account)
|
20
|
+
end
|
21
|
+
load(accounts)
|
22
|
+
end
|
23
|
+
|
24
|
+
def get(resource_group_name, storage_account_name)
|
25
|
+
storage_account = service.get_storage_account(resource_group_name, storage_account_name)
|
26
|
+
storage_account_fog = Fog::Storage::AzureRM::StorageAccount.new(service: service)
|
27
|
+
storage_account_fog.merge_attributes(Fog::Storage::AzureRM::StorageAccount.parse(storage_account))
|
28
|
+
end
|
29
|
+
|
30
|
+
def check_name_availability(name, type = 'Microsoft.Storage/storageAccounts')
|
31
|
+
service.check_storage_account_name_availability(name, type)
|
32
|
+
end
|
33
|
+
|
34
|
+
def delete_storage_account_from_tag(resource_group_name, tag_key, tag_value)
|
35
|
+
storage_accounts = service.storage_accounts(resource_group: resource_group_name)
|
36
|
+
storage_accounts.each do |account|
|
37
|
+
account.destroy if account.tags[tag_key].eql? tag_value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def check_storage_account_exists(resource_group_name, storage_account_name)
|
42
|
+
service.check_storage_account_exists(resource_group_name, storage_account_name)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fog
|
2
|
+
module Storage
|
3
|
+
class AzureRM
|
4
|
+
# This class provides the actual implementation for service calls.
|
5
|
+
class Real
|
6
|
+
def acquire_blob_lease(container_name, name, options = {})
|
7
|
+
options[:request_id] = SecureRandom.uuid
|
8
|
+
msg = "Leasing blob: #{name} of container #{container_name} options: #{options}"
|
9
|
+
Fog::Logger.debug msg
|
10
|
+
|
11
|
+
begin
|
12
|
+
lease_id = @blob_client.acquire_blob_lease(container_name, name, options)
|
13
|
+
rescue Azure::Core::Http::HTTPError => ex
|
14
|
+
raise_azure_exception(ex, msg)
|
15
|
+
end
|
16
|
+
|
17
|
+
Fog::Logger.debug "Blob #{name} leased successfully."
|
18
|
+
lease_id
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# This class provides the mock implementation for unit tests.
|
23
|
+
class Mock
|
24
|
+
def acquire_blob_lease(*)
|
25
|
+
{
|
26
|
+
'leaseId' => 'abc123'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fog
|
2
|
+
module Storage
|
3
|
+
class AzureRM
|
4
|
+
# This class provides the actual implementation for service calls.
|
5
|
+
class Real
|
6
|
+
def acquire_container_lease(name, options = {})
|
7
|
+
options[:request_id] = SecureRandom.uuid
|
8
|
+
msg = "Leasing container: #{name} options: #{options}"
|
9
|
+
Fog::Logger.debug msg
|
10
|
+
|
11
|
+
begin
|
12
|
+
lease_id = @blob_client.acquire_container_lease(name, options)
|
13
|
+
rescue Azure::Core::Http::HTTPError => ex
|
14
|
+
raise_azure_exception(ex, msg)
|
15
|
+
end
|
16
|
+
|
17
|
+
Fog::Logger.debug "Container #{name} leased successfully."
|
18
|
+
lease_id
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# This class provides the mock implementation for unit tests.
|
23
|
+
class Mock
|
24
|
+
def acquire_container_lease(*)
|
25
|
+
{
|
26
|
+
'leaseId' => 'abc123'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Storage
|
3
|
+
class AzureRM
|
4
|
+
# This class provides the actual implementation for service calls.
|
5
|
+
class Real
|
6
|
+
def check_container_exists(name)
|
7
|
+
msg = "Checking container #{name}."
|
8
|
+
Fog::Logger.debug msg
|
9
|
+
begin
|
10
|
+
get_container_properties(name)
|
11
|
+
Fog::Logger.debug "Container #{name} exists."
|
12
|
+
true
|
13
|
+
rescue Exception => e
|
14
|
+
if e.message.include? 'NotFound'
|
15
|
+
Fog::Logger.debug "The specified container #{name} does not exist."
|
16
|
+
false
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# This class provides the mock implementation for unit tests.
|
23
|
+
class Mock
|
24
|
+
def check_container_exists(*)
|
25
|
+
true
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Storage
|
3
|
+
class AzureRM
|
4
|
+
# This class provides the actual implementation for service calls.
|
5
|
+
class Real
|
6
|
+
def commit_blob_blocks(container_name, blob_name, blocks, options = {})
|
7
|
+
options[:request_id] = SecureRandom.uuid
|
8
|
+
msg = "commit_blob_blocks: Complete uploading #{blob_name} to the container #{container_name}. options: #{options}"
|
9
|
+
Fog::Logger.debug msg
|
10
|
+
|
11
|
+
begin
|
12
|
+
@blob_client.commit_blob_blocks(container_name, blob_name, blocks, options)
|
13
|
+
rescue Azure::Core::Http::HTTPError => ex
|
14
|
+
raise_azure_exception(ex, msg)
|
15
|
+
end
|
16
|
+
|
17
|
+
Fog::Logger.debug "Block blob #{blob_name} is uploaded successfully."
|
18
|
+
true
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# This class provides the mock implementation for unit tests.
|
23
|
+
class Mock
|
24
|
+
def commit_blob_blocks(*)
|
25
|
+
true
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
module Fog
|
2
|
+
module Storage
|
3
|
+
class AzureRM
|
4
|
+
# This class provides the actual implementation for service calls.
|
5
|
+
class Real
|
6
|
+
def compare_container_blobs(container1, container2)
|
7
|
+
msg = "Comparing blobs from container #{container1} to container #{container2}"
|
8
|
+
Fog::Logger.debug msg
|
9
|
+
begin
|
10
|
+
identical_blobs = get_identical_blobs_from_containers(container1, container2)
|
11
|
+
rescue Azure::Core::Http::HTTPError => ex
|
12
|
+
raise_azure_exception(ex, msg)
|
13
|
+
end
|
14
|
+
identical_blobs
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def get_identical_blobs_from_containers(container1, container2)
|
20
|
+
container1_blobs = list_blobs(container1)
|
21
|
+
container2_blobs = list_blobs(container2)
|
22
|
+
|
23
|
+
identical_blobs = []
|
24
|
+
container1_blobs[:blobs].each do |container1_blob|
|
25
|
+
container2_blobs[:blobs].each do |container2_blob|
|
26
|
+
if container1_blob.name == container2_blob.name && container1_blob.properties[:content_md5] == container2_blob.properties[:content_md5]
|
27
|
+
identical_blobs.push(container1_blob)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
identical_blobs
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# This class provides the mock implementation for unit tests.
|
36
|
+
class Mock
|
37
|
+
def compare_container_blobs(*)
|
38
|
+
[
|
39
|
+
{
|
40
|
+
'name' => 'test_blob1',
|
41
|
+
'metadata' => {},
|
42
|
+
'properties' => {
|
43
|
+
'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT',
|
44
|
+
'etag' => '0x8D3A3B5F017F52D',
|
45
|
+
'lease_status' => 'unlocked',
|
46
|
+
'lease_state' => 'available',
|
47
|
+
'content_length' => 4_194_304,
|
48
|
+
'content_type' => 'application/octet-stream',
|
49
|
+
'content_encoding' => nil,
|
50
|
+
'content_language' => nil,
|
51
|
+
'content_disposition' => nil,
|
52
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
53
|
+
'cache_control' => nil,
|
54
|
+
'sequence_number' => 0,
|
55
|
+
'blob_type' => 'PageBlob',
|
56
|
+
'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c',
|
57
|
+
'copy_status' => 'success',
|
58
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A50.3256874Z',
|
59
|
+
'copy_progress' => '4194304/4194304',
|
60
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT',
|
61
|
+
'copy_status_description' => nil,
|
62
|
+
'accept_ranges' => 0
|
63
|
+
}
|
64
|
+
},
|
65
|
+
{
|
66
|
+
'name' => 'test_blob2',
|
67
|
+
'metadata' => {},
|
68
|
+
'properties' => {
|
69
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
70
|
+
'etag' => '0x8D29C92173526C8',
|
71
|
+
'lease_status' => 'unlocked',
|
72
|
+
'lease_state' => 'available',
|
73
|
+
'content_length' => 4_194_304,
|
74
|
+
'content_type' => 'application/octet-stream',
|
75
|
+
'content_encoding' => nil,
|
76
|
+
'content_language' => nil,
|
77
|
+
'content_disposition' => nil,
|
78
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
79
|
+
'cache_control' => nil,
|
80
|
+
'sequence_number' => 0,
|
81
|
+
'blob_type' => 'PageBlob',
|
82
|
+
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
83
|
+
'copy_status' => 'success',
|
84
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
85
|
+
'copy_progress' => '4194304/4194304',
|
86
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
87
|
+
'copy_status_description' => nil,
|
88
|
+
'accept_ranges' => 0
|
89
|
+
}
|
90
|
+
},
|
91
|
+
{
|
92
|
+
'name' => 'test_blob3',
|
93
|
+
'metadata' => {},
|
94
|
+
'properties' => {
|
95
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
96
|
+
'etag' => '0x8D29C92173526C8',
|
97
|
+
'lease_status' => 'unlocked',
|
98
|
+
'lease_state' => 'available',
|
99
|
+
'content_length' => 4_194_304,
|
100
|
+
'content_type' => 'application/octet-stream',
|
101
|
+
'content_encoding' => nil,
|
102
|
+
'content_language' => nil,
|
103
|
+
'content_disposition' => nil,
|
104
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
105
|
+
'cache_control' => nil,
|
106
|
+
'sequence_number' => 0,
|
107
|
+
'blob_type' => 'PageBlob',
|
108
|
+
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
109
|
+
'copy_status' => 'success',
|
110
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
111
|
+
'copy_progress' => '4194304/4194304',
|
112
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
113
|
+
'copy_status_description' => nil,
|
114
|
+
'accept_ranges' => 0
|
115
|
+
}
|
116
|
+
},
|
117
|
+
{
|
118
|
+
'name' => 'test_blob4',
|
119
|
+
'metadata' => {},
|
120
|
+
'properties' => {
|
121
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
122
|
+
'etag' => '0x8D29C92173526C8',
|
123
|
+
'lease_status' => 'unlocked',
|
124
|
+
'lease_state' => 'available',
|
125
|
+
'content_length' => 4_194_304,
|
126
|
+
'content_type' => 'application/octet-stream',
|
127
|
+
'content_encoding' => nil,
|
128
|
+
'content_language' => nil,
|
129
|
+
'content_disposition' => nil,
|
130
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
131
|
+
'cache_control' => nil,
|
132
|
+
'sequence_number' => 0,
|
133
|
+
'blob_type' => 'PageBlob',
|
134
|
+
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
135
|
+
'copy_status' => 'success',
|
136
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
137
|
+
'copy_progress' => '4194304/4194304',
|
138
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
139
|
+
'copy_status_description' => nil,
|
140
|
+
'accept_ranges' => 0
|
141
|
+
}
|
142
|
+
}
|
143
|
+
]
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|