Skip to content

Commit

Permalink
[Databoxedge] Migrate databoxedge to track2 SDK (#18678)
Browse files Browse the repository at this point in the history
* track2

* update

* update

* update

* style

* Linter

* manual

* test

* old test

* Update _help.py

* order

* bandwidth
  • Loading branch information
Jing-song authored Jul 29, 2021
1 parent 9e13343 commit 0850b5f
Show file tree
Hide file tree
Showing 19 changed files with 2,204 additions and 1,313 deletions.
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ 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: '2021-02-01-preview',
ResourceType.MGMT_CUSTOMLOCATION: '2021-03-15-preview',
ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2021-05-01', {
'container_services': '2017-07-01',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@
short-summary: "Update a bandwidth schedule."
examples:
- name: Update a bandwidth schedule.
text: az databoxedge bandwidth-schedule update --name "bandwidth-1" --device-name "testedgedevice" --rate-in-mbps 150 --resource-group "GroupForEdgeAutomation"
text: az databoxedge bandwidth-schedule update --name "bandwidth-1" --device-name "testedgedevice" \
--rate-in-mbps 150 --resource-group "GroupForEdgeAutomation" --start "0:0:0" --stop 12:00:00 --days Sunday
"""

helps['databoxedge bandwidth-schedule delete'] = """
Expand Down Expand Up @@ -270,7 +271,7 @@
az databoxedge 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 "United States" --postal-code \
"98052" --state "WA" --resource-group "GroupForEdgeAutomation"
"98052" --state "WA" --status Untracked --resource-group "GroupForEdgeAutomation"
"""

helps['databoxedge order update'] = """
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# --------------------------------------------------------------------------
# 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=too-many-statements
# pylint: disable=too-many-locals

from azure.cli.core.commands import CliCommandType


def load_command_table(self, _):

from ..generated._client_factory import cf_bandwidth_schedule
databoxedge_bandwidth_schedule = CliCommandType(
operations_tmpl='azure.mgmt.databoxedge.operations._bandwidth_schedules_operations#BandwidthSchedulesOperations'
'.{}',
client_factory=cf_bandwidth_schedule)
with self.command_group('databoxedge bandwidth-schedule', databoxedge_bandwidth_schedule,
client_factory=cf_bandwidth_schedule, min_api='2019-08-01') as g:
g.generic_update_command('update', custom_func_name='databoxedge_bandwidth_schedule_update',
setter_name='begin_create_or_update', supports_no_wait=True)

from ..generated._client_factory import cf_order
databoxedge_order = CliCommandType(
operations_tmpl='azure.mgmt.databoxedge.operations._orders_operations#OrdersOperations.{}',
client_factory=cf_order)
with self.command_group('databoxedge order', databoxedge_order, client_factory=cf_order,
min_api='2019-08-01') as g:
g.generic_update_command('update', setter_arg_name='order', custom_func_name='databoxedge_order_update',
setter_name='begin_create_or_update', supports_no_wait=True)
Loading

0 comments on commit 0850b5f

Please sign in to comment.