Skip to content

Commit

Permalink
Add custom location sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinsID committed Jun 4, 2021
1 parent d47622c commit c2ec669
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
4 changes: 3 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 @@ -59,6 +59,7 @@ class ResourceType(Enum): # pylint: disable=too-few-public-methods
MGMT_IOTHUB = ('azure.mgmt.iothub', 'IotHubClient')
MGMT_ARO = ('azure.mgmt.redhatopenshift', 'AzureRedHatOpenShiftClient')
MGMT_DATABOXEDGE = ('azure.mgmt.databoxedge', 'DataBoxEdgeManagementClient')
MGMT_CUSTOMLOCATION = ('azure.mgmt.extendedlocation', 'CustomLocations')
# 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
Expand Down Expand Up @@ -210,7 +211,8 @@ def default_api_version(self):
ResourceType.MGMT_APPSERVICE: '2020-09-01',
ResourceType.MGMT_IOTHUB: '2021-03-31',
ResourceType.MGMT_ARO: '2020-04-30',
ResourceType.MGMT_DATABOXEDGE: '2019-08-01'
ResourceType.MGMT_DATABOXEDGE: '2019-08-01',
ResourceType.MGMT_CUSTOMLOCATION: '2021-03-15-preview'
},
'2020-09-01-hybrid': {
ResourceType.MGMT_STORAGE: '2019-06-01',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def providers_client_factory(cli_ctx):
return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES).providers


def customlocation_client_factory(cli_ctx, api_version=None, **_):
from azure.cli.core.profiles import ResourceType
from azure.cli.core.commands.client_factory import get_mgmt_service_client
return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_CUSTOMLOCATION, api_version=api_version)


def cf_plans(cli_ctx, _):
return web_client_factory(cli_ctx).app_service_plans

Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/requirements.py3.Darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ azure-mgmt-devtestlabs==4.0.0
azure-mgmt-dns==8.0.0
azure-mgmt-eventgrid==9.0.0
azure-mgmt-eventhub==4.1.0
azure-mgmt-extendedlocation==1.0.0b2
azure-mgmt-hdinsight==7.0.0
azure-mgmt-imagebuilder==0.4.0
azure-mgmt-iotcentral==4.1.0
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/requirements.py3.Linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ azure-mgmt-devtestlabs==4.0.0
azure-mgmt-dns==8.0.0
azure-mgmt-eventgrid==9.0.0
azure-mgmt-eventhub==4.1.0
azure-mgmt-extendedlocation==1.0.0b2
azure-mgmt-hdinsight==7.0.0
azure-mgmt-imagebuilder==0.4.0
azure-mgmt-iotcentral==4.1.0
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/requirements.py3.windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ azure-mgmt-devtestlabs==4.0.0
azure-mgmt-dns==8.0.0
azure-mgmt-eventgrid==9.0.0
azure-mgmt-eventhub==4.1.0
azure-mgmt-extendedlocation==1.0.0b2
azure-mgmt-hdinsight==7.0.0
azure-mgmt-imagebuilder==0.4.0
azure-mgmt-iotcentral==4.1.0
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
'azure-mgmt-dns~=8.0.0',
'azure-mgmt-eventgrid==9.0.0',
'azure-mgmt-eventhub~=4.1.0',
'azure-mgmt-extendedlocation~=1.0.0b2',
'azure-mgmt-hdinsight~=7.0.0',
'azure-mgmt-imagebuilder~=0.4.0',
'azure-mgmt-iotcentral~=4.1.0',
Expand Down

0 comments on commit c2ec669

Please sign in to comment.