Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@
/src/azure-cli/azure/cli/command_modules/util/ @jiasli @Juliehzl @zhoxing-ms
/src/azure-cli/azure/cli/command_modules/synapse/ @idear1203 @sunsw1994 @aim-for-better
/src/azure-cli/azure/cli/command_modules/hdinsight/ @aim-for-better @haroldrandom @Juliehzl
/src/azure-cli/azure/cli/command_modules/databoxedge/ @evelyn-ys @Juliehzl
3 changes: 2 additions & 1 deletion doc/sphinx/azhelpgen/doc_source_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,6 @@
"apim": "src/azure-cli/azure/cli/command_modules/apim/_help.py",
"aro": "src/azure-cli/azure/cli/command_modules/aro/_help.py",
"util": "src/azure-cli/azure/cli/command_modules/util/_help.py",
"synapse": "src/azure-cli/azure/cli/command_modules/synapse/_help.py"
"synapse": "src/azure-cli/azure/cli/command_modules/synapse/_help.py",
"databoxedge": "src/azure-cli/azure/cli/command_modules/databoxedge/_help.py"
}
10 changes: 7 additions & 3 deletions src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class ResourceType(Enum): # pylint: disable=too-few-public-methods
MGMT_APPSERVICE = ('azure.mgmt.web', 'WebSiteManagementClient')
MGMT_IOTHUB = ('azure.mgmt.iothub', 'IotHubClient')
MGMT_ARO = ('azure.mgmt.redhatopenshift', 'AzureRedHatOpenShiftClient')
MGMT_DATABOXEDGE = ('azure.mgmt.databoxedge', 'DataBoxEdgeManagementClient')
# 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 @@ -208,7 +209,8 @@ def default_api_version(self):
}),
ResourceType.MGMT_APPSERVICE: '2019-08-01',
ResourceType.MGMT_IOTHUB: '2020-03-01',
ResourceType.MGMT_ARO: '2020-04-30'
ResourceType.MGMT_ARO: '2020-04-30',
ResourceType.MGMT_DATABOXEDGE: '2019-08-01'
},
'2020-09-01-hybrid': {
ResourceType.MGMT_STORAGE: '2019-06-01',
Expand Down Expand Up @@ -247,7 +249,8 @@ def default_api_version(self):
ResourceType.DATA_COSMOS_TABLE: '2017-04-17',
ResourceType.MGMT_APPSERVICE: '2018-02-01',
ResourceType.MGMT_EVENTHUB: '2018-01-01-preview',
ResourceType.MGMT_IOTHUB: '2019-07-01-preview'
ResourceType.MGMT_IOTHUB: '2019-07-01-preview',
ResourceType.MGMT_DATABOXEDGE: '2019-08-01'
Comment thread
jiasli marked this conversation as resolved.
},
'2019-03-01-hybrid': {
ResourceType.MGMT_STORAGE: '2017-10-01',
Expand Down Expand Up @@ -282,7 +285,8 @@ def default_api_version(self):
# API versions
ResourceType.MGMT_APPSERVICE: '2018-02-01',
ResourceType.MGMT_EVENTHUB: '2018-01-01-preview',
ResourceType.MGMT_IOTHUB: '2019-03-22'
ResourceType.MGMT_IOTHUB: '2019-03-22',
ResourceType.MGMT_DATABOXEDGE: '2019-08-01'
},
'2018-03-01-hybrid': {
ResourceType.MGMT_STORAGE: '2016-01-01',
Expand Down
50 changes: 50 additions & 0 deletions src/azure-cli/azure/cli/command_modules/databoxedge/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from .generated._help import helps # pylint: disable=unused-import
try:
from .manual._help import helps # pylint: disable=reimported
except ImportError:
pass


class DataBoxEdgeManagementClientCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azure.cli.core.profiles import ResourceType
databoxedge_custom = CliCommandType(
operations_tmpl='azure.cli.command_modules.databoxedge.custom#{}')
parent = super(DataBoxEdgeManagementClientCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=databoxedge_custom,
resource_type=ResourceType.MGMT_DATABOXEDGE)

def load_command_table(self, args):
from .generated.commands import load_command_table
load_command_table(self, args)
try:
from .manual.commands import load_command_table as load_command_table_manual
load_command_table_manual(self, args)
except ImportError:
pass
return self.command_table

def load_arguments(self, command):
from .generated._params import load_arguments
load_arguments(self, command)
try:
from .manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError:
pass


COMMAND_LOADER_CLS = DataBoxEdgeManagementClientCommandsLoader
15 changes: 15 additions & 0 deletions src/azure-cli/azure/cli/command_modules/databoxedge/_help.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .generated._help import helps # pylint: disable=unused-import
try:
from .manual._help import helps # pylint: disable=reimported
except ImportError:
pass
17 changes: 17 additions & 0 deletions src/azure-cli/azure/cli/command_modules/databoxedge/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.action import * # noqa: F403
try:
from .manual.action import * # noqa: F403
except ImportError:
pass
17 changes: 17 additions & 0 deletions src/azure-cli/azure/cli/command_modules/databoxedge/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.custom import * # noqa: F403
try:
from .manual.custom import * # noqa: F403
except ImportError:
pass
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------


def cf_databoxedge_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azure.cli.core.profiles import ResourceType
return get_mgmt_service_client(cli_ctx,
Comment thread
Juliehzl marked this conversation as resolved.
ResourceType.MGMT_DATABOXEDGE)


def cf_device(cli_ctx, *_):
return cf_databoxedge_cl(cli_ctx).devices


def cf_alert(cli_ctx, *_):
return cf_databoxedge_cl(cli_ctx).alerts


def cf_bandwidth_schedule(cli_ctx, *_):
return cf_databoxedge_cl(cli_ctx).bandwidth_schedules


def cf_job(cli_ctx, *_):
return cf_databoxedge_cl(cli_ctx).jobs


def cf_node(cli_ctx, *_):
return cf_databoxedge_cl(cli_ctx).nodes


def cf_order(cli_ctx, *_):
return cf_databoxedge_cl(cli_ctx).orders


def cf_sku(cli_ctx, *_):
return cf_databoxedge_cl(cli_ctx).skus
Loading