diff --git a/src/azure-cli-testsdk/azure/cli/testsdk/base.py b/src/azure-cli-testsdk/azure/cli/testsdk/base.py index f1ae4c028c8..cbfe1615f62 100644 --- a/src/azure-cli-testsdk/azure/cli/testsdk/base.py +++ b/src/azure-cli-testsdk/azure/cli/testsdk/base.py @@ -168,7 +168,7 @@ def get_output_in_json(self): if not self.json_value: self.json_value = json.loads(self.output) - if not self.json_value: + if self.json_value is None: raise AssertionError('The command output cannot be parsed in json.') return self.json_value diff --git a/src/azure-cli-testsdk/azure/cli/testsdk/checkers.py b/src/azure-cli-testsdk/azure/cli/testsdk/checkers.py index ab039813215..0198fbc9f1f 100644 --- a/src/azure-cli-testsdk/azure/cli/testsdk/checkers.py +++ b/src/azure-cli-testsdk/azure/cli/testsdk/checkers.py @@ -15,9 +15,6 @@ def __init__(self, query, expected_result): def __call__(self, execution_result): json_value = execution_result.get_output_in_json() - if not json_value: - raise AssertionError('The command output cannot be parsed in json.') - actual_result = jmespath.search(self._query, json_value, jmespath.Options(collections.OrderedDict)) if not actual_result == self._expected_result: @@ -31,9 +28,6 @@ def __init__(self, query): def __call__(self, execution_result): json_value = execution_result.get_output_in_json() - if not json_value: - raise AssertionError('The command output cannot be parsed in json.') - actual_result = jmespath.search(self._query, json_value, jmespath.Options(collections.OrderedDict)) if not actual_result: diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_create_account_sas.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_create_account_sas.yaml new file mode 100644 index 00000000000..f0d3982f5dd --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_create_account_sas.yaml @@ -0,0 +1,174 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['326'] + content-type: [application/json; charset=utf-8] + date: ['Sat, 18 Mar 2017 20:50:16 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: '{"sku": {"name": "Standard_LRS"}, "location": "westus", "kind": "Storage"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 20:50:20 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/115eab74-1e65-49dc-9ba4-e84e5c05d27a?monitor=true&api-version=2016-12-01'] + pragma: [no-cache] + retry-after: ['17'] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/115eab74-1e65-49dc-9ba4-e84e5c05d27a?monitor=true&api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","kind":"Storage","location":"westus","name":"clitest000002","properties":{"creationTime":"2017-03-18T20:50:20.2003530Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","file":"https://clitest000002.file.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:50:37 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account generate-sas] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts?api-version=2016-12-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","kind":"Storage","location":"westus","name":"clitest000002","properties":{"creationTime":"2017-03-18T20:50:20.2003530Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","file":"https://clitest000002.file.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore102","kind":"Storage","location":"westus","name":"foostore102","properties":{"creationTime":"2016-05-25T19:32:49.5192125Z","primaryEndpoints":{"blob":"https://foostore102.blob.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_ZRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore103","kind":"Storage","location":"westus","name":"foostore103","properties":{"creationTime":"2016-05-25T23:52:18.1234838Z","primaryEndpoints":{"blob":"https://foostore103.blob.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_ZRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore12978","kind":"Storage","location":"westeurope","name":"foostore12978","properties":{"creationTime":"2016-04-29T06:55:06.4412159Z","primaryEndpoints":{"blob":"https://foostore12978.blob.core.windows.net/","file":"https://foostore12978.file.core.windows.net/","queue":"https://foostore12978.queue.core.windows.net/","table":"https://foostore12978.table.core.windows.net/"},"primaryLocation":"westeurope","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/testacc209","kind":"Storage","location":"westus","name":"testacc209","properties":{"creationTime":"2016-01-26T19:04:16.5466637Z","primaryEndpoints":{"blob":"https://testacc209.blob.core.windows.net/","file":"https://testacc209.file.core.windows.net/","queue":"https://testacc209.queue.core.windows.net/","table":"https://testacc209.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/trdai-test-permanent/providers/Microsoft.Storage/storageAccounts/trdaitest01","kind":"Storage","location":"westus","name":"trdaitest01","properties":{"creationTime":"2017-03-03T18:45:52.4050116Z","primaryEndpoints":{"blob":"https://trdaitest01.blob.core.windows.net/","file":"https://trdaitest01.file.core.windows.net/","queue":"https://trdaitest01.queue.core.windows.net/","table":"https://trdaitest01.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitest","kind":"Storage","location":"westus","name":"zitest","properties":{"creationTime":"2016-05-03T20:07:05.3537460Z","primaryEndpoints":{"blob":"https://zitest.blob.core.windows.net/","file":"https://zitest.file.core.windows.net/","queue":"https://zitest.queue.core.windows.net/","table":"https://zitest.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitesta21","kind":"Storage","location":"westus","name":"zitesta21","properties":{"creationTime":"2016-08-23T20:01:18.8418933Z","primaryEndpoints":{"blob":"https://zitesta21.blob.core.windows.net/","file":"https://zitesta21.file.core.windows.net/","queue":"https://zitesta21.queue.core.windows.net/","table":"https://zitesta21.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitestb21","kind":"Storage","location":"westus","name":"zitestb21","properties":{"creationTime":"2016-08-23T20:10:50.2990885Z","primaryEndpoints":{"blob":"https://zitestb21.blob.core.windows.net/","file":"https://zitestb21.file.core.windows.net/","queue":"https://zitestb21.queue.core.windows.net/","table":"https://zitestb21.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitesty21","kind":"Storage","location":"westus","name":"zitesty21","properties":{"creationTime":"2016-08-23T19:55:37.1159138Z","primaryEndpoints":{"blob":"https://zitesty21.blob.core.windows.net/","file":"https://zitesty21.file.core.windows.net/","queue":"https://zitesty21.queue.core.windows.net/","table":"https://zitesty21.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['6610'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:50:38 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account generate-sas] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2016-12-01 + response: + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"/H6HwyasXP56hSYVlfit4mqEDDsQZYdVeK0kMqDdYJoADfVM2wiH/+b5sA402kKKqIc1EovmJsUTDulhdL5r9A=="},{"keyName":"key2","permissions":"Full","value":"wJB7PHJsoMEUuaJNRmR92IBftPIaPvkAr/ehQGn2uht84wG90F3WRT1t700D8UKZWuED7g1dVd3ErPnV9Q4GDA=="}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['289'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:50:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 20:50:43 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkcxODM3ODhCNzU2QkIwMUMzMEYzMTA5NUEzOUIwMDBERTNDRHw2OTczQkU1RURDRDlFQjY0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_create_storage_account.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_create_storage_account.yaml new file mode 100644 index 00000000000..1fc2797d650 --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_create_storage_account.yaml @@ -0,0 +1,469 @@ +interactions: +- request: + body: '{"tags": {"use": "az-test"}, "location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['326'] + content-type: [application/json; charset=utf-8] + date: ['Sat, 18 Mar 2017 20:55:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: '{"sku": {"name": "Standard_LRS"}, "location": "westus", "kind": "Storage"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 20:55:37 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/05edb71f-5114-4d9b-93e7-ab9b54ba4848?monitor=true&api-version=2016-12-01'] + pragma: [no-cache] + retry-after: ['17'] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/05edb71f-5114-4d9b-93e7-ab9b54ba4848?monitor=true&api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:55:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: 'b''{"name": "cli000002", "type": "Microsoft.Storage/storageAccounts"}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account check-name] + Connection: [keep-alive] + Content-Length: ['81'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 + response: + body: {string: '{"message":"The storage account named cli000002 is already taken.","nameAvailable":false,"reason":"AlreadyExists"} + +'} + headers: + cache-control: [no-cache] + content-length: ['130'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:55:57 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts?api-version=2016-12-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['839'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:55:57 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:55:58 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account show-connection-string] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002/listKeys?api-version=2016-12-01 + response: + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"6pdz6IFhKuPx9KbsrBwngugJhP1AcF+qxTeIrEyWTbIvEsjz6tDMiQSOhlYFryUgu8bL+b0pmvNk1rpjFQ58lg=="},{"keyName":"key2","permissions":"Full","value":"HJLAKG1yD01mBn2KQCPyQ6UFmhzIlxgaLfe6drIkm6N7RY0hu9FoNPUeaLvwUiZyjBMKUw7GcQ5Fb7brD/u1aQ=="}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['289'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:55:59 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:56:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"sku": {"name": "Standard_LRS"}, "tags": {"foo": "bar", "cat": ""}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account update] + Connection: [keep-alive] + Content-Length: ['68'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['847'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:56:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{"cat":"","foo":"bar"},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['847'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:56:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"sku": {"name": "Standard_GRS"}, "tags": {}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account update] + Connection: [keep-alive] + Content-Length: ['45'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['888'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:56:04 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['888'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:56:06 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"sku": {"name": "Standard_GRS"}, "tags": {"test": "success"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account update] + Connection: [keep-alive] + Content-Length: ['62'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","kind":"Storage","location":"westus","name":"cli000002","properties":{"creationTime":"2017-03-18T20:55:38.0623846Z","primaryEndpoints":{"blob":"https://cli000002.blob.core.windows.net/","file":"https://cli000002.file.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","secondaryLocation":"eastus","statusOfPrimary":"available","statusOfSecondary":"available"},"sku":{"name":"Standard_GRS","tier":"Standard"},"tags":{"test":"success"},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['904'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:56:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 20:56:10 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: 'b''{"name": "cli000002", "type": "Microsoft.Storage/storageAccounts"}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account check-name] + Connection: [keep-alive] + Content-Length: ['81'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2016-12-01 + response: + body: {string: '{"nameAvailable":true} + +'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:56:12 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 20:56:16 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc0QTk3Q0RCMzQ0MENGMDhFNjA2RUYzOEM4RjMwREZBQjhFQ3xDQjZDQTIzMjM5N0ZCMTY5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_list_locations.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_list_locations.yaml new file mode 100644 index 00000000000..45c71c71e66 --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_list_locations.yaml @@ -0,0 +1,53 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [account list-locations] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 subscriptionclient/0.30.2 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2016-06-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia","name":"eastasia","displayName":"East + Asia","longitude":"114.188","latitude":"22.267"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia","name":"southeastasia","displayName":"Southeast + Asia","longitude":"103.833","latitude":"1.283"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus","name":"centralus","displayName":"Central + US","longitude":"-93.6208","latitude":"41.5908"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus","name":"eastus","displayName":"East + US","longitude":"-79.8164","latitude":"37.3719"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2","name":"eastus2","displayName":"East + US 2","longitude":"-78.3889","latitude":"36.6681"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus","name":"westus","displayName":"West + US","longitude":"-122.417","latitude":"37.783"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus","name":"northcentralus","displayName":"North + Central US","longitude":"-87.6278","latitude":"41.8819"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus","name":"southcentralus","displayName":"South + Central US","longitude":"-98.5","latitude":"29.4167"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope","name":"northeurope","displayName":"North + Europe","longitude":"-6.2597","latitude":"53.3478"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope","name":"westeurope","displayName":"West + Europe","longitude":"4.9","latitude":"52.3667"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest","name":"japanwest","displayName":"Japan + West","longitude":"135.5022","latitude":"34.6939"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast","name":"japaneast","displayName":"Japan + East","longitude":"139.77","latitude":"35.68"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth","name":"brazilsouth","displayName":"Brazil + South","longitude":"-46.633","latitude":"-23.55"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast","name":"australiaeast","displayName":"Australia + East","longitude":"151.2094","latitude":"-33.86"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast","name":"australiasoutheast","displayName":"Australia + Southeast","longitude":"144.9631","latitude":"-37.8136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia","name":"southindia","displayName":"South + India","longitude":"80.1636","latitude":"12.9822"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia","name":"centralindia","displayName":"Central + India","longitude":"73.9197","latitude":"18.5822"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westindia","name":"westindia","displayName":"West + India","longitude":"72.868","latitude":"19.088"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral","name":"canadacentral","displayName":"Canada + Central","longitude":"-79.383","latitude":"43.653"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast","name":"canadaeast","displayName":"Canada + East","longitude":"-71.217","latitude":"46.817"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth","name":"uksouth","displayName":"UK + South","longitude":"-0.799","latitude":"50.941"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest","name":"ukwest","displayName":"UK + West","longitude":"-3.084","latitude":"53.427"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus","name":"westcentralus","displayName":"West + Central US","longitude":"-110.234","latitude":"40.890"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2","name":"westus2","displayName":"West + US 2","longitude":"-119.852","latitude":"47.233"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral","name":"koreacentral","displayName":"Korea + Central","longitude":"126.9780","latitude":"37.5665"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth","name":"koreasouth","displayName":"Korea + South","longitude":"129.0756","latitude":"35.1796"}]}'} + headers: + cache-control: [no-cache] + content-length: ['4523'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 15 Mar 2017 17:46:44 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_list_storage_accounts.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_list_storage_accounts.yaml new file mode 100644 index 00000000000..06ab09942e5 --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_list_storage_accounts.yaml @@ -0,0 +1,200 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['326'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 15 Mar 2017 17:43:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: '{"location": "westus", "sku": {"name": "Standard_LRS"}, "kind": "Storage"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 15 Mar 2017 17:43:51 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/d24dfd75-8bf1-4667-ba53-e95f2cd39f06?monitor=true&api-version=2016-12-01'] + pragma: [no-cache] + retry-after: ['17'] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/d24dfd75-8bf1-4667-ba53-e95f2cd39f06?monitor=true&api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","kind":"Storage","location":"westus","name":"clitest000002","properties":{"creationTime":"2017-03-15T17:43:51.6054981Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","file":"https://clitest000002.file.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Wed, 15 Mar 2017 17:44:09 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"location": "westus", "sku": {"name": "Standard_LRS"}, "kind": "Storage"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 15 Mar 2017 17:44:12 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/01c9a23a-52d0-4071-9493-e045bdefb6b3?monitor=true&api-version=2016-12-01'] + pragma: [no-cache] + retry-after: ['17'] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/01c9a23a-52d0-4071-9493-e045bdefb6b3?monitor=true&api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","kind":"Storage","location":"westus","name":"clitest000003","properties":{"creationTime":"2017-03-15T17:44:12.7664804Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","file":"https://clitest000003.file.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Wed, 15 Mar 2017 17:44:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts?api-version=2016-12-01 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","kind":"Storage","location":"westus","name":"clitest000003","properties":{"creationTime":"2017-03-15T17:44:12.7664804Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","file":"https://clitest000003.file.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","kind":"Storage","location":"westus","name":"clitest000002","properties":{"creationTime":"2017-03-15T17:43:51.6054981Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","file":"https://clitest000002.file.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore102","kind":"Storage","location":"westus","name":"foostore102","properties":{"creationTime":"2016-05-25T19:32:49.5192125Z","primaryEndpoints":{"blob":"https://foostore102.blob.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_ZRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore103","kind":"Storage","location":"westus","name":"foostore103","properties":{"creationTime":"2016-05-25T23:52:18.1234838Z","primaryEndpoints":{"blob":"https://foostore103.blob.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_ZRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/foostore12978","kind":"Storage","location":"westeurope","name":"foostore12978","properties":{"creationTime":"2016-04-29T06:55:06.4412159Z","primaryEndpoints":{"blob":"https://foostore12978.blob.core.windows.net/","file":"https://foostore12978.file.core.windows.net/","queue":"https://foostore12978.queue.core.windows.net/","table":"https://foostore12978.table.core.windows.net/"},"primaryLocation":"westeurope","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/testacc209","kind":"Storage","location":"westus","name":"testacc209","properties":{"creationTime":"2016-01-26T19:04:16.5466637Z","primaryEndpoints":{"blob":"https://testacc209.blob.core.windows.net/","file":"https://testacc209.file.core.windows.net/","queue":"https://testacc209.queue.core.windows.net/","table":"https://testacc209.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/trdai-test-permanent/providers/Microsoft.Storage/storageAccounts/trdaitest01","kind":"Storage","location":"westus","name":"trdaitest01","properties":{"creationTime":"2017-03-03T18:45:52.4050116Z","primaryEndpoints":{"blob":"https://trdaitest01.blob.core.windows.net/","file":"https://trdaitest01.file.core.windows.net/","queue":"https://trdaitest01.queue.core.windows.net/","table":"https://trdaitest01.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitest","kind":"Storage","location":"westus","name":"zitest","properties":{"creationTime":"2016-05-03T20:07:05.3537460Z","primaryEndpoints":{"blob":"https://zitest.blob.core.windows.net/","file":"https://zitest.file.core.windows.net/","queue":"https://zitest.queue.core.windows.net/","table":"https://zitest.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitesta21","kind":"Storage","location":"westus","name":"zitesta21","properties":{"creationTime":"2016-08-23T20:01:18.8418933Z","primaryEndpoints":{"blob":"https://zitesta21.blob.core.windows.net/","file":"https://zitesta21.file.core.windows.net/","queue":"https://zitesta21.queue.core.windows.net/","table":"https://zitesta21.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitestb21","kind":"Storage","location":"westus","name":"zitestb21","properties":{"creationTime":"2016-08-23T20:10:50.2990885Z","primaryEndpoints":{"blob":"https://zitestb21.blob.core.windows.net/","file":"https://zitestb21.file.core.windows.net/","queue":"https://zitestb21.queue.core.windows.net/","table":"https://zitestb21.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zitest/providers/Microsoft.Storage/storageAccounts/zitesty21","kind":"Storage","location":"westus","name":"zitesty21","properties":{"creationTime":"2016-08-23T19:55:37.1159138Z","primaryEndpoints":{"blob":"https://zitesty21.blob.core.windows.net/","file":"https://zitesty21.file.core.windows.net/","queue":"https://zitesty21.queue.core.windows.net/","table":"https://zitesty21.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['7437'] + content-type: [application/json] + date: ['Wed, 15 Mar 2017 17:44:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 15 Mar 2017 17:44:34 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc5NDcxMEYxMUUyRTVENUM3MTgzMzcxQ0YwQTI0RjVBMzQ2MXw5MEJDQzNDRDhFQTZDQTc2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_logging_operations.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_logging_operations.yaml new file mode 100644 index 00000000000..51f73f25368 --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_logging_operations.yaml @@ -0,0 +1,285 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['326'] + content-type: [application/json; charset=utf-8] + date: ['Sat, 18 Mar 2017 15:38:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: '{"sku": {"name": "Standard_LRS"}, "location": "westus", "kind": "Storage"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 15:38:32 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/3f07f22f-e47a-4fd0-8b68-d66d869b6cff?monitor=true&api-version=2016-12-01'] + pragma: [no-cache] + retry-after: ['17'] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/3f07f22f-e47a-4fd0-8b68-d66d869b6cff?monitor=true&api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","kind":"Storage","location":"westus","name":"clitest000002","properties":{"creationTime":"2017-03-18T15:38:32.9922910Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","file":"https://clitest000002.file.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 15:38:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account show-connection-string] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2016-12-01 + response: + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"aIT98Ki7Ebo10KOSR20Ro8n3X7wWv2uufT7lUDygfkGifwcar7/cb32uUw7hm/H9hxwSyNH4YPUMdX1ypJJaHw=="},{"keyName":"key2","permissions":"Full","value":"MoNO+pOBpi7pWFUEd4fagZ2Di8nyaxd0W2NPBuhnkdfBwaf33zDLVY2Gr8hJ0zdcKgWWOe8VGK8KyKbedpMgaQ=="}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['289'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 15:38:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:38:55 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.blob.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:38:53 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:38:55 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.queue.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:38:53 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + DataServiceVersion: [3.0;NetFx] + MaxDataServiceVersion: ['3.0'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:38:55 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.table.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:38:53 GMT'] + server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: ' + + 1.0FalseTrueFalseTrue1' + headers: + Connection: [keep-alive] + Content-Length: ['264'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:38:56 GMT'] + x-ms-version: ['2015-07-08'] + method: PUT + uri: https://clitest000002.blob.core.windows.net/?restype=service&comp=properties + response: + body: {string: ''} + headers: + date: ['Sat, 18 Mar 2017 15:38:54 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:38:57 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.blob.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0truefalsefalsetrue11.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:38:55 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:38:57 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.queue.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:38:55 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + DataServiceVersion: [3.0;NetFx] + MaxDataServiceVersion: ['3.0'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:38:57 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.table.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:38:55 GMT'] + server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 15:38:57 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc5QzIyODg1Nzg5NDcxRTZGODg4MTcyOTE1NUI1NDJFQjNDRnw4MzJBNjgzRDM4MkI1NDIyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_metrics_operations.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_metrics_operations.yaml new file mode 100644 index 00000000000..f7f3c1546f2 --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_metrics_operations.yaml @@ -0,0 +1,323 @@ +interactions: +- request: + body: '{"tags": {"use": "az-test"}, "location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['326'] + content-type: [application/json; charset=utf-8] + date: ['Sat, 18 Mar 2017 15:39:09 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: '{"sku": {"name": "Standard_LRS"}, "location": "westus", "kind": "Storage"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 15:39:12 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/89b99131-45b7-492d-a677-8d9748ed8e07?monitor=true&api-version=2016-12-01'] + pragma: [no-cache] + retry-after: ['17'] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/89b99131-45b7-492d-a677-8d9748ed8e07?monitor=true&api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","kind":"Storage","location":"westus","name":"clitest000002","properties":{"creationTime":"2017-03-18T15:39:12.2105922Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","file":"https://clitest000002.file.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 15:39:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account show-connection-string] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2016-12-01 + response: + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"ozcLmV9Los8JavVi9jvGQS/bY++hqhobjA8sud85P972RB9wa0zDji/gvYjFE+ugevNlWT9lUMZaXFQNVIb9lw=="},{"keyName":"key2","permissions":"Full","value":"eNti181ctnO2vCPWgH3g/tw5H37k4rLNPq3mZMw+fRKjw+LGeMRbrE0QoESxbXi6vSVLk/AJdWq9nBOFHrAE3Q=="}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['289'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 15:39:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:33 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.blob.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:39:32 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:33 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.file.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:39:32 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:34 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.queue.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:39:32 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + DataServiceVersion: [3.0;NetFx] + MaxDataServiceVersion: ['3.0'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:34 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.table.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:39:33 GMT'] + server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: ' + + 1.0FalseTrue11.0FalseTrue1' + headers: + Connection: [keep-alive] + Content-Length: ['386'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:35 GMT'] + x-ms-version: ['2015-07-08'] + method: PUT + uri: https://clitest000002.file.core.windows.net/?restype=service&comp=properties + response: + body: {string: ''} + headers: + date: ['Sat, 18 Mar 2017 15:39:34 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:36 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.blob.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:39:34 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:36 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.file.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsetrue11.0falsetrue1"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:39:34 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:36 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.queue.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:39:34 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + DataServiceVersion: [3.0;NetFx] + MaxDataServiceVersion: ['3.0'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sat, 18 Mar 2017 15:39:36 GMT'] + x-ms-version: ['2015-07-08'] + method: GET + uri: https://clitest000002.table.core.windows.net/?restype=service&comp=properties + response: + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + headers: + content-type: [application/xml] + date: ['Sat, 18 Mar 2017 15:39:35 GMT'] + server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + x-ms-version: ['2015-07-08'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 15:39:35 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdBRjNDODU2QzhENzVBMjZBRUJDMDFEQ0JDOTVDOTgwOUE5M3w0RDk2QjRFM0NCQzAxQkUyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_renew_account_key.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_renew_account_key.yaml new file mode 100644 index 00000000000..914b93826b3 --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_renew_account_key.yaml @@ -0,0 +1,207 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['326'] + content-type: [application/json; charset=utf-8] + date: ['Sat, 18 Mar 2017 20:39:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: '{"location": "westus", "kind": "Storage", "sku": {"name": "Standard_LRS"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 20:39:08 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/75c31678-e8b1-46b6-bc4d-ca233a19e2f5?monitor=true&api-version=2016-12-01'] + pragma: [no-cache] + retry-after: ['17'] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/75c31678-e8b1-46b6-bc4d-ca233a19e2f5?monitor=true&api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","kind":"Storage","location":"westus","name":"clitest000002","properties":{"creationTime":"2017-03-18T20:39:08.6149329Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","file":"https://clitest000002.file.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:39:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account keys list] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2016-12-01 + response: + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"P8ryLB4gqp2l0IClrbkD8AoqBiNSERScA4QTIxeXg1fcm/L0tbqKT1GrF9zrl4LwVb5ZR/R5YGy/GvDn58dbHA=="},{"keyName":"key2","permissions":"Full","value":"aT5zx0+GIe6MjblmaETalwqBhIWt4M1q/tn/q+LjYInFaS1gyTTMa+a61cmjuCWCODfbeDiT2LpJDulHDDhytA=="}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['289'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:39:29 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: '{"keyName": "key1"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account keys renew] + Connection: [keep-alive] + Content-Length: ['19'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/regenerateKey?api-version=2016-12-01 + response: + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"LVyluJ+ApH+yLzB+NXd2CbAqMoUfbwz3bSMI9tPJb1+O2m0CHon4YVmqEtGtpS74GxFlwaNxqr/++QyqV49oGQ=="},{"keyName":"key2","permissions":"Full","value":"aT5zx0+GIe6MjblmaETalwqBhIWt4M1q/tn/q+LjYInFaS1gyTTMa+a61cmjuCWCODfbeDiT2LpJDulHDDhytA=="}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['289'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:39:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: '{"keyName": "key2"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account keys renew] + Connection: [keep-alive] + Content-Length: ['19'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/regenerateKey?api-version=2016-12-01 + response: + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"LVyluJ+ApH+yLzB+NXd2CbAqMoUfbwz3bSMI9tPJb1+O2m0CHon4YVmqEtGtpS74GxFlwaNxqr/++QyqV49oGQ=="},{"keyName":"key2","permissions":"Full","value":"IidXrjwcdGBMdtlnqQmo36R+7ZvsAxzQVJ9PTUeSFo3j7wiOZD+0NpZC5p8/IjauchYjsLLuRS6b4USHKSDoTw=="}]} + +'} + headers: + cache-control: [no-cache] + content-length: ['289'] + content-type: [application/json] + date: ['Sat, 18 Mar 2017 20:39:33 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sat, 18 Mar 2017 20:39:35 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc5NDAyMDY5NDU1QzUxRDRCNUNCOUQxQUUyOUMwMDFENjc4OHxBNUJDMEI0QUIzM0E2OUEwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_show_usage.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_show_usage.yaml new file mode 100644 index 00000000000..cc3c927b08d --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_show_usage.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account show-usage] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/usages?api-version=2016-12-01 + response: + body: {string: "{\r\n \"value\": [\r\n {\r\n \"unit\": \"Count\",\r\n + \ \"currentValue\": 9,\r\n \"limit\": 250,\r\n \"name\": {\r\n + \ \"value\": \"StorageAccounts\",\r\n \"localizedValue\": \"Storage + Accounts\"\r\n }\r\n }\r\n ]\r\n}"} + headers: + cache-control: [no-cache] + content-length: ['217'] + content-type: [application/json] + date: ['Fri, 17 Mar 2017 23:11:18 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/recordings/test_storage_cors_scenario.yaml b/src/command_modules/azure-cli-storage/tests/recordings/test_storage_cors_scenario.yaml index 0be486b56b5..466355ed207 100644 --- a/src/command_modules/azure-cli-storage/tests/recordings/test_storage_cors_scenario.yaml +++ b/src/command_modules/azure-cli-storage/tests/recordings/test_storage_cors_scenario.yaml @@ -1,94 +1,175 @@ interactions: +- request: + body: '{"location": "westus", "tags": {"use": "az-test"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['50'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['326'] + content-type: [application/json; charset=utf-8] + date: ['Sun, 19 Mar 2017 04:09:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: '{"location": "westus", "sku": {"name": "Standard_LRS"}, "kind": "Storage"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['74'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2016-12-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sun, 19 Mar 2017 04:09:56 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/32248f96-2e08-46f0-aa95-ce0bf3b84007?monitor=true&api-version=2016-12-01'] + pragma: [no-cache] + retry-after: ['17'] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/operations/32248f96-2e08-46f0-aa95-ce0bf3b84007?monitor=true&api-version=2016-12-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002","kind":"Storage","location":"westus","name":"clitest000002","properties":{"creationTime":"2017-03-19T04:09:56.6681546Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","file":"https://clitest000002.file.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/"},"primaryLocation":"westus","provisioningState":"Succeeded","statusOfPrimary":"available"},"sku":{"name":"Standard_LRS","tier":"Standard"},"tags":{},"type":"Microsoft.Storage/storageAccounts"} + +'} + headers: + cache-control: [no-cache] + content-length: ['827'] + content-type: [application/json] + date: ['Sun, 19 Mar 2017 04:10:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account show-connection-string] Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.0 (Windows-10-10.0.15025-SP0) requests/2.9.1 msrest/0.4.4 - msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/TEST/0.1.1b3+dev] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 storagemanagementclient/0.31.0 Azure-SDK-For-Python AZURECLI/2.0.0+dev] accept-language: [en-US] - x-ms-client-request-id: [c4c81576-ee79-11e6-aaa8-5cf37075d24b] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cors_scenario_test/providers/Microsoft.Storage/storageAccounts/dummystorage/listKeys?api-version=2016-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2016-12-01 response: - body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"9ONs+1Kh3s78lYPe9AAXuAtliEpls5DrAry32lrPQfdcCmKeBJnWvcAh5ydnirJOWsVZb2Jr+OP0M4ZfGLwq4Q=="},{"keyName":"key2","permissions":"Full","value":"cfxO/jpMCKHKNjwW8B84DbK1f+eS2Vg6tb5Efv9wdKflNKw2sKJlH7n40KllZRe8Xq+0AlvsUpos701ldNbpBQ=="}]} + body: {string: '{"keys":[{"keyName":"key1","permissions":"Full","value":"QM5q/s13+KPitkulYQ7o++HnSuyLLC0D5+x+R40HJN3LTvsQHP0ASlYvsOcc/NVvYI2yk5685th2Pdcl6dIZSA=="},{"keyName":"key2","permissions":"Full","value":"iGt+glw93zCvu8wULRqKRZlsAEePHu8/2nlgBQLIDOEgOxljKrJ2h6BA7ipjr+bGND2bkLVG5juzm1lkbv0bCg=="}]} - '} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json] - Date: ['Thu, 09 Feb 2017 03:42:24 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] +'} + headers: + cache-control: [no-cache] content-length: ['289'] - x-ms-ratelimit-remaining-subscription-writes: ['1195'] + content-type: [application/json] + date: ['Sun, 19 Mar 2017 04:10:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:26 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:17 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.blob.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:26 GMT'] - Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:16 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:26 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:17 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.file.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:26 GMT'] - Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:17 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:26 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:17 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.queue.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Cache-Control: [no-cache] - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:26 GMT'] - Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:17 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -97,40 +178,38 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:26 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:18 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.table.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:26 GMT'] - Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:17 GMT'] + server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:27 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:18 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.blob.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:27 GMT'] - Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:18 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -141,38 +220,36 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['287'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:27 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:18 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.blob.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 03:42:27 GMT'] - Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + date: ['Sun, 19 Mar 2017 04:10:18 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 202, message: Accepted} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:27 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:18 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.file.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:27 GMT'] - Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:18 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -183,39 +260,37 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['287'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:27 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:19 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.file.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 03:42:27 GMT'] - Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + date: ['Sun, 19 Mar 2017 04:10:18 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 202, message: Accepted} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:28 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:19 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.queue.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Cache-Control: [no-cache] - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:28 GMT'] - Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:18 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -226,82 +301,78 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['287'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:28 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:19 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.queue.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 03:42:28 GMT'] - Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + date: ['Sun, 19 Mar 2017 04:10:18 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 202, message: Accepted} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:28 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:19 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.blob.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePOSThttp://example.com60"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePOSThttp://example.com60"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:28 GMT'] - Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] - Vary: [Origin] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:18 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + vary: [Origin] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:28 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:19 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.file.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0truetruetrue71.0falsefalsePOSThttp://example.com60"} + body: {string: "\uFEFF1.0truetruetrue71.0falsefalsePOSThttp://example.com60"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:28 GMT'] - Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] - Vary: [Origin] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:19 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + vary: [Origin] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:29 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:19 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.queue.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePOSThttp://example.com60"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePOSThttp://example.com60"} headers: - Cache-Control: [no-cache] - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:29 GMT'] - Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] - Vary: [Origin] + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:19 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + vary: [Origin] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -310,20 +381,19 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:29 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:19 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.table.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:28 GMT'] - Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:19 GMT'] + server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -333,18 +403,17 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['100'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:29 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:20 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.blob.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 03:42:29 GMT'] - Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + date: ['Sun, 19 Mar 2017 04:10:19 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 202, message: Accepted} - request: @@ -354,80 +423,76 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['100'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:29 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:20 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.file.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 03:42:29 GMT'] - Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + date: ['Sun, 19 Mar 2017 04:10:20 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 202, message: Accepted} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:30 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:21 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.blob.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:30 GMT'] - Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:20 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:30 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:21 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.file.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:30 GMT'] - Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:20 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:30 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:21 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.queue.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePOSThttp://example.com60"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePOSThttp://example.com60"} headers: - Cache-Control: [no-cache] - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:30 GMT'] - Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] - Vary: [Origin] + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:20 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] + vary: [Origin] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -436,20 +501,19 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:30 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:21 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.table.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:30 GMT'] - Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:20 GMT'] + server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -459,18 +523,17 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['100'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:31 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:21 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.blob.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 03:42:31 GMT'] - Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + date: ['Sun, 19 Mar 2017 04:10:20 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 202, message: Accepted} - request: @@ -480,18 +543,17 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['100'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:31 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:21 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.file.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 03:42:31 GMT'] - Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + date: ['Sun, 19 Mar 2017 04:10:21 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 202, message: Accepted} - request: @@ -501,79 +563,75 @@ interactions: headers: Connection: [keep-alive] Content-Length: ['100'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:31 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:21 GMT'] x-ms-version: ['2015-07-08'] method: PUT - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.queue.core.windows.net/?comp=properties&restype=service response: body: {string: ''} headers: - Date: ['Thu, 09 Feb 2017 03:42:31 GMT'] - Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + date: ['Sun, 19 Mar 2017 04:10:21 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 202, message: Accepted} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:32 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:22 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.blob.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.blob.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:32 GMT'] - Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:21 GMT'] + server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:32 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:22 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.file.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.file.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:31 GMT'] - Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:22 GMT'] + server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: body: null headers: Connection: [keep-alive] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:32 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:22 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.queue.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.queue.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Cache-Control: [no-cache] - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:32 GMT'] - Server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + cache-control: [no-cache] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:22 GMT'] + server: [Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} - request: @@ -582,20 +640,47 @@ interactions: Connection: [keep-alive] DataServiceVersion: [3.0;NetFx] MaxDataServiceVersion: ['3.0'] - User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.6.0; Windows 10) AZURECLI/0.1.1b3+dev] - x-ms-client-request-id: [b511567e-ee79-11e6-b542-5cf37075d24b] - x-ms-date: ['Thu, 09 Feb 2017 03:42:32 GMT'] + User-Agent: [Azure-Storage/0.33.0 (Python CPython 3.5.2; Darwin 16.4.0) AZURECLI/2.0.0+dev] + x-ms-date: ['Sun, 19 Mar 2017 04:10:22 GMT'] x-ms-version: ['2015-07-08'] method: GET - uri: https://dummystorage.table.core.windows.net/?restype=service&comp=properties + uri: https://clitest000002.table.core.windows.net/?comp=properties&restype=service response: - body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} + body: {string: "\uFEFF1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalse"} headers: - Content-Type: [application/xml] - Date: ['Thu, 09 Feb 2017 03:42:32 GMT'] - Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] - Transfer-Encoding: [chunked] + content-type: [application/xml] + date: ['Sun, 19 Mar 2017 04:10:21 GMT'] + server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] + transfer-encoding: [chunked] x-ms-version: ['2015-07-08'] status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.5.2 (Darwin-16.4.0-x86_64-i386-64bit) requests/2.9.1 msrest/0.4.6 + msrest_azure/0.4.7 resourcemanagementclient/0.30.2 Azure-SDK-For-Python + AZURECLI/2.0.0+dev] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2016-09-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Sun, 19 Mar 2017 04:10:23 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkcwRDJFQzIxQjZENEZDM0NDRURENEU0QkU5MjVDODg3ODI2RXw4MEQ0MkRBMUFFN0U1NzJCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01'] + pragma: [no-cache] + retry-after: ['15'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-storage/tests/test_storage.py b/src/command_modules/azure-cli-storage/tests/test_storage.py index d88e11f1d26..598c7753db2 100644 --- a/src/command_modules/azure-cli-storage/tests/test_storage.py +++ b/src/command_modules/azure-cli-storage/tests/test_storage.py @@ -30,136 +30,6 @@ def _get_connection_string(test): test.set_env('AZURE_STORAGE_CONNECTION_STRING', connection_string) -class StorageAccountScenarioTest(ResourceGroupVCRTestBase): - - def __init__(self, test_method): - super(StorageAccountScenarioTest, self).__init__(__file__, test_method, resource_group='test_storage_account_scenario') - if not self.playback: - self.account = 'vcrstorage{}'.format(random_string(12, digits_only=True)) - else: - from azure.cli.core.test_utils.vcr_test_base import MOCKED_STORAGE_ACCOUNT - self.account = MOCKED_STORAGE_ACCOUNT - - def test_storage_account_scenario(self): - self.execute() - - def body(self): - account = self.account - rg = self.resource_group - s = self - s.cmd('storage account check-name --name teststorageomega', checks=JMESPathCheck('nameAvailable', True)) - result = s.cmd('storage account check-name --name teststorageomega --query "nameAvailable" -o tsv') - assert result == 'true' - s.cmd('storage account create --sku Standard_LRS -l westus -n {} -g {}'.format(account, rg), checks=[ - JMESPathCheck('location', 'westus'), - JMESPathCheck('sku.name', 'Standard_LRS') - ]) - - s.cmd('storage account check-name --name {}'.format(account), checks=[ - JMESPathCheck('nameAvailable', False), - JMESPathCheck('reason', 'AlreadyExists') - ]) - s.cmd('storage account list -g {}'.format(rg, account), checks=[ - JMESPathCheck('[0].location', 'westus'), - JMESPathCheck('[0].sku.name', 'Standard_LRS'), - JMESPathCheck('[0].resourceGroup', rg) - ]) - s.cmd('storage account show --resource-group {} --name {}'.format(rg, account), checks=[ - JMESPathCheck('location', 'westus'), - JMESPathCheck('sku.name', 'Standard_LRS'), - JMESPathCheck('resourceGroup', rg) - ]) - s.cmd('storage account show-usage', checks=JMESPathCheck('name.value', 'StorageAccounts')) - s.cmd('storage account show-connection-string -g {} -n {} --protocol http'.format(rg, account), checks=[ - JMESPathCheck("contains(connectionString, 'https')", False), - JMESPathCheck("contains(connectionString, '{}')".format(account), True) - ]) - connection_string = s.cmd('storage account show-connection-string -g {} -n {} -otsv'.format(rg, account)) - - s.cmd('storage logging show --connection-string {}'.format(connection_string), checks=[ - JMESPathCheck('blob.read', False), - JMESPathCheck('blob.retentionPolicy.enabled', False) - ]) - s.cmd('storage logging update --services b --log r --retention 1 --service b --connection-string {}'.format(connection_string)) - s.cmd('storage logging show --connection-string {}'.format(connection_string), checks=[ - JMESPathCheck('blob.read', True), - JMESPathCheck('blob.retentionPolicy.enabled', True), - JMESPathCheck('blob.retentionPolicy.days', 1) - ]) - - s.cmd('storage metrics show --connection-string {}'.format(connection_string), checks=[ - JMESPathCheck('file.hour.enabled', True), - JMESPathCheck('file.minute.enabled', False), - ]) - s.cmd('storage metrics update --services f --hour false --retention 1 --connection-string {}'.format(connection_string)) - s.cmd('storage metrics show --connection-string {}'.format(connection_string), checks=[ - JMESPathCheck('file.hour.enabled', False), - JMESPathCheck('file.minute.enabled', False), - ]) - - # TODO: Re-enable this after figuring out why it won't play back successfully - # sas = s.cmd('storage account generate-sas --resource-types o --services b --expiry 2046-12-' - # '31T08:23Z --permissions r --https-only --account-name {}'.format(account)) - # sas_keys = dict(pair.split('=') for pair in sas.split('&')) - # assert u'sig' in sas_keys - - keys_result = s.cmd('storage account keys list -g {} -n {}'.format(rg, account)) - key1 = keys_result[0] - key2 = keys_result[1] - assert key1 and key2 - keys_result = s.cmd('storage account keys renew -g {} -n {} --key primary'.format(rg, account)) - renewed_key1 = keys_result[0] - renewed_key2 = keys_result[1] - assert key1 != renewed_key1 - assert key2 == renewed_key2 - key1 = renewed_key1 - keys_result = s.cmd('storage account keys renew -g {} -n {} --key secondary'.format(rg, account)) - assert key1 == keys_result[0] - assert key2 != keys_result[1] - s.cmd('storage account update -g {} -n {} --tags foo=bar cat'.format(rg, account), - checks=JMESPathCheck('tags', {'cat': '', 'foo': 'bar'})) - s.cmd('storage account update -g {} -n {} --sku Standard_GRS --tags'.format(rg, account), checks=[ - JMESPathCheck('tags', {}), - JMESPathCheck('sku.name', 'Standard_GRS') - ]) - s.cmd('storage account update -g {} -n {} --set tags.test=success'.format(rg, account), - checks=JMESPathCheck('tags', {'test': 'success'})) - s.cmd('storage account delete -g {} -n {} --yes'.format(rg, account)) - s.cmd('storage account check-name --name {}'.format(account), checks=JMESPathCheck('nameAvailable', True)) - result = s.cmd('storage account check-name --name teststorageomega --query "nameAvailable" -o tsv') - assert result == 'true' - - -class StorageCorsScenarioTest(StorageAccountVCRTestBase): - def __init__(self, test_method): - super(StorageCorsScenarioTest, self).__init__(__file__, test_method, resource_group='test_cors_scenario_test') - - def test_storage_cors_scenario(self): - self.execute() - - def body(self): - connection_string = self.cmd('storage account show-connection-string -n {} -g {} -otsv'.format( - self.account, self.resource_group)) - - self.cmd('storage cors list --connection-string {}'.format(connection_string), - checks=JMESPathCheck('length(@)', 0)) - - self.cmd('storage cors add --method POST --origins http://example.com --services bfq --max-age 60 --connection-string {}'.format(connection_string)) - - self.cmd('storage cors list --connection-string {}'.format(connection_string), - checks=JMESPathCheck('length(@)', 3)) - - self.cmd('storage cors clear --services bf --connection-string {}'.format(connection_string)) - - self.cmd('storage cors list --connection-string {}'.format(connection_string), - checks=JMESPathCheck('length(@)', 1)) - - self.cmd('storage cors clear --services bfq --connection-string {}'.format(connection_string)) - - self.cmd('storage cors list --connection-string {}'.format(connection_string), - checks=JMESPathCheck('length(@)', 0)) - - class StorageBlobScenarioTest(StorageAccountVCRTestBase): def __init__(self, test_method): diff --git a/src/command_modules/azure-cli-storage/tests/test_storage_account_scenarios.py b/src/command_modules/azure-cli-storage/tests/test_storage_account_scenarios.py new file mode 100644 index 00000000000..15e8688dd1d --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/test_storage_account_scenarios.py @@ -0,0 +1,140 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.testsdk import (ScenarioTest, JMESPathCheck, ResourceGroupPreparer, + StorageAccountPreparer) + + +class StorageAccountTests(ScenarioTest): + @ResourceGroupPreparer(parameter_name_for_location='location') + def test_create_storage_account(self, resource_group, location): + name = self.create_random_name(prefix='cli', length=24) + + self.cmd('az storage account create -n {} -g {} --sku {} -l {}'.format( + name, resource_group, 'Standard_LRS', location)) + + self.cmd('storage account check-name --name {}'.format(name), checks=[ + JMESPathCheck('nameAvailable', False), + JMESPathCheck('reason', 'AlreadyExists') + ]) + + self.cmd('storage account list -g {}'.format(resource_group, name), checks=[ + JMESPathCheck('[0].location', 'westus'), + JMESPathCheck('[0].sku.name', 'Standard_LRS'), + JMESPathCheck('[0].resourceGroup', resource_group) + ]) + + self.cmd('az storage account show -n {} -g {}'.format(name, resource_group), checks=[ + JMESPathCheck('name', name), + JMESPathCheck('location', location), + JMESPathCheck('sku.name', 'Standard_LRS'), + JMESPathCheck('kind', 'Storage') + ]) + + self.cmd('storage account show-connection-string -g {} -n {} --protocol http'.format( + resource_group, name), checks=[ + JMESPathCheck("contains(connectionString, 'https')", False), + JMESPathCheck("contains(connectionString, '{}')".format(name), True)]) + + self.cmd('storage account update -g {} -n {} --tags foo=bar cat' + .format(resource_group, name), + checks=JMESPathCheck('tags', {'cat': '', 'foo': 'bar'})) + self.cmd('storage account update -g {} -n {} --sku Standard_GRS --tags' + .format(resource_group, name), + checks=[JMESPathCheck('tags', {}), + JMESPathCheck('sku.name', 'Standard_GRS')]) + self.cmd('storage account update -g {} -n {} --set tags.test=success' + .format(resource_group, name), + checks=JMESPathCheck('tags', {'test': 'success'})) + self.cmd('storage account delete -g {} -n {} --yes'.format(resource_group, name)) + self.cmd('storage account check-name --name {}'.format(name), + checks=JMESPathCheck('nameAvailable', True)) + + def test_show_usage(self): + self.cmd('storage account show-usage', + checks=JMESPathCheck('name.value', 'StorageAccounts')) + + @ResourceGroupPreparer() + @StorageAccountPreparer() + def test_logging_operations(self, resource_group, storage_account): + connection_string = self.cmd( + 'storage account show-connection-string -g {} -n {} -otsv' + .format(resource_group, storage_account)).output + + self.cmd('storage logging show --connection-string {}'.format(connection_string), checks=[ + JMESPathCheck('blob.read', False), + JMESPathCheck('blob.retentionPolicy.enabled', False) + ]) + + self.cmd('storage logging update --services b --log r --retention 1 ' + '--service b --connection-string {}'.format(connection_string)) + + self.cmd('storage logging show --connection-string {}'.format(connection_string), checks=[ + JMESPathCheck('blob.read', True), + JMESPathCheck('blob.retentionPolicy.enabled', True), + JMESPathCheck('blob.retentionPolicy.days', 1) + ]) + + @ResourceGroupPreparer() + @StorageAccountPreparer() + def test_metrics_operations(self, resource_group, storage_account): + connection_string = self.cmd( + 'storage account show-connection-string -g {} -n {} -otsv' + .format(resource_group, storage_account)).output + + self.cmd('storage metrics show --connection-string {}'.format(connection_string), checks=[ + JMESPathCheck('file.hour.enabled', True), + JMESPathCheck('file.minute.enabled', False), + ]) + + self.cmd('storage metrics update --services f --hour false --retention 1 ' + '--connection-string {}'.format(connection_string)) + + self.cmd('storage metrics show --connection-string {}'.format(connection_string), checks=[ + JMESPathCheck('file.hour.enabled', False), + JMESPathCheck('file.minute.enabled', False), + ]) + + @ResourceGroupPreparer() + @StorageAccountPreparer(parameter_name='account_1') + @StorageAccountPreparer(parameter_name='account_2') + def test_list_storage_accounts(self, account_1, account_2): + accounts_list = self.cmd('az storage account list').get_output_in_json() + assert len(accounts_list) >= 2 + assert next(acc for acc in accounts_list if acc['name'] == account_1) + assert next(acc for acc in accounts_list if acc['name'] == account_2) + + @ResourceGroupPreparer() + @StorageAccountPreparer() + def test_renew_account_key(self, resource_group, storage_account): + original_keys = self.cmd('storage account keys list -g {} -n {}' + .format(resource_group, storage_account)).get_output_in_json() + # key1 = keys_result[0] + # key2 = keys_result[1] + assert original_keys[0] and original_keys[1] + + renewed_keys = self.cmd('storage account keys renew -g {} -n {} --key primary' + .format(resource_group, storage_account)).get_output_in_json() + assert renewed_keys[0] != original_keys[0] + assert renewed_keys[1] == original_keys[1] + + original_keys = renewed_keys + renewed_keys = self.cmd('storage account keys renew -g {} -n {} --key secondary' + .format(resource_group, storage_account)).get_output_in_json() + assert renewed_keys[0] == original_keys[0] + assert renewed_keys[1] != original_keys[1] + + @ResourceGroupPreparer() + @StorageAccountPreparer() + def test_create_account_sas(self, storage_account): + sas = self.cmd('storage account generate-sas --resource-types o --services b ' + '--expiry 2046-12-31T08:23Z --permissions r --https-only --account-name {}' + .format(storage_account)).output + sas_keys = dict(pair.split('=') for pair in sas.split('&')) + assert u'sig' in sas_keys + + def test_list_locations(self): + self.cmd('az account list-locations', + checks=[JMESPathCheck("[?name=='westus'].displayName | [0]", 'West US')]) diff --git a/src/command_modules/azure-cli-storage/tests/test_storage_cors_scenarios.py b/src/command_modules/azure-cli-storage/tests/test_storage_cors_scenarios.py new file mode 100644 index 00000000000..f50973d391d --- /dev/null +++ b/src/command_modules/azure-cli-storage/tests/test_storage_cors_scenarios.py @@ -0,0 +1,36 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.testsdk import (ScenarioTest, JMESPathCheck, ResourceGroupPreparer, + StorageAccountPreparer) + + +class StorageCorsTests(ScenarioTest): + @ResourceGroupPreparer() + @StorageAccountPreparer(parameter_name='account') + def test_storage_cors_scenario(self, resource_group, account): + connection_string = self.cmd('storage account show-connection-string -n {} -g {} -otsv' + .format(account, resource_group)).output + + self.cmd('storage cors list --connection-string {}'.format(connection_string), + checks=JMESPathCheck('length(@)', 0)) + + self.cmd('storage cors add --method POST --origins http://example.com --services bfq ' + '--max-age 60 --connection-string {}'.format(connection_string)) + + self.cmd('storage cors list --connection-string {}'.format(connection_string), + checks=JMESPathCheck('length(@)', 3)) + + self.cmd('storage cors clear --services bf --connection-string {}' + .format(connection_string)) + + self.cmd('storage cors list --connection-string {}'.format(connection_string), + checks=JMESPathCheck('length(@)', 1)) + + self.cmd('storage cors clear --services bfq --connection-string {}' + .format(connection_string)) + + self.cmd('storage cors list --connection-string {}'.format(connection_string), + checks=JMESPathCheck('length(@)', 0))