This commit is contained in:
Qiaoqiao Zhang 2020-08-14 12:46:04 +08:00 коммит произвёл GitHub
Родитель 21cfa29f90
Коммит 3b1b58b840
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 82 добавлений и 74 удалений

Просмотреть файл

@ -186,6 +186,7 @@ function getCommandBody(model: CodeModelAz, needGeneric: boolean = false, debug:
}
model.MethodParameter.language['az']['alias'].push('name');
model.MethodParameter.language['az']['alias'].push('n');
model.MethodParameter.language['az']['alias'].push(parameterName);
}
if (!isNullOrUndefined(model.MethodParameter.language['az']['alias'])) {
argument = " c.argument('" + parameterName + "'";
@ -199,7 +200,7 @@ function getCommandBody(model: CodeModelAz, needGeneric: boolean = false, debug:
if(alias.length == 1) {
alias = "'-" + alias + "'";
} else if(alias.length > 1) {
alias = "'--" + alias + "'";
alias = "'--" + alias.replace(/_/g, '-') + "'";
}
if(alias_str.indexOf(alias) < 0) {
alias_str.push(alias);

Просмотреть файл

@ -34,13 +34,15 @@ def load_arguments(self, _):
with self.argument_context('datafactory show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', options_list=['--name', '-n'], type=str, help='The factory name.', id_part='name')
c.argument('factory_name', options_list=['--name', '-n', '--factory-name'], type=str, help='The factory name.',
id_part='name')
c.argument('if_none_match', type=str, help='ETag of the factory entity. Should only be specified for get. If '
'the ETag matches the existing entity tag, or if * was provided, then no content will be returned.')
with self.argument_context('datafactory create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', options_list=['--name', '-n'], type=str, help='The factory name.')
c.argument('factory_name', options_list=['--name', '-n', '--factory-name'], type=str,
help='The factory name.')
c.argument('if_match', type=str, help='ETag of the factory entity. Should only be specified for update, for '
'which it should match existing entity or can be * for unconditional update.')
c.argument('location', arg_type=get_location_type(self.cli_ctx),
@ -55,12 +57,14 @@ def load_arguments(self, _):
with self.argument_context('datafactory update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', options_list=['--name', '-n'], type=str, help='The factory name.', id_part='name')
c.argument('factory_name', options_list=['--name', '-n', '--factory-name'], type=str, help='The factory name.',
id_part='name')
c.argument('tags', tags_type)
with self.argument_context('datafactory delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', options_list=['--name', '-n'], type=str, help='The factory name.', id_part='name')
c.argument('factory_name', options_list=['--name', '-n', '--factory-name'], type=str, help='The factory name.',
id_part='name')
with self.argument_context('datafactory configure-factory-repo') as c:
c.argument('location_id', type=str, help='The location identifier.', id_part='name')
@ -72,7 +76,8 @@ def load_arguments(self, _):
with self.argument_context('datafactory get-data-plane-access') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', options_list=['--name', '-n'], type=str, help='The factory name.', id_part='name')
c.argument('factory_name', options_list=['--name', '-n', '--factory-name'], type=str, help='The factory name.',
id_part='name')
c.argument('permissions', type=str, help='The string with permissions for Data Plane access. Currently only '
'\'r\' is supported which grants read only access.')
c.argument('access_resource_path', type=str, help='The resource path to get access relative to factory. '
@ -86,7 +91,8 @@ def load_arguments(self, _):
with self.argument_context('datafactory get-git-hub-access-token') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', options_list=['--name', '-n'], type=str, help='The factory name.', id_part='name')
c.argument('factory_name', options_list=['--name', '-n', '--factory-name'], type=str, help='The factory name.',
id_part='name')
c.argument('git_hub_access_code', type=str, help='GitHub access code.')
c.argument('git_hub_client_id', type=str, help='GitHub application client ID.')
c.argument('git_hub_access_token_base_url', type=str, help='GitHub access token base URL.')
@ -98,15 +104,16 @@ def load_arguments(self, _):
with self.argument_context('datafactory trigger show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
c.argument('if_none_match', type=str, help='ETag of the trigger entity. Should only be specified for get. If '
'the ETag matches the existing entity tag, or if * was provided, then no content will be returned.')
with self.argument_context('datafactory trigger create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str,
help='The trigger name.')
c.argument('if_match', type=str, help='ETag of the trigger entity. Should only be specified for update, for '
'which it should match existing entity or can be * for unconditional update.')
c.argument('properties', type=validate_file_or_dict, help='Properties of the trigger. Expected value: '
@ -115,8 +122,8 @@ def load_arguments(self, _):
with self.argument_context('datafactory trigger update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
c.argument('if_match', type=str, help='ETag of the trigger entity. Should only be specified for update, for '
'which it should match existing entity or can be * for unconditional update.')
c.argument('description', type=str, help='Trigger description.')
@ -127,14 +134,14 @@ def load_arguments(self, _):
with self.argument_context('datafactory trigger delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
with self.argument_context('datafactory trigger get-event-subscription-status') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
with self.argument_context('datafactory trigger query-by-factory') as c:
c.argument('resource_group_name', resource_group_name_type)
@ -147,32 +154,32 @@ def load_arguments(self, _):
with self.argument_context('datafactory trigger start') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
with self.argument_context('datafactory trigger stop') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
with self.argument_context('datafactory trigger subscribe-to-event') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
with self.argument_context('datafactory trigger unsubscribe-from-event') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
with self.argument_context('datafactory trigger wait') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('trigger_name', options_list=['--name', '-n'], type=str, help='The trigger name.', id_part=''
'child_name_1')
c.argument('trigger_name', options_list=['--name', '-n', '--trigger-name'], type=str, help='The trigger name.',
id_part='child_name_1')
c.argument('if_none_match', type=str, help='ETag of the trigger entity. Should only be specified for get. If '
'the ETag matches the existing entity tag, or if * was provided, then no content will be returned.')
@ -183,8 +190,8 @@ def load_arguments(self, _):
with self.argument_context('datafactory integration-runtime show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
c.argument('if_none_match', type=str, help='ETag of the integration runtime entity. Should only be specified '
'for get. If the ETag matches the existing entity tag, or if * was provided, then no content will '
'be returned.')
@ -204,8 +211,8 @@ def load_arguments(self, _):
with self.argument_context('datafactory integration-runtime managed create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.')
c.argument('if_match', type=str, help='ETag of the integration runtime entity. Should only be specified for '
'update, for which it should match existing entity or can be * for unconditional update.')
c.argument('description', type=str, help='Integration runtime description.')
@ -223,8 +230,8 @@ def load_arguments(self, _):
with self.argument_context('datafactory integration-runtime self-hosted create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.')
c.argument('if_match', type=str, help='ETag of the integration runtime entity. Should only be specified for '
'update, for which it should match existing entity or can be * for unconditional update.')
c.argument('description', type=str, help='Integration runtime description.')
@ -234,8 +241,8 @@ def load_arguments(self, _):
with self.argument_context('datafactory integration-runtime update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
c.argument('auto_update', arg_type=get_enum_type(['On', 'Off', 'fakeValue1', 'fakeValue2', 'fakeValue3', ''
'fakeValue4', 'fakeValue5', 'fakeValue6']), help='Enables or '
'disables the auto-update feature of the self-hosted integration runtime. See '
@ -246,77 +253,77 @@ def load_arguments(self, _):
with self.argument_context('datafactory integration-runtime delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
with self.argument_context('datafactory integration-runtime get-connection-info') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
with self.argument_context('datafactory integration-runtime get-monitoring-data') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
with self.argument_context('datafactory integration-runtime get-status') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
with self.argument_context('datafactory integration-runtime list-auth-key') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.')
with self.argument_context('datafactory integration-runtime regenerate-auth-key') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
c.argument('key_name', arg_type=get_enum_type(['authKey1', 'authKey2']), help='The name of the authentication '
'key to regenerate.')
with self.argument_context('datafactory integration-runtime remove-link') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
c.argument('linked_factory_name', type=str, help='The data factory name for linked integration runtime.')
with self.argument_context('datafactory integration-runtime start') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
with self.argument_context('datafactory integration-runtime stop') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
with self.argument_context('datafactory integration-runtime sync-credentials') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
with self.argument_context('datafactory integration-runtime upgrade') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
with self.argument_context('datafactory integration-runtime wait') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('factory_name', type=str, help='The factory name.', id_part='name')
c.argument('integration_runtime_name', options_list=['--name', '-n'], type=str, help='The integration runtime '
'name.', id_part='child_name_1')
c.argument('integration_runtime_name', options_list=['--name', '-n', '--integration-runtime-name'], type=str,
help='The integration runtime name.', id_part='child_name_1')
c.argument('if_none_match', type=str, help='ETag of the integration runtime entity. Should only be specified '
'for get. If the ETag matches the existing entity tag, or if * was provided, then no content will '
'be returned.')

Просмотреть файл

@ -40,8 +40,8 @@ def load_arguments(self, _):
with self.argument_context('managed-network mn create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('managed_network_name', options_list=['--name', '-n'], type=str, help='The name of the Managed '
'Network.')
c.argument('managed_network_name', options_list=['--name', '-n', '--managed-network-name'], type=str, help=''
'The name of the Managed Network.')
c.argument('location', arg_type=get_location_type(self.cli_ctx),
validator=get_default_location_from_resource_group)
c.argument('tags', tags_type)
@ -50,27 +50,27 @@ def load_arguments(self, _):
with self.argument_context('managed-network mn update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('managed_network_name', options_list=['--name', '-n'], type=str, help='The name of the Managed '
'Network.', id_part='name')
c.argument('managed_network_name', options_list=['--name', '-n', '--managed-network-name'], type=str, help=''
'The name of the Managed Network.', id_part='name')
c.argument('tags', tags_type)
with self.argument_context('managed-network mn delete') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('managed_network_name', options_list=['--name', '-n'], type=str, help='The name of the Managed '
'Network.', id_part='name')
c.argument('managed_network_name', options_list=['--name', '-n', '--managed-network-name'], type=str, help=''
'The name of the Managed Network.', id_part='name')
with self.argument_context('managed-network mn get-modify') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('managed_network_name', options_list=['--name', '-n'], type=str, help='The name of the Managed '
'Network.', id_part='name')
c.argument('managed_network_name', options_list=['--name', '-n', '--managed-network-name'], type=str, help=''
'The name of the Managed Network.', id_part='name')
with self.argument_context('managed-network mn scope-assignment list') as c:
c.argument('scope', type=str, help='The base resource of the scope assignment.')
with self.argument_context('managed-network mn scope-assignment show') as c:
c.argument('scope', type=str, help='The base resource of the scope assignment.')
c.argument('scope_assignment_name', options_list=['--name', '-n'], type=str, help='The name of the scope '
'assignment to get.')
c.argument('scope_assignment_name', options_list=['--name', '-n', '--scope-assignment-name'], type=str, help=''
'The name of the scope assignment to get.')
with self.argument_context('managed-network mn scope-assignment create') as c:
c.argument('scope', type=str, help='The base resource of the scope assignment to create. The scope can be any '
@ -78,8 +78,8 @@ def load_arguments(self, _):
'\'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}\' for a resource group, and '
'\'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider'
'}/{resource-type}/{resource-name}\' for a resource.')
c.argument('scope_assignment_name', options_list=['--name', '-n'], type=str, help='The name of the scope '
'assignment to create.')
c.argument('scope_assignment_name', options_list=['--name', '-n', '--scope-assignment-name'], type=str, help=''
'The name of the scope assignment to create.')
c.argument('location', arg_type=get_location_type(self.cli_ctx))
c.argument('assigned_managed_network', type=str,
help='The managed network ID with scope will be assigned to.')
@ -90,16 +90,16 @@ def load_arguments(self, _):
'\'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}\' for a resource group, and '
'\'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider'
'}/{resource-type}/{resource-name}\' for a resource.')
c.argument('scope_assignment_name', options_list=['--name', '-n'], type=str, help='The name of the scope '
'assignment to create.')
c.argument('scope_assignment_name', options_list=['--name', '-n', '--scope-assignment-name'], type=str, help=''
'The name of the scope assignment to create.')
c.argument('location', arg_type=get_location_type(self.cli_ctx))
c.argument('assigned_managed_network', type=str,
help='The managed network ID with scope will be assigned to.')
with self.argument_context('managed-network mn scope-assignment delete') as c:
c.argument('scope', type=str, help='The scope of the scope assignment to delete.')
c.argument('scope_assignment_name', options_list=['--name', '-n'], type=str, help='The name of the scope '
'assignment to delete.')
c.argument('scope_assignment_name', options_list=['--name', '-n', '--scope-assignment-name'], type=str, help=''
'The name of the scope assignment to delete.')
with self.argument_context('managed-network mn group list') as c:
c.argument('resource_group_name', resource_group_name_type)