Skip to content

Commit

Permalink
[Spring] modify help text of creating service and app (#5847)
Browse files Browse the repository at this point in the history
  • Loading branch information
RuoyuWang-MS authored Feb 7, 2023
1 parent 6d51613 commit fb2de67
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/spring/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Release History
===============
1.6.6
---
* Modify help text of name in command `az spring create` and `az spring app create`

1.6.5
---
* Add argument `--deployment-name` in command `az spring app create`.
Expand Down
4 changes: 2 additions & 2 deletions src/spring/azext_spring/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

helps['spring create'] = """
type: command
short-summary: Create an Azure Spring Apps.
short-summary: Create an Azure Spring Apps instance.
examples:
- name: Create a new Azure Spring Apps in westus.
text: az spring create -n MyService -g MyResourceGroup -l westus
Expand Down Expand Up @@ -169,7 +169,7 @@

helps['spring app create'] = """
type: command
short-summary: Create a new app with a default deployment in the Azure Spring Apps.
short-summary: Create a new app with a default deployment in the Azure Spring Apps instance.
examples:
- name: Create an app with the default configuration.
text: az spring app create -n MyApp -s MyCluster -g MyResourceGroup
Expand Down
10 changes: 5 additions & 5 deletions src/spring/azext_spring/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
validator=validate_env, help="Space-separated environment variables in 'key[=value]' format.", nargs='*')
build_env_type = CLIArgumentType(
validator=validate_build_env, help="Space-separated environment variables in 'key[=value]' format.", nargs='*')
service_name_type = CLIArgumentType(options_list=['--service', '-s'], help='Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=<name>.', configured_default='spring')
service_name_type = CLIArgumentType(options_list=['--service', '-s'], help='The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.', configured_default='spring')
app_name_type = CLIArgumentType(help='App name, you can configure the default app using az configure --defaults spring-cloud-app=<name>.', validator=validate_app_name, configured_default='spring-app')
sku_type = CLIArgumentType(arg_type=get_enum_type(['Basic', 'Standard', 'Enterprise']), help='Name of SKU. Enterprise is still in Preview.')
source_path_type = CLIArgumentType(nargs='?', const='.',
Expand All @@ -66,7 +66,7 @@ def load_arguments(self, _):
with self.argument_context('spring') as c:
c.argument('resource_group', arg_type=resource_group_name_type)
c.argument('name', options_list=[
'--name', '-n'], help='Name of Azure Spring Apps.')
'--name', '-n'], help='The name of Azure Spring Apps instance.')

# A refactoring work item to move validators to command level to reduce the duplications.
# https://dev.azure.com/msazure/AzureDMSS/_workitems/edit/11002857/
Expand Down Expand Up @@ -217,7 +217,7 @@ def load_arguments(self, _):

with self.argument_context('spring app') as c:
c.argument('service', service_name_type)
c.argument('name', name_type, help='Name of app.')
c.argument('name', name_type, help='The name of app running in the specified Azure Spring Apps instance.')

for scope in ['spring app create', 'spring app update', 'spring app deploy', 'spring app deployment create', 'spring app deployment update']:
with self.argument_context(scope) as c:
Expand Down Expand Up @@ -318,10 +318,10 @@ def load_arguments(self, _):
validator=validate_remote_debugging_port)

with self.argument_context('spring app unset-deployment') as c:
c.argument('name', name_type, help='Name of app.', validator=active_deployment_exist)
c.argument('name', name_type, help='The name of app running in the specified Azure Spring Apps instance.', validator=active_deployment_exist)

with self.argument_context('spring app identity') as c:
c.argument('name', name_type, help='Name of app.', validator=active_deployment_exist_or_warning)
c.argument('name', name_type, help='The name of app running in the specified Azure Spring Apps instance.', validator=active_deployment_exist_or_warning)

with self.argument_context('spring app identity assign') as c:
c.argument('scope',
Expand Down
2 changes: 1 addition & 1 deletion src/spring/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '1.6.5'
VERSION = '1.6.6'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down

0 comments on commit fb2de67

Please sign in to comment.