Skip to content

Commit

Permalink
Multi-API: add resource type for appservice for consistency (Azure#10398
Browse files Browse the repository at this point in the history
)
  • Loading branch information
yugangw-msft authored Sep 3, 2019
1 parent b27be75 commit 03531c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/azure-cli-core/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Release History
===============
* Minor changes

2.0.72
++++++
* no changes
Expand Down
6 changes: 5 additions & 1 deletion src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ class ResourceType(Enum): # pylint: disable=too-few-public-methods
MGMT_RESOURCE_RESOURCES = ('azure.mgmt.resource.resources', 'ResourceManagementClient')
MGMT_RESOURCE_SUBSCRIPTIONS = ('azure.mgmt.resource.subscriptions', 'SubscriptionClient')
DATA_KEYVAULT = ('azure.keyvault', 'KeyVaultClient')
MGMT_EVENTHUB = ('azure.mgmt.eventhub', 'EventHubManagementClient')
# the "None" below will stay till a command module fills in the type so "get_mgmt_service_client"
# can be provided with "ResourceType.XXX" to initialize the client object. This usually happens
# when related commands start to support Multi-API
DATA_STORAGE = ('azure.multiapi.storage', None)
DATA_COSMOS_TABLE = ('azure.multiapi.cosmosdb', None)
MGMT_EVENTHUB = ('azure.mgmt.eventhub', 'EventHubManagementClient')
MGMT_CONTAINERSERVICE = ('azure.mgmt.containerservice', None)
MGMT_ADVISOR = ('azure.mgmt.advisor', None)
MGMT_MEDIA = ('azure.mgmt.media', None)
Expand Down Expand Up @@ -87,6 +90,7 @@ class ResourceType(Enum): # pylint: disable=too-few-public-methods
MGMT_SQLVM = ('azure.mgmt.sqlvirtualmachine', None)
MGMT_MANAGEDSERVICES = ('azure.mgmt.managedservices', None)
MGMT_NETAPPFILES = ('azure.mgmt.netappfiles', None)
MGMT_APPSERVICE = ('azure.mgmt.web', None)

def __init__(self, import_prefix, client_name):
"""Constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, cli_ctx=None):
appservice_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.appservice.custom#{}')
super(AppserviceCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=appservice_custom,
resource_type=ResourceType.MGMT_CONTAINERREGISTRY)
resource_type=ResourceType.MGMT_APPSERVICE)

def load_command_table(self, args):
from azure.cli.command_modules.appservice.commands import load_command_table
Expand Down

0 comments on commit 03531c6

Please sign in to comment.