Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,5 @@
/src/communication/ @haroldrandom

/src/automation/ @arrownj

/src/databoxedge/ @evelyn-ys
8 changes: 8 additions & 0 deletions src/databoxedge/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

0.1.0
++++++
* Initial release.
115 changes: 115 additions & 0 deletions src/databoxedge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Azure CLI data-box-edge Extension #
This is the extension for data-box-edge

### How to use ###
Install this extension using the below CLI command
```
az extension add --name data-box-edge
```

### Included Features ###
#### data-box-edge device ####
##### Create #####
```
az data-box-edge device create --location "eastus" --sku name="Edge" tier="Standard" --name "testedgedevice" \
--resource-group "GroupForEdgeAutomation"
```
##### Show #####
```
az data-box-edge device show --name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### List #####
```
az data-box-edge device list --resource-group "GroupForEdgeAutomation"
```
##### Update #####
```
az data-box-edge device update --name "testedgedevice" --tags Key1="value1" Key2="value2" \
--resource-group "GroupForEdgeAutomation"
```
##### Download-update #####
```
az data-box-edge device download-update --name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### Get-update-summary #####
```
az data-box-edge device get-update-summary --name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### Install-update #####
```
az data-box-edge device install-update --name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### Scan-for-update #####
```
az data-box-edge device scan-for-update --name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### Delete #####
```
az data-box-edge device delete --name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
#### data-box-edge alert ####
##### List #####
```
az data-box-edge alert list --device-name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### Show #####
```
az data-box-edge alert show --name "159a00c7-8543-4343-9435-263ac87df3bb" --device-name "testedgedevice" \
--resource-group "GroupForEdgeAutomation"
```
#### data-box-edge bandwidth-schedule ####
##### Create #####
```
az data-box-edge bandwidth-schedule create --name "bandwidth-1" --device-name "testedgedevice" --days "Sunday" \
--days "Monday" --rate-in-mbps 100 --start "0:0:0" --stop "13:59:0" --resource-group "GroupForEdgeAutomation"
```
##### Show #####
```
az data-box-edge bandwidth-schedule show --name "bandwidth-1" --device-name "testedgedevice" \
--resource-group "GroupForEdgeAutomation"
```
##### List #####
```
az data-box-edge bandwidth-schedule list --device-name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### Delete #####
```
az data-box-edge bandwidth-schedule delete --name "bandwidth-1" --device-name "testedgedevice" \
--resource-group "GroupForEdgeAutomation"
```
#### data-box-edge ####
##### Show-job #####
```
az data-box-edge show-job --name "159a00c7-8543-4343-9435-263ac87df3bb" --device-name "testedgedevice" \
--resource-group "GroupForEdgeAutomation"
```
#### data-box-edge ####
##### List-node #####
```
az data-box-edge list-node --device-name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
#### data-box-edge order ####
##### Create #####
```
az data-box-edge order create --device-name "testedgedevice" --company-name "Microsoft" \
--contact-person "John Mcclane" --email-list "[email protected]" --phone "(800) 426-9400" \
--address-line1 "Microsoft Corporation" --address-line2 "One Microsoft Way" --address-line3 "Redmond" --city "WA" \
--country "USA" --postal-code "98052" --state "WA" --resource-group "GroupForEdgeAutomation"
```
##### Show #####
```
az data-box-edge order show --device-name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### List #####
```
az data-box-edge order list --device-name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
##### Delete #####
```
az data-box-edge order delete --device-name "testedgedevice" --resource-group "GroupForEdgeAutomation"
```
#### data-box-edge ####
##### List-sku #####
```
az data-box-edge list-sku
```
50 changes: 50 additions & 0 deletions src/databoxedge/azext_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 azext_databoxedge.generated._help import helps # pylint: disable=unused-import
try:
from azext_databoxedge.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 azext_databoxedge.generated._client_factory import cf_data_box_edge_cl
data_box_edge_custom = CliCommandType(
operations_tmpl='azext_databoxedge.custom#{}',
client_factory=cf_data_box_edge_cl)
parent = super(DataBoxEdgeManagementClientCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=data_box_edge_custom)

def load_command_table(self, args):
from azext_databoxedge.generated.commands import load_command_table
load_command_table(self, args)
try:
from azext_databoxedge.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 azext_databoxedge.generated._params import load_arguments
load_arguments(self, command)
try:
from azext_databoxedge.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError:
pass


COMMAND_LOADER_CLS = DataBoxEdgeManagementClientCommandsLoader
17 changes: 17 additions & 0 deletions src/databoxedge/azext_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
4 changes: 4 additions & 0 deletions src/databoxedge/azext_databoxedge/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.15.0"
}
17 changes: 17 additions & 0 deletions src/databoxedge/azext_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
12 changes: 12 additions & 0 deletions src/databoxedge/azext_databoxedge/generated/__init__.py
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__)
44 changes: 44 additions & 0 deletions src/databoxedge/azext_databoxedge/generated/_client_factory.py
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_data_box_edge_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azext_databoxedge.vendored_sdks.databoxedge.v2019_08_01 import DataBoxEdgeManagementClient
return get_mgmt_service_client(cli_ctx,
DataBoxEdgeManagementClient)


def cf_device(cli_ctx, *_):
return cf_data_box_edge_cl(cli_ctx).device


def cf_alert(cli_ctx, *_):
return cf_data_box_edge_cl(cli_ctx).alert


def cf_bandwidth_schedule(cli_ctx, *_):
return cf_data_box_edge_cl(cli_ctx).bandwidth_schedule


def cf_job(cli_ctx, *_):
return cf_data_box_edge_cl(cli_ctx).job


def cf_node(cli_ctx, *_):
return cf_data_box_edge_cl(cli_ctx).node


def cf_order(cli_ctx, *_):
return cf_data_box_edge_cl(cli_ctx).order


def cf_sku(cli_ctx, *_):
return cf_data_box_edge_cl(cli_ctx).sku
Loading