Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinsID committed Mar 21, 2022
1 parent bf0855c commit 74f9ee3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
24 changes: 6 additions & 18 deletions src/containerapp/azext_containerapp/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@
text: az containerapp delete -g MyResourceGroup -n MyContainerapp
"""

helps['containerapp scale'] = """
type: command
short-summary: Set the min and max replicas for a container app (latest revision in multiple revisions mode).
examples:
- name: Scale a container's latest revision.
text: az containerapp scale -g MyResourceGroup -n MyContainerapp --min-replicas 1 --max-replicas 2
"""

helps['containerapp show'] = """
type: command
short-summary: Show details of a container app.
Expand Down Expand Up @@ -106,7 +98,7 @@
- name: Show details of a revision.
text: |
az containerapp revision show -n MyContainerapp -g MyResourceGroup \\
--revision-name MyContainerappRevision
--revision MyContainerappRevision
"""

helps['containerapp revision list'] = """
Expand Down Expand Up @@ -200,10 +192,6 @@
--location "Canada Central"
"""

helps['containerapp env update'] = """
type: command
short-summary: Update a Container Apps environment. Currently Unsupported.
"""

helps['containerapp env delete'] = """
type: command
Expand Down Expand Up @@ -245,7 +233,7 @@
examples:
- name: List dapr components for a Containerapp environment.
text: |
az containerapp env dapr-component list -g MyResourceGroup --environment-name MyEnvironment
az containerapp env dapr-component list -g MyResourceGroup --name MyEnvironment
"""

helps['containerapp env dapr-component show'] = """
Expand All @@ -254,7 +242,7 @@
examples:
- name: Show the details of a dapr component.
text: |
az containerapp env dapr-component show -g MyResourceGroup --dapr-component-name MyDaprComponenetName --environment-name MyEnvironment
az containerapp env dapr-component show -g MyResourceGroup --dapr-component-name MyDaprComponentName --name MyEnvironment
"""

helps['containerapp env dapr-component set'] = """
Expand All @@ -263,7 +251,7 @@
examples:
- name: Create a dapr component.
text: |
az containerapp env dapr-component set -g MyResourceGroup --environment-name MyEnv --yaml MyYAMLPath --name MyDaprName
az containerapp env dapr-component set -g MyResourceGroup --name MyEnv --yaml MyYAMLPath --dapr-component-name MyDaprComponentName
"""

helps['containerapp env dapr-component remove'] = """
Expand All @@ -272,7 +260,7 @@
examples:
- name: Remove a dapr componenet from a Containerapp environment.
text: |
az containerapp env dapr-component remove -g MyResourceGroup --dapr-component-name MyDaprComponenetName --environment-name MyEnvironment
az containerapp env dapr-component remove -g MyResourceGroup --dapr-component-name MyDaprComponenetName --name MyEnvironment
"""

# Identity Commands
Expand Down Expand Up @@ -303,7 +291,7 @@
examples:
- name: Remove system identity.
text: |
az containerapp identity remove [system]
az containerapp identity remove --identities [system]
- name: Remove system and user identity.
text: |
az containerapp identity remove --identities [system] myAssignedId
Expand Down
7 changes: 5 additions & 2 deletions src/containerapp/azext_containerapp/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long, too-many-statements, consider-using-f-string
# pylint: disable=line-too-long, too-many-statements, consider-using-f-string, option-length-too-long

from knack.arguments import CLIArgumentType

Expand Down Expand Up @@ -55,7 +55,7 @@ def load_arguments(self, _):

# Dapr
with self.argument_context('containerapp', arg_group='Dapr') as c:
c.argument('dapr_enabled', options_list=['--enable-dapr'], default=False, arg_type=get_three_state_flag())
c.argument('dapr_enabled', options_list=['--enable-dapr'], default=False, arg_type=get_three_state_flag(), help="Boolean indicating if the Dapr side car is enabled.")
c.argument('dapr_app_port', type=int, help="The port Dapr uses to talk to the application.")
c.argument('dapr_app_id', type=str, help="The Dapr application identifier.")
c.argument('dapr_app_protocol', type=str, arg_type=get_enum_type(['http', 'grpc']), help="The protocol Dapr uses to talk to the application.")
Expand Down Expand Up @@ -155,6 +155,9 @@ def load_arguments(self, _):
with self.argument_context('containerapp secret set') as c:
c.argument('secrets', nargs='+', options_list=['--secrets', '-s'], help="A list of secret(s) for the container app. Space-separated values in 'key=value' format.")

with self.argument_context('containerapp secret show') as c:
c.argument('secret_name', help="The name of the secret to show.")

with self.argument_context('containerapp secret remove') as c:
c.argument('secret_names', nargs='+', help="A list of secret(s) for the container app. Space-separated secret values names.")

Expand Down
1 change: 0 additions & 1 deletion src/containerapp/azext_containerapp/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def load_command_table(self, _):
g.custom_command('show', 'show_managed_environment')
g.custom_command('list', 'list_managed_environments')
g.custom_command('create', 'create_managed_environment', supports_no_wait=True, exception_handler=ex_handler_factory())
# g.custom_command('update', 'update_managed_environment', supports_no_wait=True, exception_handler=ex_handler_factory())
g.custom_command('delete', 'delete_managed_environment', supports_no_wait=True, confirmation=True, exception_handler=ex_handler_factory())

with self.command_group('containerapp env dapr-component') as g:
Expand Down

0 comments on commit 74f9ee3

Please sign in to comment.