зеркало из https://github.com/microsoft/azure-cli.git
Update _resolve_tags method. Add automated tests.
This commit is contained in:
Родитель
778909bf89
Коммит
ee1d0ed85b
|
@ -42,6 +42,7 @@
|
|||
<Compile Include="azure\cli\extensions\transform.py" />
|
||||
<Compile Include="azure\cli\extensions\__init__.py" />
|
||||
<Compile Include="azure\cli\main.py" />
|
||||
<Compile Include="azure\cli\tests\command_specs\test_spec_storage_account.py" />
|
||||
<Compile Include="azure\cli\tests\command_specs\test_spec_network.py" />
|
||||
<Compile Include="azure\cli\tests\command_specs\test_spec_resource.py" />
|
||||
<Compile Include="azure\cli\tests\command_specs\test_spec_vm.py" />
|
||||
|
@ -79,7 +80,6 @@
|
|||
<Folder Include="azure\cli\extensions\" />
|
||||
<Folder Include="azure\cli\tests\" />
|
||||
<Folder Include="azure\cli\tests\command_specs\" />
|
||||
<Folder Include="azure\cli\tests\recordings\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Interpreter Include="..\env\">
|
||||
|
@ -94,12 +94,6 @@
|
|||
<Architecture>X86</Architecture>
|
||||
</Interpreter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="azure\cli\tests\recordings\command_specs.test_spec_network.test_network_usage_list.yaml" />
|
||||
<Content Include="azure\cli\tests\recordings\command_specs.test_spec_resource.test_resource_group_list.yaml" />
|
||||
<Content Include="azure\cli\tests\recordings\command_specs.test_spec_vm.test_vm_usage_list_westus.yaml" />
|
||||
<Content Include="azure\cli\tests\recordings\README.rst" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(PtvsTargetsFile)" Condition="Exists($(PtvsTargetsFile))" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="!Exists($(PtvsTargetsFile))" />
|
||||
</Project>
|
|
@ -130,7 +130,7 @@ def create_account(args, unexpected): #pylint: disable=unused-argument
|
|||
account_type,
|
||||
_resolve_tags(args))
|
||||
|
||||
return smc.storage_accounts.create(resource_group, account_name, params)
|
||||
return smc.storage_accounts.create(resource_group, account_name, params)
|
||||
|
||||
@command('storage account set')
|
||||
@description(L('Update storage account property (only one at a time).'))
|
||||
|
@ -605,15 +605,10 @@ def _get_file_service_client(args):
|
|||
|
||||
def _resolve_tags(args):
|
||||
tag_string = args.get('tags')
|
||||
if tag_string:
|
||||
tags = dict()
|
||||
for tag in tag_string.split(';'):
|
||||
comps = tag.split('=', 1)
|
||||
key = comps[0]
|
||||
value = comps[1] if len(comps) > 1 else ''
|
||||
tags[key] = value
|
||||
else:
|
||||
tags = None
|
||||
kv_tags = [x for x in tag_string.split(';') if '=' in x] # key-value tags
|
||||
s_tags = [x for x in tag_string.split(';') if '=' not in x] # single value tags
|
||||
tags = dict(x.split('=') for x in kv_tags)
|
||||
tags.update(dict((x, '') for x in s_tags))
|
||||
return tags
|
||||
|
||||
# TODO: Remove once these parameters are supported first-class by @option (task #116054675)
|
||||
|
|
|
@ -2,6 +2,7 @@ __all__ = [
|
|||
'test_spec_network',
|
||||
'test_spec_resource',
|
||||
'test_spec_vm',
|
||||
'test_spec_account'
|
||||
]
|
||||
|
||||
# Each test spec in this package can append to this variable to add test specs
|
||||
|
|
|
@ -0,0 +1,407 @@
|
|||
spec = [
|
||||
{
|
||||
'test_name': 'test_storage_account_list',
|
||||
'command': 'storage account list',
|
||||
'expected_result': """Account Type : Standard_LRS
|
||||
Creation Time : 2016-03-03T23:07:20.837674+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/default-applicationinsights-centralus/providers/Microsoft.Storage/storageAccounts/appinsightsstorage2016
|
||||
Last Geo Failover Time : None
|
||||
Location : centralus
|
||||
Name : appinsightsstorage2016
|
||||
Primary Location : centralus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : default-applicationinsights-centralus
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://appinsightsstorage2016.blob.core.windows.net/
|
||||
File : https://appinsightsstorage2016.file.core.windows.net/
|
||||
Queue : https://appinsightsstorage2016.queue.core.windows.net/
|
||||
Table : https://appinsightsstorage2016.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-03-07T04:09:26.379536+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/ygvmgroup/providers/Microsoft.Storage/storageAccounts/cli0816b4e1a25171aa14573
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : cli0816b4e1a25171aa14573
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : ygvmgroup
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://cli0816b4e1a25171aa14573.blob.core.windows.net/
|
||||
File : https://cli0816b4e1a25171aa14573.file.core.windows.net/
|
||||
Queue : https://cli0816b4e1a25171aa14573.queue.core.windows.net/
|
||||
Table : https://cli0816b4e1a25171aa14573.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-03-07T04:18:40.989042+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/ygvmgroup/providers/Microsoft.Storage/storageAccounts/cli65f4f2b090a22ac614573
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : cli65f4f2b090a22ac614573
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : ygvmgroup
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://cli65f4f2b090a22ac614573.blob.core.windows.net/
|
||||
File : https://cli65f4f2b090a22ac614573.file.core.windows.net/
|
||||
Queue : https://cli65f4f2b090a22ac614573.queue.core.windows.net/
|
||||
Table : https://cli65f4f2b090a22ac614573.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-03-07T04:45:44.904553+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/ygvmgroup/providers/Microsoft.Storage/storageAccounts/clie22217d8c158bd9e14573
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : clie22217d8c158bd9e14573
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : ygvmgroup
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://clie22217d8c158bd9e14573.blob.core.windows.net/
|
||||
File : https://clie22217d8c158bd9e14573.file.core.windows.net/
|
||||
Queue : https://clie22217d8c158bd9e14573.queue.core.windows.net/
|
||||
Table : https://clie22217d8c158bd9e14573.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_GRS
|
||||
Creation Time : 2016-01-20T23:24:46.225618+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clutst40026/providers/Microsoft.Storage/storageAccounts/clutst20236sto
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : clutst20236sto
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : clutst40026
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : eastus
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : Available
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://clutst20236sto.blob.core.windows.net/
|
||||
File : https://clutst20236sto.file.core.windows.net/
|
||||
Queue : https://clutst20236sto.queue.core.windows.net/
|
||||
Table : https://clutst20236sto.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_GRS
|
||||
Creation Time : 2016-01-21T02:32:09.401535+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clutst41390/providers/Microsoft.Storage/storageAccounts/clutst24982sto
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : clutst24982sto
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : clutst41390
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : eastus
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : Available
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://clutst24982sto.blob.core.windows.net/
|
||||
File : https://clutst24982sto.file.core.windows.net/
|
||||
Queue : https://clutst24982sto.queue.core.windows.net/
|
||||
Table : https://clutst24982sto.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_GRS
|
||||
Creation Time : 2016-01-20T23:11:54.956920+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clutst74333/providers/Microsoft.Storage/storageAccounts/clutst68029sto
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : clutst68029sto
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : clutst74333
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : eastus
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : Available
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://clutst68029sto.blob.core.windows.net/
|
||||
File : https://clutst68029sto.file.core.windows.net/
|
||||
Queue : https://clutst68029sto.queue.core.windows.net/
|
||||
Table : https://clutst68029sto.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_GRS
|
||||
Creation Time : 2016-01-24T04:30:40.942489+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clutst86517/providers/Microsoft.Storage/storageAccounts/clutst74246sto
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : clutst74246sto
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : clutst86517
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : eastus
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : Available
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://clutst74246sto.blob.core.windows.net/
|
||||
File : https://clutst74246sto.file.core.windows.net/
|
||||
Queue : https://clutst74246sto.queue.core.windows.net/
|
||||
Table : https://clutst74246sto.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_GRS
|
||||
Creation Time : 2016-01-20T23:06:56.384289+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/clutst29333/providers/Microsoft.Storage/storageAccounts/clutst79708sto
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : clutst79708sto
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : clutst29333
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : eastus
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : Available
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://clutst79708sto.blob.core.windows.net/
|
||||
File : https://clutst79708sto.file.core.windows.net/
|
||||
Queue : https://clutst79708sto.queue.core.windows.net/
|
||||
Table : https://clutst79708sto.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-01-27T19:19:44.825146+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/destanko-test1/providers/Microsoft.Storage/storageAccounts/destanko123
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : destanko123
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : destanko-test1
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://destanko123.blob.core.windows.net/
|
||||
File : https://destanko123.file.core.windows.net/
|
||||
Queue : https://destanko123.queue.core.windows.net/
|
||||
Table : https://destanko123.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_RAGRS
|
||||
Creation Time : 2016-03-05T00:25:04.704573+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/r1/providers/Microsoft.Storage/storageAccounts/stoga2016
|
||||
Last Geo Failover Time : None
|
||||
Location : centralus
|
||||
Name : stoga2016
|
||||
Primary Location : centralus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : r1
|
||||
Secondary Location : eastus2
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : Available
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://stoga2016.blob.core.windows.net/
|
||||
File : https://stoga2016.file.core.windows.net/
|
||||
Queue : https://stoga2016.queue.core.windows.net/
|
||||
Table : https://stoga2016.table.core.windows.net/
|
||||
Secondary Endpoints :
|
||||
Blob : https://stoga2016-secondary.blob.core.windows.net/
|
||||
File : None
|
||||
Queue : https://stoga2016-secondary.queue.core.windows.net/
|
||||
Table : https://stoga2016-secondary.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-03-15T23:03:02.798406+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/travistestresourcegroup/providers/Microsoft.Storage/storageAccounts/travistestresourcegr3014
|
||||
Last Geo Failover Time : None
|
||||
Location : westus
|
||||
Name : travistestresourcegr3014
|
||||
Primary Location : westus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : travistestresourcegroup
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://travistestresourcegr3014.blob.core.windows.net/
|
||||
File : https://travistestresourcegr3014.file.core.windows.net/
|
||||
Queue : https://travistestresourcegr3014.queue.core.windows.net/
|
||||
Table : https://travistestresourcegr3014.table.core.windows.net/
|
||||
Tags :
|
||||
Magic : cat
|
||||
Woot : doot
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-02-29T12:20:49.272057+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/xplattestgvmdocker6705/providers/Microsoft.Storage/storageAccounts/xplatstdocker7379
|
||||
Last Geo Failover Time : None
|
||||
Location : eastus
|
||||
Name : xplatstdocker7379
|
||||
Primary Location : eastus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : xplattestgvmdocker6705
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://xplatstdocker7379.blob.core.windows.net/
|
||||
File : https://xplatstdocker7379.file.core.windows.net/
|
||||
Queue : https://xplatstdocker7379.queue.core.windows.net/
|
||||
Table : https://xplatstdocker7379.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-02-18T16:05:59.465716+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/xplattestgvmdocker2951/providers/Microsoft.Storage/storageAccounts/xplatstdocker8501
|
||||
Last Geo Failover Time : None
|
||||
Location : eastus
|
||||
Name : xplatstdocker8501
|
||||
Primary Location : eastus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : xplattestgvmdocker2951
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://xplatstdocker8501.blob.core.windows.net/
|
||||
File : https://xplatstdocker8501.file.core.windows.net/
|
||||
Queue : https://xplatstdocker8501.queue.core.windows.net/
|
||||
Table : https://xplatstdocker8501.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-02-29T08:05:22.187272+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/xplattestgextension5940/providers/Microsoft.Storage/storageAccounts/xplatstoragext2929
|
||||
Last Geo Failover Time : None
|
||||
Location : eastus
|
||||
Name : xplatstoragext2929
|
||||
Primary Location : eastus
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : xplattestgextension5940
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://xplatstoragext2929.blob.core.windows.net/
|
||||
File : https://xplatstoragext2929.file.core.windows.net/
|
||||
Queue : https://xplatstoragext2929.queue.core.windows.net/
|
||||
Table : https://xplatstoragext2929.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
Account Type : Standard_LRS
|
||||
Creation Time : 2016-01-21T23:39:02.480290+00:00
|
||||
Custom Domain : None
|
||||
Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/xplattestgextension9085/providers/Microsoft.Storage/storageAccounts/xplatstoragext4633
|
||||
Last Geo Failover Time : None
|
||||
Location : southeastasia
|
||||
Name : xplatstoragext4633
|
||||
Primary Location : southeastasia
|
||||
Provisioning State : Succeeded
|
||||
Resource Group : xplattestgextension9085
|
||||
Secondary Endpoints : None
|
||||
Secondary Location : None
|
||||
Status Of Primary : Available
|
||||
Status Of Secondary : None
|
||||
Type : Microsoft.Storage/storageAccounts
|
||||
Primary Endpoints :
|
||||
Blob : https://xplatstoragext4633.blob.core.windows.net/
|
||||
File : https://xplatstoragext4633.file.core.windows.net/
|
||||
Queue : https://xplatstoragext4633.queue.core.windows.net/
|
||||
Table : https://xplatstoragext4633.table.core.windows.net/
|
||||
Tags :
|
||||
None
|
||||
|
||||
|
||||
"""
|
||||
},
|
||||
{
|
||||
'test_name': 'test_storage_account_usage',
|
||||
'command': 'storage account usage',
|
||||
'expected_result': """Current Value : 16
|
||||
Limit : 100
|
||||
Unit : Count
|
||||
Name :
|
||||
Localized Value : Storage Accounts
|
||||
Value : StorageAccounts
|
||||
|
||||
|
||||
"""
|
||||
},
|
||||
{
|
||||
'test_name': 'test_storage_account_check',
|
||||
'command': 'storage account check-name-availability --name travisteststorageaccount',
|
||||
'expected_result': """Message : None
|
||||
Name Available : True
|
||||
Reason : None
|
||||
|
||||
|
||||
"""
|
||||
}
|
||||
]
|
||||
|
||||
from . import TEST_SPECS
|
||||
TEST_SPECS.append((locals()['__name__'], spec))
|
|
@ -0,0 +1,64 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: !!binary |
|
||||
eyJuYW1lIjogInRyYXZpc3Rlc3RzdG9yYWdlYWNjb3VudCIsICJ0eXBlIjogIk1pY3Jvc29mdC5T
|
||||
dG9yYWdlL3N0b3JhZ2VBY2NvdW50cyJ9
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['81']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.5.1 requests/2.9.1 msrest/0.1.3 msrest_azure/0.1.2 storagemanagementclient/2015-06-15
|
||||
Azure-SDK-For-Python AZURECLI_0.0.1]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2015-06-15
|
||||
response:
|
||||
body: {string: '{"error":{"code":"BadGatewayConnection","message":"The network
|
||||
connectivity issue encountered for ''Microsoft.Storage''; cannot fulfill the
|
||||
request."}}'}
|
||||
headers:
|
||||
Cache-Control: [no-cache]
|
||||
Connection: [close]
|
||||
Content-Length: ['149']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
Date: ['Thu, 24 Mar 2016 21:57:10 GMT']
|
||||
Expires: ['-1']
|
||||
Pragma: [no-cache]
|
||||
Strict-Transport-Security: [max-age=31536000; includeSubDomains]
|
||||
x-ms-failure-cause: [service]
|
||||
status: {code: 502, message: Bad Gateway}
|
||||
- request:
|
||||
body: !!binary |
|
||||
eyJuYW1lIjogInRyYXZpc3Rlc3RzdG9yYWdlYWNjb3VudCIsICJ0eXBlIjogIk1pY3Jvc29mdC5T
|
||||
dG9yYWdlL3N0b3JhZ2VBY2NvdW50cyJ9
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['81']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.5.1 requests/2.9.1 msrest/0.1.3 msrest_azure/0.1.2 storagemanagementclient/2015-06-15
|
||||
Azure-SDK-For-Python AZURECLI_0.0.1]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2015-06-15
|
||||
response:
|
||||
body:
|
||||
string: !!binary |
|
||||
H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
|
||||
VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xR8ts
|
||||
kR9fZkWZTcr8o0dtvc5/SfL/AAeYVbAXAAAA
|
||||
headers:
|
||||
Cache-Control: [no-cache]
|
||||
Content-Encoding: [gzip]
|
||||
Content-Type: [application/json]
|
||||
Date: ['Thu, 24 Mar 2016 21:57: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]
|
||||
Vary: [Accept-Encoding]
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
|
@ -0,0 +1,64 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.5.1 requests/2.9.1 msrest/0.1.3 msrest_azure/0.1.2 storagemanagementclient/2015-06-15
|
||||
Azure-SDK-For-Python AZURECLI_0.0.1]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts?api-version=2015-06-15
|
||||
response:
|
||||
body:
|
||||
string: !!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q+J61WdamobniLOr9ZcjdYjnvbu/fZH6L/7Y0fPDzY3/n0tnI7hNYwb0JabwMA7aIAmHFv
|
||||
A4EbRkEw994GBDeMgCA2V+J4TG6njCaEwNGHQwJPn4HLYzJAkNXafLTILoopfUkd0EtXVdXSHzP8
|
||||
QCOZ3xvZjdp+c4bo3arMWpCJFoxm1fRtXn/6YOf+e3E/g2haefsBLajT0Dy2F0VBnynbx5pTdx/E
|
||||
73vbew/f7O492qPA9uGYBrtz/8HOLfm9h8+tGb3/JhpE32TG3fgqt4i+2zIXbXqXW0TeJaZSAng8
|
||||
beeDiP4N8DR+k4m6kVPorZ9Nxt17eP/9vCoGYQh5cH9nlwZ9W8bV5tTdBzLu7sGb3U8f7dx/dJ9y
|
||||
6J/ef7D76W0D1x4+X49x+U00iL7JbLnxVW4RfbdlVtn0LreIvEtMpQT4/zPj5u/afIlx3H+4/37r
|
||||
PgxDP3xHyZo9KNGbWTdsTx1+IO+S0t05AO/u7Y13Dx7QkG/rZPQRel/m9V9Fi+irzJub3+Um0Zdb
|
||||
ZpiNL3OTyMvEW0qEnxf8+3Dn4Gu5DPzhu3b/03tIl3j8Sx22c9Ara4qMvoqysb5G/X4QG1OWZRe+
|
||||
8r2H8JX3sSKy8/XYGAh9TTbmV9Ei+irz6OZ3uUn05Zb5ZuPL3CTyMrGYEsFj4+7cEP1/2Nz8/V+S
|
||||
/D/tStZTzS0AAA==
|
||||
headers:
|
||||
Cache-Control: [no-cache]
|
||||
Content-Encoding: [gzip]
|
||||
Content-Type: [application/json]
|
||||
Date: ['Thu, 24 Mar 2016 21:57: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]
|
||||
Vary: [Accept-Encoding]
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
|
@ -0,0 +1,33 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Connection: [keep-alive]
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.5.1 requests/2.9.1 msrest/0.1.3 msrest_azure/0.1.2 storagemanagementclient/2015-06-15
|
||||
Azure-SDK-For-Python AZURECLI_0.0.1]
|
||||
accept-language: [en-US]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/usages?api-version=2015-06-15
|
||||
response:
|
||||
body:
|
||||
string: !!binary |
|
||||
H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcpl
|
||||
VmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7xb5yk
|
||||
6UeXWbnOP3qUfg9/pSl/iOej9bJo6fOPTqr1sv1oZD+frus6X7Y/qe/tfuq+KosFv7O7s+M+XGYL
|
||||
tLOA6SPT50ev26rOLvLj6RSdNK4XalRW06wsfpDPTE+mdWqbm9a/RH7hH9//jZNf8v8A3pREK9oA
|
||||
AAA=
|
||||
headers:
|
||||
Cache-Control: [no-cache]
|
||||
Content-Encoding: [gzip]
|
||||
Content-Type: [application/json]
|
||||
Date: ['Thu, 24 Mar 2016 21:57:20 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]
|
||||
Vary: [Accept-Encoding]
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
|
@ -0,0 +1,4 @@
|
|||
@echo off
|
||||
cd src
|
||||
python -m unittest discover -s azure\cli\tests
|
||||
cd..
|
Загрузка…
Ссылка в новой задаче