зеркало из https://github.com/microsoft/azure-cli.git
Make resource delete return the server response. (#1986)
This commit is contained in:
Родитель
7cea31e049
Коммит
f2819e212d
|
@ -344,6 +344,9 @@
|
|||
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vpn_connection\lib\version.py" />
|
||||
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vpn_connection\lib\vpn_connection_creation_client.py" />
|
||||
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vpn_connection\lib\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\test_dns_zone_import.py">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\test_network_commands.py" />
|
||||
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\__init__.py" />
|
||||
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\zone_file\configs.py" />
|
||||
|
@ -715,6 +718,7 @@
|
|||
<Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vpn_connection\lib\operations\" />
|
||||
<Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_express_route_circuit\" />
|
||||
<Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_traffic_manager_profile\" />
|
||||
<Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\" />
|
||||
<Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\zone_file\" />
|
||||
<Folder Include="command_modules\azure-cli-redis\" />
|
||||
<Folder Include="command_modules\azure-cli-redis\azure\" />
|
||||
|
@ -829,7 +833,13 @@
|
|||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vpn_connection\azuredeploy.json" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\mgmt_vpn_connection\swagger_create_vpn_connection.json" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\TestCert.pfx" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone.txt" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\merge1.txt" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\merge2.txt" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\zone1.txt" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\zone2.txt" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\zone3.txt" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\zone4.txt" />
|
||||
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\zone_files\zone5.txt" />
|
||||
<Content Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\sample_policy_rule.json" />
|
||||
<Content Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\simple_deploy.json" />
|
||||
<Content Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\simple_deploy_parameters.json" />
|
||||
|
|
|
@ -22,10 +22,8 @@ from azure.cli.command_modules.resource._client_factory import (_resource_client
|
|||
def transform_resource_group_list(result):
|
||||
return [OrderedDict([('Name', r['name']), \
|
||||
('Location', r['location']), ('Status', r['properties']['provisioningState'])]) for r in result]
|
||||
cli_command(__name__, 'group delete',
|
||||
'azure.mgmt.resource.resources.operations.resource_groups_operations#ResourceGroupsOperations.delete',
|
||||
cf_resource_groups,
|
||||
no_wait_param='raw', confirmation=True)
|
||||
|
||||
cli_command(__name__, 'group delete', 'azure.mgmt.resource.resources.operations.resource_groups_operations#ResourceGroupsOperations.delete', cf_resource_groups, no_wait_param='raw', confirmation=True)
|
||||
cli_generic_wait_command(__name__, 'group wait', 'azure.mgmt.resource.resources.operations.resource_groups_operations#ResourceGroupsOperations.get', cf_resource_groups)
|
||||
cli_command(__name__, 'group show', 'azure.mgmt.resource.resources.operations.resource_groups_operations#ResourceGroupsOperations.get', cf_resource_groups)
|
||||
cli_command(__name__, 'group exists', 'azure.mgmt.resource.resources.operations.resource_groups_operations#ResourceGroupsOperations.check_existence', cf_resource_groups)
|
||||
|
@ -115,5 +113,3 @@ cli_command(__name__, 'lock delete', 'azure.cli.command_modules.resource.custom#
|
|||
cli_command(__name__, 'lock list', 'azure.cli.command_modules.resource.custom#list_locks')
|
||||
cli_command(__name__, 'lock show', 'azure.cli.command_modules.resource.custom#get_lock')
|
||||
cli_command(__name__, 'lock update', 'azure.cli.command_modules.resource.custom#update_lock')
|
||||
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ def delete_resource(resource_group_name=None, resource_provider_namespace=None,
|
|||
res = _ResourceUtils(resource_group_name, resource_provider_namespace,
|
||||
parent_resource_path, resource_type, resource_name,
|
||||
resource_id, api_version)
|
||||
res.delete()
|
||||
return res.delete()
|
||||
|
||||
def tag_resource(tags, resource_group_name=None, resource_provider_namespace=None,
|
||||
parent_resource_path=None, resource_type=None, resource_name=None,
|
||||
|
@ -560,9 +560,9 @@ class _ResourceUtils(object): #pylint: disable=too-many-instance-attributes
|
|||
|
||||
def delete(self):
|
||||
if self.resource_id:
|
||||
self.rcf.resources.delete_by_id(self.resource_id, self.api_version)
|
||||
return self.rcf.resources.delete_by_id(self.resource_id, self.api_version)
|
||||
else:
|
||||
self.rcf.resources.delete(self.resource_group_name,
|
||||
return self.rcf.resources.delete(self.resource_group_name,
|
||||
self.resource_provider_namespace,
|
||||
self.parent_resource_path or '',
|
||||
self.resource_type,
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче