Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
095b3f9
update SDK version.
Tiano2017 Sep 30, 2019
4caf537
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Sep 30, 2019
c3a4b58
Refactor az deployment commands.
Tiano2017 Oct 4, 2019
432c2e9
record tests.
Tiano2017 Oct 4, 2019
c006d43
test recordings.
Tiano2017 Oct 5, 2019
2d6cb8d
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Oct 7, 2019
d9863fb
test recordings.
Tiano2017 Oct 9, 2019
87f5ff2
more recordings.
Tiano2017 Oct 10, 2019
8572bf6
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Oct 10, 2019
d33db76
more recordings.
Tiano2017 Oct 11, 2019
4734036
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Oct 11, 2019
458bbca
more recordings.
Tiano2017 Oct 12, 2019
282710b
more recordings.
Tiano2017 Oct 13, 2019
9c58de5
more recordings.
Tiano2017 Oct 14, 2019
af06e49
short parametes.
Tiano2017 Oct 14, 2019
80f9fb9
fix style and linter issues.
Tiano2017 Oct 15, 2019
f3ea38e
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Oct 15, 2019
0bbf8ba
fix linter failure.
Tiano2017 Oct 15, 2019
16b4645
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Oct 15, 2019
7bd0782
recording.
Tiano2017 Oct 15, 2019
844ba11
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Oct 15, 2019
c53d069
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Dec 2, 2019
ea2b273
resolve conflicts.
Tiano2017 Dec 2, 2019
1dcd3dd
revert changes that are not needed.
Tiano2017 Dec 3, 2019
ff28c45
refactor.
Tiano2017 Dec 6, 2019
f0ce838
clean up.
Tiano2017 Dec 6, 2019
86e02e1
fix help.
Tiano2017 Dec 6, 2019
5b913c0
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Dec 13, 2019
1da1d49
create parameter types.
Tiano2017 Dec 13, 2019
d24145c
refactor.
Tiano2017 Dec 14, 2019
c9080cb
fix style.
Tiano2017 Dec 16, 2019
5e92470
test recordings.
Tiano2017 Dec 16, 2019
0e03020
more recordings.
Tiano2017 Dec 17, 2019
7e37f3d
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Dec 19, 2019
58f2a5a
fixes.
Tiano2017 Dec 23, 2019
1e0980c
Fix deployment manager test.
Tiano2017 Jan 7, 2020
0c1fc1f
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Jan 7, 2020
c6a4ab5
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Jan 7, 2020
75acad1
address comments.
Tiano2017 Jan 17, 2020
40a69f9
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Jan 18, 2020
849eac9
fix for handle-extended-json-format
Tiano2017 Jan 21, 2020
53e18e6
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Jan 21, 2020
b7affe8
Fix tests.
Tiano2017 Jan 21, 2020
7a6853e
dummy change.
Tiano2017 Jan 22, 2020
f5c8c58
fix style.
Tiano2017 Jan 23, 2020
4f93025
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Feb 1, 2020
e19f0ff
merge and resolve conflicts.
Tiano2017 Feb 4, 2020
a808d26
record test.
Tiano2017 Feb 4, 2020
302e52a
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Feb 4, 2020
430ab92
trigger CI run again.
Tiano2017 Feb 4, 2020
ee17865
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Feb 5, 2020
1e1b69b
Fix change history.
Tiano2017 Feb 5, 2020
15e6645
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Feb 7, 2020
1d0895f
Use ResourceGroupPreparer for deployment test at resource group
Tiano2017 Feb 8, 2020
c7ad2a5
fix style.
Tiano2017 Feb 10, 2020
a6b8df0
revert changes in HISTORY.rst
Tiano2017 Feb 10, 2020
2d3fbbe
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Feb 11, 2020
ab8aac8
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Feb 14, 2020
9753fc1
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Feb 14, 2020
c10d6a2
fix linter.
Tiano2017 Feb 14, 2020
65d7231
record test.
Tiano2017 Feb 14, 2020
a3d3e93
Merge remote-tracking branch 'Azure/dev' into tiano-tenant-deployment
Tiano2017 Feb 17, 2020
3e9459f
refactor.
Tiano2017 Feb 19, 2020
30c4c7a
fix min_api and add deprecate info.
Tiano2017 Feb 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
546 changes: 515 additions & 31 deletions src/azure-cli/azure/cli/command_modules/resource/_help.py

Large diffs are not rendered by default.

73 changes: 66 additions & 7 deletions src/azure-cli/azure/cli/command_modules/resource/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ def load_arguments(self, _):
with self.argument_context('group deployment') as c:
c.argument('resource_group_name', arg_type=resource_group_name_type, completer=get_resource_group_completion_list)
c.argument('deployment_name', options_list=['--name', '-n'], required=True, help='The deployment name.')
c.argument('template_file', completer=FilesCompleter(), type=file_type, help="a template file path in the file system")
c.argument('template_uri', help='a uri to a remote template file')
c.argument('template_file', options_list=['--template-file', '-f'], completer=FilesCompleter(), type=file_type, help="a template file path in the file system")
c.argument('template_uri', options_list=['--template-uri', '-u'], help='a uri to a remote template file')
c.argument('mode', arg_type=get_enum_type(DeploymentMode, default='incremental'), help='Incremental (only add resources to resource group) or Complete (remove extra resources from resource group)')
c.argument('parameters', action='append', nargs='+', completer=FilesCompleter())
c.argument('parameters', options_list=['--parameters', '-p'], action='append', nargs='+', completer=FilesCompleter())
c.argument('rollback_on_error', nargs='?', action=RollbackAction, help='The name of a deployment to roll back to on error, or use as a flag to roll back to the last successful deployment.')

with self.argument_context('group deployment create') as c:
Expand All @@ -191,21 +191,80 @@ def load_arguments(self, _):
with self.argument_context('deployment') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=True, help='The deployment name.')
c.argument('deployment_location', arg_type=get_location_type(self.cli_ctx), required=True)
c.argument('template_file', completer=FilesCompleter(), type=file_type, help="a template file path in the file system")
c.argument('template_uri', help='a uri to a remote template file')
c.argument('parameters', action='append', nargs='+', completer=FilesCompleter())
c.argument('template_file', options_list=['--template-file', '-f'], completer=FilesCompleter(), type=file_type, help="a template file path in the file system")
c.argument('template_uri', options_list=['--template-uri', '-u'], help='a uri to a remote template file')
c.argument('parameters', options_list=['--parameters', '-p'], action='append', nargs='+', completer=FilesCompleter(), help='the deployment parameters')

with self.argument_context('deployment create') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('deployment validate') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('deployment operation show') as c:
with self.argument_context('deployment operation') as c:
c.argument('operation_ids', nargs='+', help='A list of operation ids to show')
Comment thread
zhoxing-ms marked this conversation as resolved.

with self.argument_context('deployment sub') as c:
c.argument('deployment_location', arg_type=get_location_type(self.cli_ctx), required=True)

with self.argument_context('deployment sub create') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('deployment sub validate') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('deployment group') as c:
c.argument('resource_group_name', arg_type=resource_group_name_type, completer=get_resource_group_completion_list, required=True)
c.argument('mode', arg_type=get_enum_type(DeploymentMode, default='incremental'), help='Incremental (only add resources to resource group) or Complete (remove extra resources from resource group)')

with self.argument_context('deployment group create') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('deployment group validate') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('deployment mg') as c:
Comment thread
Tiano2017 marked this conversation as resolved.
c.argument('management_group_id', options_list=['--management-group-id', '-m'], required=True, help='The management group id.')
c.argument('deployment_location', arg_type=get_location_type(self.cli_ctx), required=True)

with self.argument_context('deployment mg create') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('deployment mg validate') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)
Comment thread
Tiano2017 marked this conversation as resolved.

with self.argument_context('deployment operation mg') as c:
c.argument('management_group_id', options_list=['--management-group-id', '-m'], required=True, help='The management group id.')

with self.argument_context('deployment tenant') as c:
c.argument('deployment_location', arg_type=get_location_type(self.cli_ctx), required=True)

with self.argument_context('deployment tenant create') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('deployment tenant validate') as c:
c.argument('deployment_name', options_list=['--name', '-n'], required=False,
help='The deployment name. Default to template file base name')
c.argument('handle_extended_json_format', arg_type=extended_json_format_type)

with self.argument_context('group export') as c:
c.argument('include_comments', action='store_true')
c.argument('include_parameter_default_value', action='store_true')
Expand Down
12 changes: 6 additions & 6 deletions src/azure-cli/azure/cli/command_modules/resource/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
MSI_LOCAL_ID = '[system]'


def process_deployment_create_namespace(namespace):
if bool(namespace.template_uri) == bool(namespace.template_file):
raise CLIError('incorrect usage: --template-file FILE | --template-uri URI')
_validate_deployment_name(namespace)


def _validate_deployment_name(namespace):
# If missing,try come out with a name associated with the template name
if namespace.deployment_name is None:
Expand All @@ -31,12 +37,6 @@ def _validate_deployment_name(namespace):
namespace.deployment_name = 'deployment1'


def process_deployment_create_namespace(namespace):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems no change this file, can you revert this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. updated.

if bool(namespace.template_uri) == bool(namespace.template_file):
raise CLIError('incorrect usage: --template-file FILE | --template-uri URI')
_validate_deployment_name(namespace)


def internal_validate_lock_parameters(namespace, resource_group, resource_provider_namespace,
parent_resource_path, resource_type, resource_name):
if resource_group is None:
Expand Down
78 changes: 73 additions & 5 deletions src/azure-cli/azure/cli/command_modules/resource/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def load_command_table(self, _):
g.command('add-value', 'create_or_update_value')
g.command('remove-value', 'delete_value')

# az group deployment
with self.command_group('group deployment', resource_deployment_sdk) as g:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

command_group [](start = 14, length = 13)

will group deployment, group deployment operation be deprecated, if so, you may need to add redirect here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they will be deprecated. we'll add the deprecation info later in a separate PR.

g.custom_command('create', 'deploy_arm_template', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
Expand All @@ -233,19 +234,86 @@ def load_command_table(self, _):
g.command('list', 'list')
g.custom_show_command('show', 'get_deployment_operations', client_factory=cf_deployment_operations)

# az deployment
with self.command_group('deployment', resource_deployment_sdk, min_api='2018-05-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
Comment thread
Juliehzl marked this conversation as resolved.
g.custom_command('list', 'list_deployments_at_subscription_scope', table_transformer=transform_deployments_list)
g.custom_show_command('show', 'get_deployment_at_subscription_scope')
g.custom_command('delete', 'delete_deployment_at_subscription_scope', supports_no_wait=True)
g.custom_command('validate', 'validate_arm_template_at_subscription_scope', table_transformer=deployment_validate_table_format, exception_handler=handle_template_based_exception)
g.custom_command('create', 'deploy_arm_template_at_subscription_scope', supports_no_wait=True, validator=process_deployment_create_namespace, exception_handler=handle_template_based_exception)
g.custom_command('export', 'export_subscription_deployment_template')
g.custom_wait_command('wait', 'wait_deployment_at_subscription_scope')
g.custom_command('validate', 'validate_arm_template_at_subscription_scope', validator=process_deployment_create_namespace,
table_transformer=deployment_validate_table_format, exception_handler=handle_template_based_exception)
g.custom_command('create', 'deploy_arm_template_at_subscription_scope', supports_no_wait=True, validator=process_deployment_create_namespace,
exception_handler=handle_template_based_exception)
g.custom_command('export', 'export_template_at_subscription_scope')
g.custom_wait_command('wait', 'get_deployment_at_subscription_scope')

with self.command_group('deployment operation', resource_deployment_operation_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
g.custom_command('list', 'list_deployment_operations_at_subscription_scope')
Comment thread
Tiano2017 marked this conversation as resolved.
g.custom_show_command('show', 'get_deployment_operations_at_subscription_scope', client_factory=cf_deployment_operations)

# az deployment sub
with self.command_group('deployment sub', resource_deployment_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will prefer deployment subscription for your commands

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a guideline on the command group name. we discussed in our team and decided to use the short format. Let me know if that's against the guidelines. @alex-frankel FYI.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there is existing subgroup named "operation", subscription looks more descriptive. Just my suggestion not required.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vote for subscription. sub is not descriptive.


In reply to: 375117700 [](ancestors = 375117700)

g.custom_command('list', 'list_deployments_at_subscription_scope', table_transformer=transform_deployments_list)
g.custom_show_command('show', 'get_deployment_at_subscription_scope', table_transformer=transform_deployment)
g.custom_command('delete', 'delete_deployment_at_subscription_scope', supports_no_wait=True)
g.custom_command('validate', 'validate_arm_template_at_subscription_scope', validator=process_deployment_create_namespace,
table_transformer=deployment_validate_table_format, exception_handler=handle_template_based_exception)
g.custom_command('create', 'deploy_arm_template_at_subscription_scope', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
g.custom_command('export', 'export_template_at_subscription_scope')
g.custom_wait_command('wait', 'get_deployment_at_subscription_scope')

with self.command_group('deployment operation', resource_deployment_operation_sdk, min_api='2018-05-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
with self.command_group('deployment operation sub', resource_deployment_operation_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks the commands in az deployment operation sub commands group are the same with commands in az deployment operation. https://github.com/Azure/azure-cli/pull/10751/files?file-filters%5B%5D=.json&file-filters%5B%5D=.py#diff-2057bbb8441166e4910b34b09d22b58cR249

@Tiano2017 Tiano2017 Jan 17, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. that's expected. The command group az deployment operation sub is the same as az deployment operation, and az deployment sub is the same as az deployment. We want to retire az deployment and az deployment operation but I think we'll do that in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. will fix it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I understand why az deployment operation will be retired? is there more subresource like sub in operation command group, if so, can you give an example? I ask this because if sub is already the top resource in operation, we would suggest to have it as a default resource in operation command group.


In reply to: 367718352 [](ancestors = 367718352)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so az deployment operation works at subscription scope today. It lists or shows the deployment operations for a deployment at subscription scope. With the changes in this PR, we are supporting deployment at tenant and management group scope. To make all commands consistent, we are introducing az deployment operation group | sub | mg | tenant for each scope. The az deployment operation sub will replace az deployment operation.

g.custom_command('list', 'list_deployment_operations_at_subscription_scope')
g.custom_show_command('show', 'get_deployment_operations_at_subscription_scope', client_factory=cf_deployment_operations)

# az deployment group
with self.command_group('deployment group', resource_deployment_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'2019-07-01' [](start = 81, length = 12)

There is no min_api in group deployment -> with self.command_group('group deployment', resource_deployment_sdk).
Why do you need a min_api here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not required. does it cause any issue?

g.custom_command('list', 'list_deployments_at_resource_group', table_transformer=transform_deployments_list)
g.custom_show_command('show', 'get_deployment_at_resource_group', table_transformer=transform_deployment)
g.custom_command('delete', 'delete_deployment_at_resource_group', supports_no_wait=True)
g.custom_command('validate', 'validate_arm_template_at_resource_group', validator=process_deployment_create_namespace,
table_transformer=deployment_validate_table_format, exception_handler=handle_template_based_exception)
g.custom_command('create', 'deploy_arm_template_at_resource_group', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
g.custom_command('export', 'export_template_at_resource_group')
g.custom_wait_command('wait', 'get_deployment_at_resource_group')

with self.command_group('deployment operation group', resource_deployment_operation_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
g.custom_command('list', 'list_deployment_operations_at_resource_group')
g.custom_show_command('show', 'get_deployment_operations_at_resource_group', client_factory=cf_deployment_operations)

# az deployment mg
with self.command_group('deployment mg', resource_deployment_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
g.custom_command('list', 'list_deployments_at_management_group', table_transformer=transform_deployments_list)
g.custom_show_command('show', 'get_deployment_at_management_group', table_transformer=transform_deployment)
g.custom_command('delete', 'delete_deployment_at_management_group', supports_no_wait=True)
g.custom_command('validate', 'validate_arm_template_at_management_group', validator=process_deployment_create_namespace,
table_transformer=deployment_validate_table_format, exception_handler=handle_template_based_exception)
g.custom_command('create', 'deploy_arm_template_at_management_group', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
g.custom_command('export', 'export_template_at_management_group')
g.custom_wait_command('wait', 'get_deployment_at_management_group')

with self.command_group('deployment operation mg', resource_deployment_operation_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
g.custom_command('list', 'list_deployment_operations_at_management_group')
g.custom_show_command('show', 'get_deployment_operations_at_management_group', client_factory=cf_deployment_operations)

# az deployment tenant
with self.command_group('deployment tenant', resource_deployment_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
g.custom_command('list', 'list_deployments_at_tenant_scope', table_transformer=transform_deployments_list)
g.custom_show_command('show', 'get_deployment_at_tenant_scope', table_transformer=transform_deployment)
g.custom_command('delete', 'delete_deployment_at_tenant_scope', supports_no_wait=True)
g.custom_command('validate', 'validate_arm_template_at_tenant_scope', validator=process_deployment_create_namespace,
table_transformer=deployment_validate_table_format, exception_handler=handle_template_based_exception)
g.custom_command('create', 'deploy_arm_template_at_tenant_scope', supports_no_wait=True, validator=process_deployment_create_namespace,
table_transformer=transform_deployment, exception_handler=handle_template_based_exception)
g.custom_command('export', 'export_template_at_tenant_scope')
g.custom_wait_command('wait', 'get_deployment_at_tenant_scope')

with self.command_group('deployment operation tenant', resource_deployment_operation_sdk, min_api='2019-07-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
g.custom_command('list', 'list_deployment_operations_at_tenant_scope')
g.custom_show_command('show', 'get_deployment_operations_at_tenant_scope', client_factory=cf_deployment_operations)

with self.command_group('policy assignment', resource_type=ResourceType.MGMT_RESOURCE_POLICY) as g:
g.custom_command('create', 'create_policy_assignment')
g.custom_command('delete', 'delete_policy_assignment')
Expand Down
Loading