Class: Fog::Storage::AzureRM::Mock
- Inherits:
-
Object
- Object
- Fog::Storage::AzureRM::Mock
- Defined in:
- lib/fog/azurerm/storage.rb,
lib/fog/azurerm/requests/storage/get_blob.rb,
lib/fog/azurerm/requests/storage/copy_blob.rb,
lib/fog/azurerm/requests/storage/list_blobs.rb,
lib/fog/azurerm/requests/storage/copy_object.rb,
lib/fog/azurerm/requests/storage/delete_blob.rb,
lib/fog/azurerm/requests/storage/get_blob_url.rb,
lib/fog/azurerm/requests/storage/get_object_url.rb,
lib/fog/azurerm/requests/storage/put_blob_block.rb,
lib/fog/azurerm/requests/storage/put_blob_pages.rb,
lib/fog/azurerm/requests/storage/put_object_url.rb,
lib/fog/azurerm/requests/storage/save_page_blob.rb,
lib/fog/azurerm/requests/storage/list_containers.rb,
lib/fog/azurerm/requests/storage/create_container.rb,
lib/fog/azurerm/requests/storage/create_page_blob.rb,
lib/fog/azurerm/requests/storage/delete_container.rb,
lib/fog/azurerm/requests/storage/create_block_blob.rb,
lib/fog/azurerm/requests/storage/delete_object_url.rb,
lib/fog/azurerm/requests/storage/get_blob_http_url.rb,
lib/fog/azurerm/requests/storage/get_container_acl.rb,
lib/fog/azurerm/requests/storage/get_container_url.rb,
lib/fog/azurerm/requests/storage/put_blob_metadata.rb,
lib/fog/azurerm/requests/storage/put_container_acl.rb,
lib/fog/azurerm/requests/storage/acquire_blob_lease.rb,
lib/fog/azurerm/requests/storage/commit_blob_blocks.rb,
lib/fog/azurerm/requests/storage/copy_blob_from_uri.rb,
lib/fog/azurerm/requests/storage/get_blob_https_url.rb,
lib/fog/azurerm/requests/storage/put_blob_https_url.rb,
lib/fog/azurerm/requests/storage/release_blob_lease.rb,
lib/fog/azurerm/requests/storage/get_blob_properties.rb,
lib/fog/azurerm/requests/storage/put_blob_properties.rb,
lib/fog/azurerm/requests/storage/delete_blob_https_url.rb,
lib/fog/azurerm/requests/storage/check_container_exists.rb,
lib/fog/azurerm/requests/storage/put_container_metadata.rb,
lib/fog/azurerm/requests/storage/acquire_container_lease.rb,
lib/fog/azurerm/requests/storage/compare_container_blobs.rb,
lib/fog/azurerm/requests/storage/release_container_lease.rb,
lib/fog/azurerm/requests/storage/get_container_properties.rb,
lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb
Overview
This class provides the mock implementation for unit tests.
Instance Method Summary collapse
- #acquire_blob_lease ⇒ Object
- #acquire_container_lease ⇒ Object
- #check_container_exists ⇒ Object
- #commit_blob_blocks ⇒ Object
- #compare_container_blobs ⇒ Object
- #copy_blob ⇒ Object
- #copy_blob_from_uri ⇒ Object
- #copy_object(*args) ⇒ Object
- #create_block_blob(_container_name, _blob_name, body, _options = {}) ⇒ Object
- #create_container ⇒ Object
- #create_page_blob ⇒ Object
- #delete_blob ⇒ Object
- #delete_blob_https_url ⇒ Object
- #delete_container ⇒ Object
- #delete_object_url(*args) ⇒ Object
- #get_blob(_container_name, _blob_name, _options = {}, &_block) ⇒ Object
- #get_blob_http_url ⇒ Object
- #get_blob_https_url ⇒ Object
- #get_blob_properties ⇒ Object
- #get_blob_url(_container_name, _blob_name, options = {}) ⇒ Object
- #get_container_acl ⇒ Object
- #get_container_properties ⇒ Object
- #get_container_url(_container_name, options = {}) ⇒ Object
- #get_object_url(container_name, blob_name, expires) ⇒ Object
-
#initialize(_options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #list_blobs ⇒ Object
- #list_containers ⇒ Object
- #put_blob_block ⇒ Object
- #put_blob_https_url ⇒ Object
- #put_blob_metadata(container_name, name, metadata, _options = {}) ⇒ Object
- #put_blob_pages ⇒ Object
- #put_blob_properties(container_name, name, options = {}) ⇒ Object
- #put_container_acl ⇒ Object
- #put_container_metadata ⇒ Object
- #put_object_url(*args) ⇒ Object
- #release_blob_lease ⇒ Object
- #release_container_lease ⇒ Object
- #save_page_blob ⇒ Object
- #wait_blob_copy_operation_to_finish ⇒ Object
Constructor Details
#initialize(_options = {}) ⇒ Mock
Returns a new instance of Mock.
69 70 71 72 73 74 75 76 77 |
# File 'lib/fog/azurerm/storage.rb', line 69 def initialize( = {}) begin require 'azure/storage/common' require 'azure/storage/blob' rescue LoadError => e retry if require('rubygems') raise e. end end |
Instance Method Details
#acquire_blob_lease ⇒ Object
24 25 26 27 28 |
# File 'lib/fog/azurerm/requests/storage/acquire_blob_lease.rb', line 24 def acquire_blob_lease(*) { 'leaseId' => 'abc123' } end |
#acquire_container_lease ⇒ Object
24 25 26 27 28 |
# File 'lib/fog/azurerm/requests/storage/acquire_container_lease.rb', line 24 def acquire_container_lease(*) { 'leaseId' => 'abc123' } end |
#check_container_exists ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/check_container_exists.rb', line 24 def check_container_exists(*) true end |
#commit_blob_blocks ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/commit_blob_blocks.rb', line 24 def commit_blob_blocks(*) true end |
#compare_container_blobs ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/fog/azurerm/requests/storage/compare_container_blobs.rb', line 37 def compare_container_blobs(*) [ { 'name' => 'test_blob1', 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT', 'etag' => '0x8D3A3B5F017F52D', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A50.3256874Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } }, { 'name' => 'test_blob2', 'metadata' => {}, 'properties' => { 'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT', 'etag' => '0x8D29C92173526C8', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } }, { 'name' => 'test_blob3', 'metadata' => {}, 'properties' => { 'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT', 'etag' => '0x8D29C92173526C8', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } }, { 'name' => 'test_blob4', 'metadata' => {}, 'properties' => { 'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT', 'etag' => '0x8D29C92173526C8', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } } ] end |
#copy_blob ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/copy_blob.rb', line 24 def copy_blob(*) %w(abc123 pending) end |
#copy_blob_from_uri ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/copy_blob_from_uri.rb', line 24 def copy_blob_from_uri(*) %w(abc123 pending) end |
#copy_object(*args) ⇒ Object
14 15 16 |
# File 'lib/fog/azurerm/requests/storage/copy_object.rb', line 14 def copy_object(*args) copy_blob(*args) end |
#create_block_blob(_container_name, _blob_name, body, _options = {}) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/fog/azurerm/requests/storage/create_block_blob.rb', line 19 def create_block_blob(_container_name, _blob_name, body, = {}) Fog::Logger.debug 'Blob created successfully.' if body.nil? { 'name' => 'test_blob', 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT', 'etag' => '0x8D3A3B5F017F52D', 'lease_status' => nil, 'lease_state' => nil, 'content_length' => 0, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => nil, 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'BlockBlob', 'copy_id' => nil, 'copy_status' => nil, 'copy_source' => nil, 'copy_progress' => nil, 'copy_completion_time' => nil, 'copy_status_description' => nil, 'accept_ranges' => 0 } } else { 'name' => 'test_blob', 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT', 'etag' => '0x8D3A3B5F017F52D', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'BlockBlob', 'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A50.3256874Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } } end end |
#create_container ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/fog/azurerm/requests/storage/create_container.rb', line 24 def create_container(*) { 'name' => 'test_container', 'public_access_level' => nil, 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT', 'etag' => '0x8D3A3B5F017F52D', 'lease_status' => 'unlocked', 'lease_state' => 'available' } } end |
#create_page_blob ⇒ Object
24 25 26 27 |
# File 'lib/fog/azurerm/requests/storage/create_page_blob.rb', line 24 def create_page_blob(*) Fog::Logger.debug 'Page blob created successfully.' true end |
#delete_blob ⇒ Object
25 26 27 28 |
# File 'lib/fog/azurerm/requests/storage/delete_blob.rb', line 25 def delete_blob(*) Fog::Logger.debug 'Blob deleted successfully.' true end |
#delete_blob_https_url ⇒ Object
33 34 35 |
# File 'lib/fog/azurerm/requests/storage/delete_blob_https_url.rb', line 33 def delete_blob_https_url(*) 'https://sa.blob.core.windows.net/test_container/test_blob?token' end |
#delete_container ⇒ Object
25 26 27 |
# File 'lib/fog/azurerm/requests/storage/delete_container.rb', line 25 def delete_container(*) true end |
#delete_object_url(*args) ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/delete_object_url.rb', line 24 def delete_object_url(*args) delete_blob_https_url(*args) end |
#get_blob(_container_name, _blob_name, _options = {}, &_block) ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/fog/azurerm/requests/storage/get_blob.rb', line 87 def get_blob(_container_name, _blob_name, = {}, &_block) Fog::Logger.debug 'get_blob successfully.' unless block_given? return [ { 'name' => 'test_blob', 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 09:30:31 GMT', 'etag' => '0x8D3A3EDD7C2B777', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'lease_duration' => nil, 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/testblob/4m?snapshot=2016-02-04T08%3A35%3A50.3157696Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } }, 'content' ] end data = StringIO.new('content') remaining = total_bytes = data.length while remaining > 0 chunk = data.read([remaining, 2].min) Proc.new.call(chunk, remaining, total_bytes) remaining -= 2 end [ { 'name' => 'test_blob', 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 09:30:31 GMT', 'etag' => '0x8D3A3EDD7C2B777', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'lease_duration' => nil, 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/testblob/4m?snapshot=2016-02-04T08%3A35%3A50.3157696Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } }, '' ] end |
#get_blob_http_url ⇒ Object
33 34 35 |
# File 'lib/fog/azurerm/requests/storage/get_blob_http_url.rb', line 33 def get_blob_http_url(*) 'http://sa.blob.core.windows.net/test_container/test_blob?token' end |
#get_blob_https_url ⇒ Object
33 34 35 |
# File 'lib/fog/azurerm/requests/storage/get_blob_https_url.rb', line 33 def get_blob_https_url(*) 'https://sa.blob.core.windows.net/test_container/test_blob?token' end |
#get_blob_properties ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/fog/azurerm/requests/storage/get_blob_properties.rb', line 23 def get_blob_properties(*) blob = Azure::Storage::Blob::Blob.new blob.name = 'test_blob' blob. = {} blob.properties = { last_modified: 'Mon, 04 Jul 2016 09:30:31 GMT', etag: '0x8D3A3EDD7C2B777', lease_status: 'unlocked', lease_state: 'available', lease_duration: nil, content_length: 4_194_304, content_type: 'application/octet-stream', content_encoding: nil, content_language: nil, content_disposition: nil, content_md5: 'tXAohIyxuu/t94Lp/ujeRw==', cache_control: nil, sequence_number: 0, blob_type: 'PageBlob', copy_id: '095adc3b-e277-4c3d-97e0-0abca881f60c', copy_status: 'success', copy_source: 'https://testaccount.blob.core.windows.net/testblob/4m?snapshot=2016-02-04T08%3A35%3A50.3157696Z', copy_progress: '4194304/4194304', copy_completion_time: 'Thu, 04 Feb 2016 08:35:52 GMT', copy_status_description: nil, accept_ranges: 0 } blob end |
#get_blob_url(_container_name, _blob_name, options = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/fog/azurerm/requests/storage/get_blob_url.rb', line 20 def get_blob_url(_container_name, _blob_name, = {}) url = 'https://sa.blob.core.windows.net/test_container/test_blob' url.gsub!('https:', 'http:') if [:scheme] == 'http' url end |
#get_container_acl ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/get_container_acl.rb', line 24 def get_container_acl(*) ['container', {}] end |
#get_container_properties ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/fog/azurerm/requests/storage/get_container_properties.rb', line 25 def get_container_properties(*) { 'name' => 'test_container', 'public_access_level' => nil, 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT', 'etag' => '0x8D3A3B5F017F52D', 'lease_status' => 'unlocked', 'lease_state' => 'available' } } end |
#get_container_url(_container_name, options = {}) ⇒ Object
26 27 28 29 30 |
# File 'lib/fog/azurerm/requests/storage/get_container_url.rb', line 26 def get_container_url(_container_name, = {}) url = 'https://sa.blob.core.windows.net/test_container?comp=list&restype=container' url.gsub!('https:', 'http:') if [:scheme] == 'http' url end |
#get_object_url(container_name, blob_name, expires) ⇒ Object
15 16 17 |
# File 'lib/fog/azurerm/requests/storage/get_object_url.rb', line 15 def get_object_url(container_name, blob_name, expires) get_blob_https_url(container_name, blob_name, expires) end |
#list_blobs ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/fog/azurerm/requests/storage/list_blobs.rb', line 53 def list_blobs(*) Fog::Logger.debug 'Listing blobs in container successfully.' { next_marker: 'marker', blobs: [ { 'name' => 'test_blob1', 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT', 'etag' => '0x8D3A3B5F017F52D', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A50.3256874Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } }, { 'name' => 'test_blob2', 'metadata' => {}, 'properties' => { 'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT', 'etag' => '0x8D29C92173526C8', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } }, { 'name' => 'test_blob3', 'metadata' => {}, 'properties' => { 'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT', 'etag' => '0x8D29C92173526C8', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } }, { 'name' => 'test_blob4', 'metadata' => {}, 'properties' => { 'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT', 'etag' => '0x8D29C92173526C8', 'lease_status' => 'unlocked', 'lease_state' => 'available', 'content_length' => 4_194_304, 'content_type' => 'application/octet-stream', 'content_encoding' => nil, 'content_language' => nil, 'content_disposition' => nil, 'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==', 'cache_control' => nil, 'sequence_number' => 0, 'blob_type' => 'PageBlob', 'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c', 'copy_status' => 'success', 'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z', 'copy_progress' => '4194304/4194304', 'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT', 'copy_status_description' => nil, 'accept_ranges' => 0 } } ] } end |
#list_containers ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/fog/azurerm/requests/storage/list_containers.rb', line 36 def list_containers [ { 'name' => 'test_container1', 'metadata' => {}, 'properties' => { 'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT', 'etag' => '0x8D3A3B5F017F52D', 'lease_status' => 'unlocked', 'lease_state' => 'available' } }, { 'name' => 'test_container2', 'metadata' => {}, 'properties' => { 'last_modified' => 'Tue, 04 Aug 2015 06:01:08 GMT', 'etag' => '0x8D29C92176C8352', 'lease_status' => 'unlocked', 'lease_state' => 'available' } }, { 'name' => 'test_container3', 'metadata' => {}, 'properties' => { 'last_modified' => 'Tue, 01 Sep 2015 05:15:36 GMT', 'etag' => '0x8D2B28C5EB36458', 'lease_status' => 'unlocked', 'lease_state' => 'available' } } ] end |
#put_blob_block ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/put_blob_block.rb', line 24 def put_blob_block(*) true end |
#put_blob_https_url ⇒ Object
33 34 35 |
# File 'lib/fog/azurerm/requests/storage/put_blob_https_url.rb', line 33 def put_blob_https_url(*) 'https://sa.blob.core.windows.net/test_container/test_blob?token' end |
#put_blob_metadata(container_name, name, metadata, _options = {}) ⇒ Object
24 25 26 27 |
# File 'lib/fog/azurerm/requests/storage/put_blob_metadata.rb', line 24 def (container_name, name, , = {}) Fog::Logger.debug "Set Blob #{name} metadata #{} in a container #{container_name} successfully." true end |
#put_blob_pages ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/put_blob_pages.rb', line 24 def put_blob_pages(*) true end |
#put_blob_properties(container_name, name, options = {}) ⇒ Object
24 25 26 27 |
# File 'lib/fog/azurerm/requests/storage/put_blob_properties.rb', line 24 def put_blob_properties(container_name, name, = {}) Fog::Logger.debug "Set Blob #{name} properties #{} in a container #{container_name} successfully." true end |
#put_container_acl ⇒ Object
24 25 26 27 |
# File 'lib/fog/azurerm/requests/storage/put_container_acl.rb', line 24 def put_container_acl(*) Fog::Logger.debug 'Set Container testcontainer1 acl successfully.' true end |
#put_container_metadata ⇒ Object
24 25 26 27 |
# File 'lib/fog/azurerm/requests/storage/put_container_metadata.rb', line 24 def (*) Fog::Logger.debug 'Set Container testcontainer1 metadata successfully.' true end |
#put_object_url(*args) ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/put_object_url.rb', line 24 def put_object_url(*args) put_blob_https_url(*args) end |
#release_blob_lease ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/release_blob_lease.rb', line 24 def release_blob_lease(*) true end |
#release_container_lease ⇒ Object
24 25 26 |
# File 'lib/fog/azurerm/requests/storage/release_container_lease.rb', line 24 def release_container_lease(*) true end |
#save_page_blob ⇒ Object
105 106 107 |
# File 'lib/fog/azurerm/requests/storage/save_page_blob.rb', line 105 def save_page_blob(*) true end |
#wait_blob_copy_operation_to_finish ⇒ Object
50 51 52 |
# File 'lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb', line 50 def wait_blob_copy_operation_to_finish(*) true end |