diff --git a/azure-devops/azext_devops/dev/team/arguments.py b/azure-devops/azext_devops/dev/team/arguments.py index a018aaca..d75dff41 100644 --- a/azure-devops/azext_devops/dev/team/arguments.py +++ b/azure-devops/azext_devops/dev/team/arguments.py @@ -87,7 +87,8 @@ def load_team_arguments(self, _): with self.argument_context('devops user') as context: context.argument('license_type', arg_type=get_enum_type(_LICENSE_TYPES)) with self.argument_context('devops user add') as context: - context.argument('send_email_invite', help='Whether to send email invite for new user or not.') + context.argument('send_email_invite', arg_type=get_three_state_flag(), + help='Whether to send email invite for new user or not.') with self.argument_context('devops security group create') as context: context.argument('project', @@ -126,8 +127,10 @@ def load_team_arguments(self, _): for given user/group and token.') with self.argument_context('devops extension') as context: - context.argument('include_built_in', help='Include built in extensions.') - context.argument('include_disabled', help='Include disabled extensions.') + context.argument('include_built_in', arg_type=get_three_state_flag(), + help='Include built in extensions.') + context.argument('include_disabled', arg_type=get_three_state_flag(), + help='Include disabled extensions.') context.argument('publisher_name', help='Publisher Name') context.argument('extension_name', help='Extension Name') context.argument('search_query', options_list=('--search-query', '-q'), help='Search term') diff --git a/azure-devops/azext_devops/dev/team/configure.py b/azure-devops/azext_devops/dev/team/configure.py index 29489d53..fe00e9aa 100644 --- a/azure-devops/azext_devops/dev/team/configure.py +++ b/azure-devops/azext_devops/dev/team/configure.py @@ -28,9 +28,9 @@ def configure(defaults=None, use_git_aliases=None, list_config=False): e.g. '--defaults project=my-project-name organization=https://dev.azure.com/organizationName arg=value' Use '' to clear the defaults, e.g. --defaults project=''. :type defaults: str - :param use_git_aliases: Set to 'yes' to configure Git aliases global git config file + :param use_git_aliases: Set to 'true' to configure Git aliases global git config file (to enable commands like "git pr list"). - Set to 'no' to remove any aliases set by the tool. + Set to 'false' to remove any aliases set by the tool. :type use_git_aliases: str :param list_config: Lists the contents of the config file. :type list_config: bool diff --git a/azure-devops/azext_devops/dev/team/extension.py b/azure-devops/azext_devops/dev/team/extension.py index b7f4dd22..8f0d7842 100644 --- a/azure-devops/azext_devops/dev/team/extension.py +++ b/azure-devops/azext_devops/dev/team/extension.py @@ -91,9 +91,13 @@ def search_extensions(search_query): return response_json['results'][0]['extensions'] -def list_extensions(include_built_in=True, include_disabled=True, organization=None, detect=None): +def list_extensions(include_built_in=None, include_disabled=None, organization=None, detect=None): """ List extensions installed in an organization """ + if include_built_in is None: + include_built_in = True + if include_disabled is None: + include_disabled = True organization = resolve_instance(detect=detect, organization=organization) extension_client = get_extension_client(organization) extensions = extension_client.get_installed_extensions(include_disabled_extensions=include_disabled) diff --git a/azure-devops/azext_devops/dev/team/service_endpoint.py b/azure-devops/azext_devops/dev/team/service_endpoint.py index 35ca1295..e8c650ab 100644 --- a/azure-devops/azext_devops/dev/team/service_endpoint.py +++ b/azure-devops/azext_devops/dev/team/service_endpoint.py @@ -46,13 +46,12 @@ def show_service_endpoint(id, organization=None, project=None, detect=None): # return client.get_service_endpoint_details(project, id) -def delete_service_endpoint(id, deep=True, organization=None, project=None, detect=None): # pylint: disable=redefined-builtin +def delete_service_endpoint(id, deep=False, organization=None, project=None, detect=None): # pylint: disable=redefined-builtin """Deletes service endpoint :param id: Id of the service endpoint to delete. :type id: str - :pram deep: Specific to AzureRM endpoint created in Automatic flow. When set to true, + :param deep: Specific to AzureRM endpoint created in Automatic flow. When it is specified, this will also delete corresponding AAD application in Azure. - Default value is true. :type deep: bool """ organization, project = resolve_instance_and_project(detect=detect, diff --git a/azure-devops/azext_devops/dev/team/user.py b/azure-devops/azext_devops/dev/team/user.py index ea0ab763..d870c77c 100644 --- a/azure-devops/azext_devops/dev/team/user.py +++ b/azure-devops/azext_devops/dev/team/user.py @@ -74,7 +74,7 @@ def update_user_entitlement(user, license_type, organization=None, detect=None): return user_entitlement_update.user_entitlement -def add_user_entitlement(email_id, license_type, send_email_invite=True, organization=None, detect=None): +def add_user_entitlement(email_id, license_type, send_email_invite=None, organization=None, detect=None): """Add user. :param email_id: Email ID of the user. :type email_id: str @@ -82,6 +82,8 @@ def add_user_entitlement(email_id, license_type, send_email_invite=True, organiz :type license_type: str :rtype: UserEntitlementsPatchResponse """ + if send_email_invite is None: + send_email_invite = True do_not_send_invite = not send_email_invite organization = resolve_instance(detect=detect, organization=organization) client = get_member_entitlement_management_client(organization)