fog-azure-rm 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +2 -1
- data/fog-azure-rm.gemspec +11 -9
- data/lib/fog/azurerm.rb +1 -0
- data/lib/fog/azurerm/compute.rb +3 -3
- data/lib/fog/azurerm/config.rb +33 -0
- data/lib/fog/azurerm/credentials.rb +1 -1
- data/lib/fog/azurerm/dns.rb +2 -2
- data/lib/fog/azurerm/docs/storage.md +120 -66
- data/lib/fog/azurerm/models/application_gateway/gateway.rb +30 -31
- data/lib/fog/azurerm/models/application_gateway/gateways.rb +4 -4
- data/lib/fog/azurerm/models/compute/availability_sets.rb +4 -4
- data/lib/fog/azurerm/models/compute/server.rb +14 -14
- data/lib/fog/azurerm/models/compute/servers.rb +4 -4
- data/lib/fog/azurerm/models/compute/virtual_machine_extension.rb +3 -5
- data/lib/fog/azurerm/models/compute/virtual_machine_extensions.rb +5 -5
- data/lib/fog/azurerm/models/dns/record_sets.rb +4 -4
- data/lib/fog/azurerm/models/dns/zones.rb +4 -4
- data/lib/fog/azurerm/models/network/express_route_circuit.rb +2 -5
- data/lib/fog/azurerm/models/network/express_route_circuit_authorization.rb +1 -1
- data/lib/fog/azurerm/models/network/express_route_circuit_authorizations.rb +4 -4
- data/lib/fog/azurerm/models/network/express_route_circuit_peering.rb +3 -5
- data/lib/fog/azurerm/models/network/express_route_circuit_peerings.rb +4 -4
- data/lib/fog/azurerm/models/network/express_route_circuits.rb +4 -4
- data/lib/fog/azurerm/models/network/express_route_service_providers.rb +2 -2
- data/lib/fog/azurerm/models/network/load_balancers.rb +5 -5
- data/lib/fog/azurerm/models/network/local_network_gateway.rb +1 -1
- data/lib/fog/azurerm/models/network/local_network_gateways.rb +4 -4
- data/lib/fog/azurerm/models/network/network_interfaces.rb +5 -5
- data/lib/fog/azurerm/models/network/network_security_groups.rb +5 -5
- data/lib/fog/azurerm/models/network/network_security_rule.rb +3 -4
- data/lib/fog/azurerm/models/network/network_security_rules.rb +4 -4
- data/lib/fog/azurerm/models/network/public_ips.rb +4 -4
- data/lib/fog/azurerm/models/network/subnets.rb +4 -4
- data/lib/fog/azurerm/models/network/virtual_network_gateway.rb +6 -7
- data/lib/fog/azurerm/models/network/virtual_network_gateway_connection.rb +5 -5
- data/lib/fog/azurerm/models/network/virtual_network_gateway_connections.rb +4 -4
- data/lib/fog/azurerm/models/network/virtual_network_gateways.rb +4 -4
- data/lib/fog/azurerm/models/network/virtual_networks.rb +4 -4
- data/lib/fog/azurerm/models/resources/azure_resources.rb +2 -2
- data/lib/fog/azurerm/models/resources/deployments.rb +4 -4
- data/lib/fog/azurerm/models/resources/resource_groups.rb +4 -4
- data/lib/fog/azurerm/models/sql/firewall_rule.rb +1 -1
- data/lib/fog/azurerm/models/sql/firewall_rules.rb +4 -4
- data/lib/fog/azurerm/models/sql/sql_database.rb +28 -24
- data/lib/fog/azurerm/models/sql/sql_databases.rb +5 -6
- data/lib/fog/azurerm/models/sql/sql_servers.rb +4 -4
- data/lib/fog/azurerm/models/storage/directories.rb +49 -24
- data/lib/fog/azurerm/models/storage/directory.rb +126 -40
- data/lib/fog/azurerm/models/storage/file.rb +226 -114
- data/lib/fog/azurerm/models/storage/files.rb +168 -13
- data/lib/fog/azurerm/models/storage/recovery_vault.rb +1 -1
- data/lib/fog/azurerm/models/storage/recovery_vaults.rb +4 -4
- data/lib/fog/azurerm/models/storage/storage_account.rb +5 -5
- data/lib/fog/azurerm/models/storage/storage_accounts.rb +4 -4
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_point.rb +1 -1
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb +4 -4
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +4 -4
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb +4 -4
- data/lib/fog/azurerm/network.rb +1 -1
- data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +17 -13
- data/lib/fog/azurerm/requests/network/list_virtual_networks.rb +1 -1
- data/lib/fog/azurerm/requests/resources/create_deployment.rb +1 -1
- data/lib/fog/azurerm/requests/resources/create_resource_group.rb +1 -1
- data/lib/fog/azurerm/requests/resources/delete_deployment.rb +1 -1
- data/lib/fog/azurerm/requests/resources/delete_resource_group.rb +1 -1
- data/lib/fog/azurerm/requests/resources/get_deployment.rb +1 -1
- data/lib/fog/azurerm/requests/resources/get_resource_group.rb +1 -1
- data/lib/fog/azurerm/requests/resources/list_deployments.rb +1 -1
- data/lib/fog/azurerm/requests/resources/list_resource_groups.rb +1 -1
- data/lib/fog/azurerm/requests/resources/list_tagged_resources.rb +1 -1
- data/lib/fog/azurerm/requests/resources/tag_resource.rb +1 -1
- data/lib/fog/azurerm/requests/sql/create_or_update_database.rb +3 -3
- data/lib/fog/azurerm/requests/sql/create_or_update_firewall_rule.rb +3 -3
- data/lib/fog/azurerm/requests/sql/create_or_update_sql_server.rb +3 -3
- data/lib/fog/azurerm/requests/sql/delete_database.rb +2 -2
- data/lib/fog/azurerm/requests/sql/delete_firewall_rule.rb +4 -4
- data/lib/fog/azurerm/requests/sql/delete_sql_server.rb +4 -4
- data/lib/fog/azurerm/requests/sql/get_database.rb +3 -3
- data/lib/fog/azurerm/requests/sql/get_firewall_rule.rb +3 -3
- data/lib/fog/azurerm/requests/sql/get_sql_server.rb +3 -3
- data/lib/fog/azurerm/requests/sql/list_databases.rb +3 -3
- data/lib/fog/azurerm/requests/sql/list_firewall_rules.rb +3 -3
- data/lib/fog/azurerm/requests/sql/list_sql_servers.rb +3 -3
- data/lib/fog/azurerm/requests/storage/acquire_blob_lease.rb +5 -2
- data/lib/fog/azurerm/requests/storage/acquire_container_lease.rb +5 -2
- 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 +8 -8
- data/lib/fog/azurerm/requests/storage/copy_blob_from_uri.rb +8 -8
- data/lib/fog/azurerm/requests/storage/create_block_blob.rb +108 -0
- data/lib/fog/azurerm/requests/storage/create_container.rb +12 -10
- data/lib/fog/azurerm/requests/storage/create_disk.rb +45 -19
- data/lib/fog/azurerm/requests/storage/create_or_update_recovery_vault.rb +2 -2
- data/lib/fog/azurerm/requests/storage/create_page_blob.rb +31 -0
- data/lib/fog/azurerm/requests/storage/create_storage_account.rb +2 -2
- data/lib/fog/azurerm/requests/storage/delete_blob.rb +10 -5
- data/lib/fog/azurerm/requests/storage/delete_container.rb +6 -2
- data/lib/fog/azurerm/requests/storage/delete_disk.rb +19 -16
- data/lib/fog/azurerm/requests/storage/get_all_backup_jobs.rb +2 -2
- data/lib/fog/azurerm/requests/storage/get_backup_container.rb +2 -2
- data/lib/fog/azurerm/requests/storage/get_backup_item.rb +2 -2
- data/lib/fog/azurerm/requests/storage/get_backup_job_for_vm.rb +1 -1
- data/lib/fog/azurerm/requests/storage/get_backup_protection_policy.rb +2 -2
- 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 +37 -35
- 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 +16 -12
- data/lib/fog/azurerm/requests/storage/get_container_url.rb +34 -0
- data/lib/fog/azurerm/requests/storage/get_recovery_vault.rb +2 -2
- data/lib/fog/azurerm/requests/storage/get_storage_access_keys.rb +4 -3
- data/lib/fog/azurerm/requests/storage/get_storage_account.rb +2 -2
- data/lib/fog/azurerm/requests/storage/list_blobs.rb +110 -24
- data/lib/fog/azurerm/requests/storage/list_containers.rb +46 -23
- data/lib/fog/azurerm/requests/storage/list_recovery_vaults.rb +2 -2
- data/lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb +2 -2
- data/lib/fog/azurerm/requests/storage/list_storage_accounts.rb +2 -2
- 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/{set_blob_metadata.rb → put_blob_metadata.rb} +7 -3
- 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/{set_container_metadata.rb → put_container_metadata.rb} +7 -3
- data/lib/fog/azurerm/requests/storage/release_blob_lease.rb +4 -1
- data/lib/fog/azurerm/requests/storage/release_container_lease.rb +4 -1
- data/lib/fog/azurerm/requests/storage/save_page_blob.rb +111 -0
- data/lib/fog/azurerm/requests/storage/start_backup.rb +1 -1
- data/lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb +56 -0
- data/lib/fog/azurerm/resources.rb +2 -2
- data/lib/fog/azurerm/storage.rb +33 -19
- data/lib/fog/azurerm/traffic_manager.rb +1 -1
- data/lib/fog/azurerm/utilities/general.rb +70 -3
- data/lib/fog/azurerm/version.rb +1 -1
- data/rake-script.sh +5 -2
- data/test/api_stub/models/application_gateway/gateway.rb +1 -1
- data/test/api_stub/models/compute/server.rb +1 -1
- data/test/api_stub/models/dns/record_set.rb +2 -2
- data/test/api_stub/models/dns/zone.rb +1 -1
- data/test/api_stub/models/network/express_route_circuit.rb +1 -1
- data/test/api_stub/models/network/express_route_circuit_authorization.rb +1 -1
- data/test/api_stub/models/network/express_route_circuit_peering.rb +1 -1
- data/test/api_stub/models/network/express_route_service_provider.rb +1 -1
- data/test/api_stub/models/network/load_balancer.rb +1 -1
- data/test/api_stub/models/network/network_interface.rb +1 -1
- data/test/api_stub/models/network/network_security_group.rb +1 -1
- data/test/api_stub/models/network/network_security_rule.rb +1 -1
- data/test/api_stub/models/network/public_ip.rb +1 -1
- data/test/api_stub/models/network/subnet.rb +1 -1
- data/test/api_stub/models/network/virtual_network.rb +1 -1
- data/test/api_stub/models/network/virtual_network_gateway.rb +1 -1
- data/test/api_stub/models/network/virtual_network_gateway_connection.rb +1 -1
- data/test/api_stub/models/resources/resource.rb +2 -2
- data/test/api_stub/models/resources/resource_group.rb +1 -1
- data/test/api_stub/models/storage/directory.rb +148 -62
- data/test/api_stub/models/storage/file.rb +122 -119
- data/test/api_stub/models/traffic_manager/traffic_manager_end_point.rb +1 -1
- data/test/api_stub/models/traffic_manager/traffic_manager_profile.rb +1 -1
- data/test/api_stub/requests/application_gateway/gateway.rb +2 -2
- data/test/api_stub/requests/compute/availability_set.rb +3 -3
- data/test/api_stub/requests/compute/virtual_machine.rb +9 -9
- data/test/api_stub/requests/dns/record_set.rb +3 -3
- data/test/api_stub/requests/dns/zone.rb +18 -18
- data/test/api_stub/requests/network/express_route_circuit.rb +2 -2
- data/test/api_stub/requests/network/express_route_circuit_authorization.rb +1 -1
- data/test/api_stub/requests/network/express_route_circuit_peering.rb +2 -2
- data/test/api_stub/requests/network/express_route_service_provider.rb +1 -1
- data/test/api_stub/requests/network/load_balancer.rb +2 -2
- data/test/api_stub/requests/network/network_interface.rb +4 -4
- data/test/api_stub/requests/network/network_security_group.rb +3 -3
- data/test/api_stub/requests/network/network_security_rule.rb +2 -2
- data/test/api_stub/requests/network/public_ip.rb +2 -2
- data/test/api_stub/requests/network/subnet.rb +2 -2
- data/test/api_stub/requests/network/virtual_network.rb +2 -2
- data/test/api_stub/requests/network/virtual_network_gateway.rb +2 -2
- data/test/api_stub/requests/network/virtual_network_gateway_connection.rb +3 -3
- data/test/api_stub/requests/resources/resource.rb +2 -2
- data/test/api_stub/requests/resources/resource_group.rb +2 -2
- data/test/api_stub/requests/storage/directory.rb +59 -65
- data/test/api_stub/requests/storage/file.rb +183 -113
- data/test/api_stub/requests/storage/storageaccount.rb +1 -1
- data/test/api_stub/requests/traffic_manager/traffic_manager_endpoint.rb +1 -1
- data/test/api_stub/requests/traffic_manager/traffic_manager_profile.rb +2 -2
- data/test/integration/Virtual_network_gateway_connection.rb +189 -182
- data/test/integration/application_gateway.rb +208 -183
- data/test/integration/availability_set.rb +44 -27
- data/test/integration/blob.rb +293 -169
- data/test/integration/container.rb +93 -42
- data/test/integration/data_disk.rb +57 -46
- data/test/integration/deployment.rb +40 -32
- data/test/integration/express_route_circuit.rb +86 -82
- data/test/integration/external_load_balancer.rb +108 -100
- data/test/integration/internal_load_balancer.rb +115 -106
- data/test/integration/local_network_gateway.rb +46 -39
- data/test/integration/network_interface.rb +119 -107
- data/test/integration/network_security_group.rb +86 -74
- data/test/integration/network_security_rule.rb +65 -57
- data/test/integration/public_ip.rb +50 -42
- data/test/integration/record_set.rb +90 -78
- data/test/integration/resource_group.rb +26 -14
- data/test/integration/resource_tag.rb +56 -45
- data/test/integration/server.rb +152 -135
- data/test/integration/server_custom_image.rb +85 -76
- data/test/integration/sql_server.rb +130 -117
- data/test/integration/storage_account.rb +82 -70
- data/test/integration/subnet.rb +87 -74
- data/test/integration/traffic_manager.rb +86 -74
- data/test/integration/virtual_machine_extension.rb +115 -106
- data/test/integration/virtual_network.rb +121 -100
- data/test/integration/virtual_network_gateway.rb +86 -79
- data/test/integration/virtual_network_gateway_connection_to_express_route.rb +94 -87
- data/test/integration/zone.rb +36 -28
- data/test/models/storage/test_directories.rb +26 -71
- data/test/models/storage/test_directory.rb +111 -58
- data/test/models/storage/test_file.rb +179 -143
- data/test/models/storage/test_files.rb +197 -30
- data/test/models/storage/test_storage_account.rb +1 -1
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +15 -17
- data/test/requests/storage/test_acquire_blob_lease.rb +23 -4
- data/test/requests/storage/test_acquire_container_lease.rb +24 -5
- 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 +22 -3
- data/test/requests/storage/test_copy_blob_from_uri.rb +23 -4
- data/test/requests/storage/test_create_block_blob.rb +80 -0
- data/test/requests/storage/test_create_container.rb +18 -13
- data/test/requests/storage/test_create_disk.rb +57 -4
- data/test/requests/storage/test_create_page_blob.rb +34 -0
- data/test/requests/storage/test_delete_blob.rb +25 -5
- data/test/requests/storage/test_delete_container.rb +21 -9
- data/test/requests/storage/test_delete_disk.rb +14 -7
- 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 +30 -0
- data/test/requests/storage/test_get_blob_properties.rb +29 -7
- data/test/requests/storage/test_get_blob_url.rb +33 -0
- data/test/requests/storage/test_get_container_acl.rb +37 -0
- data/test/requests/storage/test_get_container_properties.rb +25 -11
- 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 +38 -7
- 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_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 +20 -2
- data/test/requests/storage/test_release_container_lease.rb +21 -3
- 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/test_helper.rb +34 -21
- metadata +92 -46
- data/lib/fog/azurerm/requests/storage/check_blob_exist.rb +0 -25
- data/lib/fog/azurerm/requests/storage/compare_blob.rb +0 -73
- data/lib/fog/azurerm/requests/storage/download_blob_to_file.rb +0 -56
- data/lib/fog/azurerm/requests/storage/get_blob_metadata.rb +0 -59
- data/lib/fog/azurerm/requests/storage/get_container_access_control_list.rb +0 -30
- data/lib/fog/azurerm/requests/storage/get_container_metadata.rb +0 -32
- data/lib/fog/azurerm/requests/storage/set_blob_properties.rb +0 -26
- data/lib/fog/azurerm/requests/storage/upload_block_blob_from_file.rb +0 -60
- data/test/requests/storage/test_check_blob_exist.rb +0 -17
- data/test/requests/storage/test_compare_blob.rb +0 -17
- data/test/requests/storage/test_download_blob_to_file.rb +0 -25
- data/test/requests/storage/test_get_blob_metadata.rb +0 -18
- data/test/requests/storage/test_get_container_access_control_list.rb +0 -31
- data/test/requests/storage/test_get_container_metadata.rb +0 -18
- data/test/requests/storage/test_list_blobs_in_container.rb +0 -23
- data/test/requests/storage/test_set_blob_metadata.rb +0 -17
- data/test/requests/storage/test_set_blob_properties.rb +0 -16
- data/test/requests/storage/test_set_container_metadata.rb +0 -17
- data/test/requests/storage/test_upload_block_blob_from_file.rb +0 -23
@@ -3,125 +3,60 @@ module ApiStub
|
|
3
3
|
module Storage
|
4
4
|
# Mock class for Data Disk Model
|
5
5
|
class File
|
6
|
-
def self.
|
6
|
+
def self.blob
|
7
7
|
{
|
8
|
-
'name' => '
|
9
|
-
'
|
10
|
-
'
|
11
|
-
'
|
12
|
-
'
|
13
|
-
'
|
14
|
-
'
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
'copy_status' => 'success',
|
34
|
-
'copy_source' => 'https://testaccount.blob.core.windows.net/testblob/4m?snapshot=2016-02-04T08%3A35%3A50.3157696Z',
|
35
|
-
'copy_progress' => '4194304/4194304',
|
36
|
-
'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT',
|
37
|
-
'copy_status_description' => nil,
|
38
|
-
'accept_ranges' => 0
|
39
|
-
}
|
8
|
+
'name' => 'test_blob',
|
9
|
+
'metadata' => {},
|
10
|
+
'properties' => {
|
11
|
+
'last_modified' => 'Mon, 04 Jul 2016 09:30:31 GMT',
|
12
|
+
'etag' => '0x8D3A3EDD7C2B777',
|
13
|
+
'lease_status' => 'unlocked',
|
14
|
+
'lease_state' => 'available',
|
15
|
+
'lease_duration' => nil,
|
16
|
+
'content_length' => 4_194_304,
|
17
|
+
'content_type' => 'application/octet-stream',
|
18
|
+
'content_encoding' => nil,
|
19
|
+
'content_language' => nil,
|
20
|
+
'content_disposition' => nil,
|
21
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
22
|
+
'cache_control' => nil,
|
23
|
+
'sequence_number' => 0,
|
24
|
+
'blob_type' => 'PageBlob',
|
25
|
+
'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c',
|
26
|
+
'copy_status' => 'success',
|
27
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/testblob/4m?snapshot=2016-02-04T08%3A35%3A50.3157696Z',
|
28
|
+
'copy_progress' => '4194304/4194304',
|
29
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT',
|
30
|
+
'copy_status_description' => nil,
|
31
|
+
'accept_ranges' => 0
|
32
|
+
}
|
40
33
|
}
|
41
34
|
end
|
42
35
|
|
43
|
-
def self.
|
44
|
-
|
45
|
-
'name' => 'testblob1',
|
46
|
-
'snapshot' => nil,
|
47
|
-
'metadata' => {},
|
48
|
-
'properties' =>
|
49
|
-
{
|
50
|
-
'last_modified' => 'Mon, 04 Jul 2016 09:30:31 GMT',
|
51
|
-
'etag' => '0x8D3A3EDD7C2B777',
|
52
|
-
'lease_status' => 'unlocked',
|
53
|
-
'lease_state' => 'available',
|
54
|
-
'lease_duration' => nil,
|
55
|
-
'content_length' => 4_194_304,
|
56
|
-
'content_type' => 'application/octet-stream',
|
57
|
-
'content_encoding' => nil,
|
58
|
-
'content_language' => nil,
|
59
|
-
'content_disposition' => nil,
|
60
|
-
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
61
|
-
'cache_control' => nil,
|
62
|
-
'sequence_number' => 0,
|
63
|
-
'blob_type' => 'PageBlob',
|
64
|
-
'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c',
|
65
|
-
'copy_status' => 'success',
|
66
|
-
'copy_source' => 'https://testaccount.blob.core.windows.net/testblob/4m?snapshot=2016-02-04T08%3A35%3A50.3157696Z',
|
67
|
-
'copy_progress' => '4194304/4194304',
|
68
|
-
'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT',
|
69
|
-
'copy_status_description' => nil,
|
70
|
-
'accept_ranges' => 0
|
71
|
-
}
|
72
|
-
}
|
36
|
+
def self.blob_https_url
|
37
|
+
'https://sa.blob.core.windows.net/test_container/test_blob'
|
73
38
|
end
|
74
39
|
|
75
|
-
def self.
|
40
|
+
def self.blob_metadata
|
76
41
|
{
|
77
|
-
'
|
78
|
-
'
|
79
|
-
|
80
|
-
|
81
|
-
'etag' => '0x8D3B6B3D353FFCA',
|
82
|
-
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw=='
|
83
|
-
}
|
42
|
+
'created-by' => 'User',
|
43
|
+
'source-machine' => 'Test-machine',
|
44
|
+
'category' => 'guidance',
|
45
|
+
'doctype' => 'textDocuments'
|
84
46
|
}
|
85
47
|
end
|
86
48
|
|
87
|
-
def self.
|
49
|
+
def self.blob_list
|
88
50
|
{
|
89
|
-
|
90
|
-
|
91
|
-
|
51
|
+
next_marker: 'marker',
|
52
|
+
blobs:
|
53
|
+
[
|
92
54
|
{
|
93
|
-
'
|
94
|
-
'
|
95
|
-
'
|
96
|
-
'lease_state' => 'available',
|
97
|
-
'lease_duration' => nil,
|
98
|
-
'content_length' => 4_194_304,
|
99
|
-
'content_type' => 'application/atom+xml; charset=utf-8',
|
100
|
-
'content_encoding' => 'ASCII-8BIT',
|
101
|
-
'content_language' => nil,
|
102
|
-
'content_disposition' => nil,
|
103
|
-
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
104
|
-
'cache_control' => nil,
|
105
|
-
'blob_type' => 'BlockBlob',
|
106
|
-
'copy_id' => nil,
|
107
|
-
'copy_status' => nil,
|
108
|
-
'copy_source' => nil,
|
109
|
-
'copy_progress' => nil,
|
110
|
-
'copy_completion_time' => nil,
|
111
|
-
'copy_status_description' => nil,
|
112
|
-
'accept_ranges' => 0
|
113
|
-
}
|
114
|
-
}
|
115
|
-
end
|
116
|
-
|
117
|
-
def self.list_blobs
|
118
|
-
[
|
119
|
-
{
|
120
|
-
'name' => 'testblob1',
|
121
|
-
'properties' =>
|
122
|
-
{
|
55
|
+
'name' => 'test_blob1',
|
56
|
+
'metadata' => {},
|
57
|
+
'properties' => {
|
123
58
|
'last_modified' => 'Mon, 04 Jul 2016 02:50:20 GMT',
|
124
|
-
'etag' => '0x8D3A3B5F017F52D',
|
59
|
+
'etag' => '"0x8D3A3B5F017F52D"',
|
125
60
|
'lease_status' => 'unlocked',
|
126
61
|
'lease_state' => 'available',
|
127
62
|
'content_length' => 4_194_304,
|
@@ -135,20 +70,45 @@ module ApiStub
|
|
135
70
|
'blob_type' => 'PageBlob',
|
136
71
|
'copy_id' => '095adc3b-e277-4c3d-97e0-0abca881f60c',
|
137
72
|
'copy_status' => 'success',
|
138
|
-
'copy_source' => 'https://testaccount.blob.core.windows.net/
|
73
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A50.3256874Z',
|
139
74
|
'copy_progress' => '4194304/4194304',
|
140
75
|
'copy_completion_time' => 'Thu, 04 Feb 2016 08:35:52 GMT',
|
141
76
|
'copy_status_description' => nil,
|
142
77
|
'accept_ranges' => 0
|
143
|
-
}
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
78
|
+
}
|
79
|
+
},
|
80
|
+
{
|
81
|
+
'name' => 'test_blob2',
|
82
|
+
'metadata' => {},
|
83
|
+
'properties' => {
|
84
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
85
|
+
'etag' => '"0x8D29C92173526C8"',
|
86
|
+
'lease_status' => 'unlocked',
|
87
|
+
'lease_state' => 'available',
|
88
|
+
'content_length' => 4_194_304,
|
89
|
+
'content_type' => 'application/octet-stream',
|
90
|
+
'content_encoding' => nil,
|
91
|
+
'content_language' => nil,
|
92
|
+
'content_disposition' => nil,
|
93
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
94
|
+
'cache_control' => nil,
|
95
|
+
'sequence_number' => 0,
|
96
|
+
'blob_type' => 'PageBlob',
|
97
|
+
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
98
|
+
'copy_status' => 'success',
|
99
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
100
|
+
'copy_progress' => '4194304/4194304',
|
101
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
102
|
+
'copy_status_description' => nil,
|
103
|
+
'accept_ranges' => 0
|
104
|
+
}
|
105
|
+
},
|
106
|
+
{
|
107
|
+
'name' => 'test_blob3',
|
108
|
+
'metadata' => {},
|
109
|
+
'properties' => {
|
150
110
|
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
151
|
-
'etag' => '0x8D29C92173526C8',
|
111
|
+
'etag' => '"0x8D29C92173526C8"',
|
152
112
|
'lease_status' => 'unlocked',
|
153
113
|
'lease_state' => 'available',
|
154
114
|
'content_length' => 4_194_304,
|
@@ -162,15 +122,58 @@ module ApiStub
|
|
162
122
|
'blob_type' => 'PageBlob',
|
163
123
|
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
164
124
|
'copy_status' => 'success',
|
165
|
-
'copy_source' => 'https://testaccount.blob.core.windows.net/
|
125
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
166
126
|
'copy_progress' => '4194304/4194304',
|
167
127
|
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
168
128
|
'copy_status_description' => nil,
|
169
129
|
'accept_ranges' => 0
|
170
|
-
}
|
171
|
-
|
130
|
+
}
|
131
|
+
},
|
132
|
+
{
|
133
|
+
'name' => 'test_blob4',
|
134
|
+
'metadata' => {},
|
135
|
+
'properties' => {
|
136
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:02:08 GMT',
|
137
|
+
'etag' => '"0x8D29C92173526C8"',
|
138
|
+
'lease_status' => 'unlocked',
|
139
|
+
'lease_state' => 'available',
|
140
|
+
'content_length' => 4_194_304,
|
141
|
+
'content_type' => 'application/octet-stream',
|
142
|
+
'content_encoding' => nil,
|
143
|
+
'content_language' => nil,
|
144
|
+
'content_disposition' => nil,
|
145
|
+
'content_md5' => 'tXAohIyxuu/t94Lp/ujeRw==',
|
146
|
+
'cache_control' => nil,
|
147
|
+
'sequence_number' => 0,
|
148
|
+
'blob_type' => 'PageBlob',
|
149
|
+
'copy_id' => '0abcdc3b-4c3d-e277-97e0-0abca881f60c',
|
150
|
+
'copy_status' => 'success',
|
151
|
+
'copy_source' => 'https://testaccount.blob.core.windows.net/test_container/test_blob?snapshot=2016-02-04T08%3A35%3A55.3157696Z',
|
152
|
+
'copy_progress' => '4194304/4194304',
|
153
|
+
'copy_completion_time' => 'Thu, 04 Feb 2016 08:40:52 GMT',
|
154
|
+
'copy_status_description' => nil,
|
155
|
+
'accept_ranges' => 0
|
156
|
+
}
|
157
|
+
}
|
158
|
+
]
|
159
|
+
}
|
160
|
+
end
|
161
|
+
|
162
|
+
def self.container
|
163
|
+
{
|
164
|
+
'name' => 'test_container',
|
165
|
+
'public_access_level' => 'container',
|
166
|
+
'metadata' => {
|
167
|
+
'key1' => 'value1',
|
168
|
+
'key2' => 'value2'
|
169
|
+
},
|
170
|
+
'properties' => {
|
171
|
+
'last_modified' => 'Tue, 04 Aug 2015 06:01:08 GMT',
|
172
|
+
'etag' => '"0x8D29C92176C8352"',
|
173
|
+
'lease_status' => 'unlocked',
|
174
|
+
'lease_state' => 'available'
|
172
175
|
}
|
173
|
-
|
176
|
+
}
|
174
177
|
end
|
175
178
|
end
|
176
179
|
end
|
@@ -19,7 +19,7 @@ module ApiStub
|
|
19
19
|
}
|
20
20
|
}'
|
21
21
|
endpoint_mapper = Azure::ARM::TrafficManager::Models::Endpoint.mapper
|
22
|
-
traffic_manager_client.deserialize(endpoint_mapper, JSON.
|
22
|
+
traffic_manager_client.deserialize(endpoint_mapper, Fog::JSON.decode(endpoint), 'result.body')
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -67,7 +67,7 @@ module ApiStub
|
|
67
67
|
}
|
68
68
|
}'
|
69
69
|
profile_mapper = Azure::ARM::TrafficManager::Models::Profile.mapper
|
70
|
-
traffic_manager_client.deserialize(profile_mapper, JSON.
|
70
|
+
traffic_manager_client.deserialize(profile_mapper, Fog::JSON.decode(profile), 'result.body')
|
71
71
|
end
|
72
72
|
end
|
73
73
|
end
|
@@ -136,7 +136,7 @@ module ApiStub
|
|
136
136
|
}
|
137
137
|
}'
|
138
138
|
gateway_mapper = Azure::ARM::Network::Models::ApplicationGateway.mapper
|
139
|
-
gateway_client.deserialize(gateway_mapper, JSON.
|
139
|
+
gateway_client.deserialize(gateway_mapper, Fog::JSON.decode(response), 'result.body')
|
140
140
|
end
|
141
141
|
|
142
142
|
def self.gateway_params
|
@@ -303,7 +303,7 @@ module ApiStub
|
|
303
303
|
}]
|
304
304
|
}'
|
305
305
|
gateway_list_mapper = Azure::ARM::Network::Models::ApplicationGatewayListResult.mapper
|
306
|
-
gateway_client.deserialize(gateway_list_mapper, JSON.
|
306
|
+
gateway_client.deserialize(gateway_list_mapper, Fog::JSON.decode(response), 'result.body')
|
307
307
|
end
|
308
308
|
|
309
309
|
def self.delete_application_gateway_response
|
@@ -15,7 +15,7 @@ module ApiStub
|
|
15
15
|
"virtualMachines":[]
|
16
16
|
}'
|
17
17
|
availability_set_mapper = Azure::ARM::Compute::Models::AvailabilitySet.mapper
|
18
|
-
compute_client.deserialize(availability_set_mapper, JSON.
|
18
|
+
compute_client.deserialize(availability_set_mapper, Fog::JSON.decode(body), 'result.body')
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.list_availability_set_response(sdk_compute_client)
|
@@ -32,7 +32,7 @@ module ApiStub
|
|
32
32
|
} ]
|
33
33
|
}'
|
34
34
|
availability_set_mapper = Azure::ARM::Compute::Models::AvailabilitySetListResult.mapper
|
35
|
-
sdk_compute_client.deserialize(availability_set_mapper, JSON.
|
35
|
+
sdk_compute_client.deserialize(availability_set_mapper, Fog::JSON.decode(body), 'result.body')
|
36
36
|
end
|
37
37
|
|
38
38
|
def self.get_availability_set_response(sdk_compute_client)
|
@@ -49,7 +49,7 @@ module ApiStub
|
|
49
49
|
} ]
|
50
50
|
}'
|
51
51
|
availability_set_mapper = Azure::ARM::Compute::Models::AvailabilitySet.mapper
|
52
|
-
sdk_compute_client.deserialize(availability_set_mapper, JSON.
|
52
|
+
sdk_compute_client.deserialize(availability_set_mapper, Fog::JSON.decode(body), 'result.body')
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
@@ -217,7 +217,7 @@ module ApiStub
|
|
217
217
|
}
|
218
218
|
}'
|
219
219
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
220
|
-
compute_client.deserialize(vm_mapper, JSON.
|
220
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
221
221
|
end
|
222
222
|
|
223
223
|
def self.create_virtual_machine_with_custom_data_response(compute_client)
|
@@ -294,7 +294,7 @@ module ApiStub
|
|
294
294
|
}
|
295
295
|
}'
|
296
296
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
297
|
-
compute_client.deserialize(vm_mapper, JSON.
|
297
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
298
298
|
end
|
299
299
|
|
300
300
|
def self.create_virtual_machine_from_custom_image_response(compute_client)
|
@@ -371,7 +371,7 @@ module ApiStub
|
|
371
371
|
}
|
372
372
|
}'
|
373
373
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
374
|
-
compute_client.deserialize(vm_mapper, JSON.
|
374
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
375
375
|
end
|
376
376
|
|
377
377
|
def self.detach_data_disk_from_vm_response(compute_client)
|
@@ -440,7 +440,7 @@ module ApiStub
|
|
440
440
|
}
|
441
441
|
}'
|
442
442
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
443
|
-
compute_client.deserialize(vm_mapper, JSON.
|
443
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
444
444
|
end
|
445
445
|
|
446
446
|
def self.virtual_machine_response(compute_client)
|
@@ -627,7 +627,7 @@ module ApiStub
|
|
627
627
|
]
|
628
628
|
}'
|
629
629
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachineListResult.mapper
|
630
|
-
compute_client.deserialize(vm_mapper, JSON.
|
630
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
631
631
|
end
|
632
632
|
|
633
633
|
def self.list_available_sizes_for_virtual_machine_response(compute_client)
|
@@ -644,7 +644,7 @@ module ApiStub
|
|
644
644
|
]
|
645
645
|
}'
|
646
646
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachineSizeListResult.mapper
|
647
|
-
compute_client.deserialize(vm_mapper, JSON.
|
647
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
648
648
|
end
|
649
649
|
|
650
650
|
def self.virtual_machine_instance_view_response(compute_client)
|
@@ -701,7 +701,7 @@ module ApiStub
|
|
701
701
|
}
|
702
702
|
}'
|
703
703
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
704
|
-
compute_client.deserialize(vm_mapper, JSON.
|
704
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
705
705
|
end
|
706
706
|
|
707
707
|
def self.vm_status_response
|
@@ -792,7 +792,7 @@ module ApiStub
|
|
792
792
|
}
|
793
793
|
}'
|
794
794
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
795
|
-
compute_client.deserialize(vm_mapper, JSON.
|
795
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
796
796
|
end
|
797
797
|
|
798
798
|
def self.virtual_machine_15_data_disks_response(compute_client)
|
@@ -935,7 +935,7 @@ module ApiStub
|
|
935
935
|
}
|
936
936
|
}'
|
937
937
|
vm_mapper = Azure::ARM::Compute::Models::VirtualMachine.mapper
|
938
|
-
compute_client.deserialize(vm_mapper, JSON.
|
938
|
+
compute_client.deserialize(vm_mapper, Fog::JSON.decode(body), 'result.body')
|
939
939
|
end
|
940
940
|
end
|
941
941
|
end
|
@@ -22,7 +22,7 @@ module ApiStub
|
|
22
22
|
}]
|
23
23
|
}'
|
24
24
|
record_set_mapper = Azure::ARM::Dns::Models::RecordSetListResult.mapper
|
25
|
-
dns_client.deserialize(record_set_mapper, JSON.
|
25
|
+
dns_client.deserialize(record_set_mapper, Fog::JSON.decode(body), 'result.body').value
|
26
26
|
end
|
27
27
|
|
28
28
|
def self.record_set_response_for_a_type_response(dns_client)
|
@@ -46,7 +46,7 @@ module ApiStub
|
|
46
46
|
}
|
47
47
|
}'
|
48
48
|
record_set_mapper = Azure::ARM::Dns::Models::RecordSet.mapper
|
49
|
-
dns_client.deserialize(record_set_mapper, JSON.
|
49
|
+
dns_client.deserialize(record_set_mapper, Fog::JSON.decode(record_set), 'result.body')
|
50
50
|
end
|
51
51
|
|
52
52
|
def self.record_set_response_for_cname_type(dns_client)
|
@@ -67,7 +67,7 @@ module ApiStub
|
|
67
67
|
}
|
68
68
|
}'
|
69
69
|
record_set_mapper = Azure::ARM::Dns::Models::RecordSet.mapper
|
70
|
-
dns_client.deserialize(record_set_mapper, JSON.
|
70
|
+
dns_client.deserialize(record_set_mapper, Fog::JSON.decode(record_set), 'result.body')
|
71
71
|
end
|
72
72
|
end
|
73
73
|
end
|