diff --git a/src/azure-cli-core/azure/cli/core/profiles/_shared.py b/src/azure-cli-core/azure/cli/core/profiles/_shared.py index dfef5ef5a69..437ec3925d8 100644 --- a/src/azure-cli-core/azure/cli/core/profiles/_shared.py +++ b/src/azure-cli-core/azure/cli/core/profiles/_shared.py @@ -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', diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/manual/_help.py b/src/azure-cli/azure/cli/command_modules/databoxedge/manual/_help.py index 1144b164a69..0db4d305ee9 100644 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/manual/_help.py +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/manual/_help.py @@ -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'] = """ @@ -270,7 +271,7 @@ az databoxedge order create --device-name "testedgedevice" --company-name "Microsoft" --contact-person \ "John Mcclane" --email-list "john@microsoft.com" --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'] = """ diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/manual/commands.py b/src/azure-cli/azure/cli/command_modules/databoxedge/manual/commands.py new file mode 100644 index 00000000000..21c4417fec0 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/manual/commands.py @@ -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) diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/manual/custom.py b/src/azure-cli/azure/cli/command_modules/databoxedge/manual/custom.py index 79079c5b218..b9690cb791f 100644 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/manual/custom.py +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/manual/custom.py @@ -11,6 +11,23 @@ # pylint: disable=unused-argument from azure.cli.core.util import sdk_no_wait +from azure.mgmt.databoxedge.models import Sku + + +def databoxedge_device_list(client, + resource_group_name=None, + expand=None): + if resource_group_name: + return client.list_by_resource_group(resource_group_name=resource_group_name, + expand=expand) + return client.list_by_subscription(expand=expand) + + +def databoxedge_device_show(client, + device_name, + resource_group_name): + return client.get(device_name=device_name, + resource_group_name=resource_group_name) def databoxedge_device_create(client, @@ -27,17 +44,22 @@ def databoxedge_device_create(client, no_wait=False): data_box_edge_device = {} data_box_edge_device['location'] = location - data_box_edge_device['tags'] = tags - data_box_edge_device['etag'] = etag - data_box_edge_device['data_box_edge_device_status'] = data_box_edge_device_status - data_box_edge_device['description'] = description - data_box_edge_device['model_description'] = model_description - data_box_edge_device['friendly_name'] = friendly_name - if sku: - data_box_edge_device['sku'] = {} - data_box_edge_device['sku']['name'] = sku + if tags is not None: + data_box_edge_device['tags'] = tags + if sku is not None: + data_box_edge_device['sku'] = Sku(name=sku) + if etag is not None: + data_box_edge_device['etag'] = etag + if data_box_edge_device is not None: + data_box_edge_device['data_box_edge_device_status'] = data_box_edge_device_status + if description is not None: + data_box_edge_device['description'] = description + if model_description is not None: + data_box_edge_device['model_description'] = model_description + if friendly_name is not None: + data_box_edge_device['friendly_name'] = friendly_name return sdk_no_wait(no_wait, - client.create_or_update, + client.begin_create_or_update, device_name=device_name, resource_group_name=resource_group_name, data_box_edge_device=data_box_edge_device) @@ -47,23 +69,123 @@ def databoxedge_device_update(client, device_name, resource_group_name, tags=None): - if tags is None: - return client.get(device_name=device_name, - resource_group_name=resource_group_name) - parameters = {'tags': tags} + parameters = {} + if tags is not None: + parameters['tags'] = tags return client.update(device_name=device_name, resource_group_name=resource_group_name, parameters=parameters) +def databoxedge_device_delete(client, + device_name, + resource_group_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_device_download_update(client, + device_name, + resource_group_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_download_updates, + device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_device_install_update(client, + device_name, + resource_group_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_install_updates, + device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_device_scan_for_update(client, + device_name, + resource_group_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_scan_for_updates, + device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_device_show_update_summary(client, + device_name, + resource_group_name): + return client.get_update_summary(device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_alert_list(client, + device_name, + resource_group_name): + return client.list_by_data_box_edge_device(device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_alert_show(client, + device_name, + name, + resource_group_name): + return client.get(device_name=device_name, + name=name, + resource_group_name=resource_group_name) + + +def databoxedge_bandwidth_schedule_list(client, + device_name, + resource_group_name): + return client.list_by_data_box_edge_device(device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_bandwidth_schedule_show(client, + device_name, + name, + resource_group_name): + return client.get(device_name=device_name, + name=name, + resource_group_name=resource_group_name) + + +def databoxedge_bandwidth_schedule_create(client, + device_name, + name, + resource_group_name, + start, + stop, + rate_in_mbps, + days, + no_wait=False): + parameters = {} + parameters['start'] = start + parameters['stop'] = stop + parameters['rate_in_mbps'] = rate_in_mbps + parameters['days'] = days + return sdk_no_wait(no_wait, + client.begin_create_or_update, + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + parameters=parameters) + + def databoxedge_bandwidth_schedule_update(instance, device_name, name, resource_group_name, - start=None, - stop=None, - rate_in_mbps=None, - days=None, + start, + stop, + rate_in_mbps, + days, no_wait=False): if start is not None: instance.start = start @@ -76,6 +198,48 @@ def databoxedge_bandwidth_schedule_update(instance, return instance +def databoxedge_bandwidth_schedule_delete(client, + device_name, + name, + resource_group_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + device_name=device_name, + name=name, + resource_group_name=resource_group_name) + + +def databoxedge_show_job(client, + device_name, + name, + resource_group_name): + return client.get(device_name=device_name, + name=name, + resource_group_name=resource_group_name) + + +def databoxedge_list_node(client, + device_name, + resource_group_name): + return client.list_by_data_box_edge_device(device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_order_list(client, + device_name, + resource_group_name): + return client.list_by_data_box_edge_device(device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_order_show(client, + device_name, + resource_group_name): + return client.get(device_name=device_name, + resource_group_name=resource_group_name) + + def databoxedge_order_create(client, device_name, resource_group_name, @@ -88,20 +252,22 @@ def databoxedge_order_create(client, company_name, phone, email_list, - status=None, + status, comments=None, address_line2=None, address_line3=None, no_wait=False): order = {} - if status: - order['current_status'] = {} - order['current_status']['status'] = status + order['current_status'] = {} + order['current_status']['status'] = status + if comments is not None: order['current_status']['comments'] = comments order['shipping_address'] = {} order['shipping_address']['address_line1'] = address_line1 - order['shipping_address']['address_line2'] = address_line2 - order['shipping_address']['address_line3'] = address_line3 + if address_line2 is not None: + order['shipping_address']['address_line2'] = address_line2 + if address_line3 is not None: + order['shipping_address']['address_line3'] = address_line3 order['shipping_address']['postal_code'] = postal_code order['shipping_address']['city'] = city order['shipping_address']['state'] = state @@ -112,7 +278,68 @@ def databoxedge_order_create(client, order['contact_information']['phone'] = phone order['contact_information']['email_list'] = email_list return sdk_no_wait(no_wait, - client.create_or_update, + client.begin_create_or_update, device_name=device_name, resource_group_name=resource_group_name, order=order) + + +def databoxedge_order_update(instance, + device_name, + resource_group_name, + status=None, + comments=None, + address_line1=None, + address_line2=None, + address_line3=None, + postal_code=None, + city=None, + state=None, + country=None, + contact_person=None, + company_name=None, + phone=None, + email_list=None, + no_wait=False): + if status is not None: + instance.current_status.status = status + if comments is not None: + instance.current_status.comments = comments + if address_line1 is not None: + instance.shipping_address.address_line1 = address_line1 + if address_line2 is not None: + instance.shipping_address.address_line2 = address_line2 + if address_line3 is not None: + instance.shipping_address.address_line3 = address_line3 + if postal_code is not None: + instance.shipping_address.postal_code = postal_code + if city is not None: + instance.shipping_address.city = city + if state is not None: + instance.shipping_address.state = state + if country is not None: + instance.shipping_address.country = country + if contact_person is not None: + instance.contact_information.contact_person = contact_person + if company_name is not None: + instance.contact_information.company_name = company_name + if phone is not None: + instance.contact_information.phone = phone + if email_list is not None: + instance.contact_information.email_list = email_list + return instance + + +def databoxedge_order_delete(client, + device_name, + resource_group_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + device_name=device_name, + resource_group_name=resource_group_name) + + +def databoxedge_list_sku(client, + filter_=None): + return client.list(filter=filter_) diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/hybrid_2019_03_01/example_steps.py b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/hybrid_2019_03_01/example_steps.py index cc5613e9873..c121e563394 100644 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/hybrid_2019_03_01/example_steps.py +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/hybrid_2019_03_01/example_steps.py @@ -227,6 +227,7 @@ def step_order_create(test, rg, checks=None): '--country "United States" ' '--postal-code "98052" ' '--state "WA" ' + '--status "Untracked" ' '--resource-group "{rg}"', checks=checks) diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/hybrid_2020_09_01/example_steps.py b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/hybrid_2020_09_01/example_steps.py index cc5613e9873..c121e563394 100644 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/hybrid_2020_09_01/example_steps.py +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/hybrid_2020_09_01/example_steps.py @@ -227,6 +227,7 @@ def step_order_create(test, rg, checks=None): '--country "United States" ' '--postal-code "98052" ' '--state "WA" ' + '--status "Untracked" ' '--resource-group "{rg}"', checks=checks) diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_bandwidth.yaml b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_bandwidth.yaml new file mode 100644 index 00000000000..462eddfbd12 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_bandwidth.yaml @@ -0,0 +1,537 @@ +interactions: +- request: + body: '{"properties": {"start": "00:00:00", "stop": "12:00:00", "rateInMbps": + 100, "days": ["Sunday"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule create + Connection: + - keep-alive + Content-Length: + - '96' + Content-Type: + - application/json + ParameterSetName: + - --device-name --days --name --rate-in-mbps --resource-group --start --stop + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 27 Jul 2021 06:25:18 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001/operationResults/e75131c7-4865-4fc0-9bfc-2ae72de700ad?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule create + Connection: + - keep-alive + ParameterSetName: + - --device-name --days --name --rate-in-mbps --resource-group --start --stop + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001/operationResults/e75131c7-4865-4fc0-9bfc-2ae72de700ad?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 27 Jul 2021 06:25:48 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule create + Connection: + - keep-alive + ParameterSetName: + - --device-name --days --name --rate-in-mbps --resource-group --start --stop + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"start\": \"00:00:00\",\r\n \"stop\": + \"12:00:00\",\r\n \"rateInMbps\": 100,\r\n \"days\": [\r\n \"Sunday\"\r\n + \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001\",\r\n + \ \"name\": \"cli-000001\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/bandwidthSchedules\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '411' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:26:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule update + Connection: + - keep-alive + ParameterSetName: + - --device-name --days --name --rate-in-mbps --resource-group --start --stop + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"start\": \"00:00:00\",\r\n \"stop\": + \"12:00:00\",\r\n \"rateInMbps\": 100,\r\n \"days\": [\r\n \"Sunday\"\r\n + \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001\",\r\n + \ \"name\": \"cli-000001\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/bandwidthSchedules\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '411' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:26:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"start": "12:00:00", "stop": "23:00:00", "rateInMbps": + 200, "days": ["Monday"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule update + Connection: + - keep-alive + Content-Length: + - '96' + Content-Type: + - application/json + ParameterSetName: + - --device-name --days --name --rate-in-mbps --resource-group --start --stop + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 27 Jul 2021 06:26:23 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001/operationResults/e4e00c5c-a410-4eb6-b1b3-c01a3568ad14?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule update + Connection: + - keep-alive + ParameterSetName: + - --device-name --days --name --rate-in-mbps --resource-group --start --stop + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001/operationResults/e4e00c5c-a410-4eb6-b1b3-c01a3568ad14?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 27 Jul 2021 06:26:54 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule update + Connection: + - keep-alive + ParameterSetName: + - --device-name --days --name --rate-in-mbps --resource-group --start --stop + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"start\": \"12:00:00\",\r\n \"stop\": + \"23:00:00\",\r\n \"rateInMbps\": 200,\r\n \"days\": [\r\n \"Monday\"\r\n + \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001\",\r\n + \ \"name\": \"cli-000001\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/bandwidthSchedules\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '411' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:27:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule list + Connection: + - keep-alive + ParameterSetName: + - -d -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"start\": + \"12:00:00\",\r\n \"stop\": \"23:00:00\",\r\n \"rateInMbps\": + 200,\r\n \"days\": [\r\n \"Monday\"\r\n ]\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001\",\r\n + \ \"name\": \"cli-000001\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/bandwidthSchedules\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '488' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:27:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule show + Connection: + - keep-alive + ParameterSetName: + - -d -g --name + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"start\": \"12:00:00\",\r\n \"stop\": + \"23:00:00\",\r\n \"rateInMbps\": 200,\r\n \"days\": [\r\n \"Monday\"\r\n + \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001\",\r\n + \ \"name\": \"cli-000001\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/bandwidthSchedules\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '411' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:27:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -d -g --name -y + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 27 Jul 2021 06:27:29 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001/operationResults/50ea05d9-9f93-4cd2-a4ce-ab8876cad4af?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule delete + Connection: + - keep-alive + ParameterSetName: + - -d -g --name -y + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules/cli-000001/operationResults/50ea05d9-9f93-4cd2-a4ce-ab8876cad4af?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Tue, 27 Jul 2021 06:27:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge bandwidth-schedule list + Connection: + - keep-alive + ParameterSetName: + - -d -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dtest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/dev1/bandwidthSchedules?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"value\": []\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '19' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 27 Jul 2021 06:28:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_device.yaml b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_device.yaml new file mode 100644 index 00000000000..782d527000d --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_device.yaml @@ -0,0 +1,484 @@ +interactions: +- request: + body: '{"location": "eastus", "sku": {"name": "Gateway"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device create + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + ParameterSetName: + - -l --sku --name -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n + \ \"name\": \"Gateway\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"etag\": + \"W/\\\"datetime'2021-07-09T08%3A26%3A04.8443805Z'\\\"_W/\\\"datetime'2021-07-09T08%3A26%3A04.8503839Z'\\\"\",\r\n + \ \"kind\": \"AzureDataBoxGateway\",\r\n \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": + \"ReadyToSetup\",\r\n \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": + 0,\r\n \"nodeCount\": 0,\r\n \"resourceMoveDetails\": {\r\n \"operationInProgress\": + \"None\"\r\n },\r\n \"edgeProfile\": {\r\n \"subscription\": {\r\n + \ \"state\": \"Registered\"\r\n }\r\n }\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004\",\r\n + \ \"name\": \"cli-000004\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '906' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 09 Jul 2021 08:26:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: '{"tags": {"key-000002": "val-000003"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device update + Connection: + - keep-alive + Content-Length: + - '38' + Content-Type: + - application/json + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"key-000002\": + \"val-000003\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Gateway\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"etag\": \"W/\\\"datetime'2021-07-09T08%3A26%3A07.7896289Z'\\\"_W/\\\"datetime'2021-07-09T08%3A26%3A07.7946324Z'\\\"\",\r\n + \ \"kind\": \"AzureDataBoxGateway\",\r\n \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": + \"ReadyToSetup\",\r\n \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": + 0,\r\n \"nodeCount\": 0,\r\n \"resourceMoveDetails\": {\r\n \"operationInProgress\": + \"None\"\r\n },\r\n \"edgeProfile\": {\r\n \"subscription\": {\r\n + \ \"registrationId\": \"af6b8fde-0002-4013-7071-2c13295b3d5f\",\r\n + \ \"state\": \"Registered\",\r\n \"subscriptionId\": \"b30fa0ef-69e5-436f-6006-6b3f86110300\"\r\n + \ }\r\n }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004\",\r\n + \ \"name\": \"cli-000004\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1076' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 09 Jul 2021 08:26:09 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"key-000002\": \"val-000003\"\r\n },\r\n + \ \"sku\": {\r\n \"name\": \"Gateway\",\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"etag\": \"W/\\\"datetime'2021-07-09T08%3A26%3A07.7896289Z'\\\"_W/\\\"datetime'2021-07-09T08%3A26%3A07.7946324Z'\\\"\",\r\n + \ \"kind\": \"AzureDataBoxGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004\",\r\n + \ \"name\": \"cli-000004\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '693' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 09 Jul 2021 08:26:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"key-000002\": + \"val-000003\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Gateway\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"etag\": \"W/\\\"datetime'2021-07-09T08%3A26%3A07.7896289Z'\\\"_W/\\\"datetime'2021-07-09T08%3A26%3A07.7946324Z'\\\"\",\r\n + \ \"kind\": \"AzureDataBoxGateway\",\r\n \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": + \"ReadyToSetup\",\r\n \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": + 0,\r\n \"nodeCount\": 0,\r\n \"edgeProfile\": {\r\n \"subscription\": + {\r\n \"registrationId\": \"af6b8fde-0002-4013-7071-2c13295b3d5f\",\r\n + \ \"state\": \"Registered\",\r\n \"subscriptionId\": \"b30fa0ef-69e5-436f-6006-6b3f86110300\"\r\n + \ }\r\n }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004\",\r\n + \ \"name\": \"cli-000004\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1001' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 09 Jul 2021 08:26:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device show-update-summary + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004/updateSummary/default?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"lastDownloadJobStatus\": \"Invalid\",\r\n + \ \"lastInstallJobStatus\": \"Invalid\",\r\n \"totalNumberOfUpdatesAvailable\": + 0,\r\n \"totalNumberOfUpdatesPendingDownload\": 0,\r\n \"totalNumberOfUpdatesPendingInstall\": + 0,\r\n \"rebootRequiredForInstall\": false,\r\n \"rebootBehavior\": + \"NeverReboots\",\r\n \"ongoingUpdateOperation\": \"None\",\r\n \"totalUpdateSizeInBytes\": + 0.0,\r\n \"totalTimeInMinutes\": 0\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004/updateSummary/default\",\r\n + \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/updateSummary\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '766' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 09 Jul 2021 08:26:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge alert list + Connection: + - keep-alive + ParameterSetName: + - -d -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004/alerts?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"value\": []\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '19' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 09 Jul 2021 08:26:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge list-node + Connection: + - keep-alive + ParameterSetName: + - -g -d + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004/nodes?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"value\": []\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '19' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 09 Jul 2021 08:26:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 09 Jul 2021 08:26:17 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004/operationResults/17e96d05-91c2-4047-8287-0745a42082be?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device delete + Connection: + - keep-alive + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000004/operationResults/17e96d05-91c2-4047-8287-0745a42082be?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Fri, 09 Jul 2021 08:26:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices?api-version=2021-02-01-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 09 Jul 2021 08:27:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_device_general.yaml b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_device_general.yaml deleted file mode 100644 index 1c1792cc20d..00000000000 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_device_general.yaml +++ /dev/null @@ -1,449 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus", "sku": {"name": "Edge"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device create - Connection: - - keep-alive - Content-Length: - - '47' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - --location --sku --name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice?api-version=2019-08-01 - response: - body: - string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n - \ \"name\": \"Edge\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"etag\": - \"W/\\\"datetime'2021-02-25T09%3A04%3A32.4344849Z'\\\"_W/\\\"datetime'2021-02-25T09%3A04%3A32.4434928Z'\\\"\",\r\n - \ \"identity\": {\r\n \"type\": \"None\"\r\n },\r\n \"properties\": {\r\n - \ \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n \"deviceType\": - \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": 0,\r\n \"nodeCount\": - 0,\r\n \"resourceMoveDetails\": {\r\n \"operationInProgress\": \"None\"\r\n - \ }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '805' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:33 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device show - Connection: - - keep-alive - ParameterSetName: - - --name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice?api-version=2019-08-01 - response: - body: - string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n - \ \"name\": \"Edge\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"etag\": - \"W/\\\"datetime'2021-02-25T09%3A04%3A32.4344849Z'\\\"_W/\\\"datetime'2021-02-25T09%3A04%3A32.4434928Z'\\\"\",\r\n - \ \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n - \ \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": - 0,\r\n \"nodeCount\": 0\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '687' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:35 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device list - Connection: - - keep-alive - ParameterSetName: - - --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices?api-version=2019-08-01 - response: - body: - string: "{\r\n \"value\": [\r\n {\r\n \"location\": \"eastus\",\r\n - \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Edge\",\r\n - \ \"tier\": \"Standard\"\r\n },\r\n \"etag\": \"W/\\\"datetime'2021-02-25T09%3A04%3A32.4344849Z'\\\"_W/\\\"datetime'2021-02-25T09%3A04%3A32.4434928Z'\\\"\",\r\n - \ \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n - \ \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": - 0,\r\n \"nodeCount\": 0\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n - \ }\r\n ]\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '784' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:36 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device list - Connection: - - keep-alive - ParameterSetName: - - -g - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices?api-version=2019-08-01 - response: - body: - string: "{\r\n \"value\": [\r\n {\r\n \"location\": \"eastus\",\r\n - \ \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Edge\",\r\n - \ \"tier\": \"Standard\"\r\n },\r\n \"etag\": \"W/\\\"datetime'2021-02-25T09%3A04%3A32.4344849Z'\\\"_W/\\\"datetime'2021-02-25T09%3A04%3A32.4434928Z'\\\"\",\r\n - \ \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n - \ \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": - 0,\r\n \"nodeCount\": 0\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n - \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n - \ \"sku\": {\r\n \"name\": \"Edge\",\r\n \"tier\": \"Standard\"\r\n - \ },\r\n \"etag\": \"W/\\\"datetime'2021-02-25T09%3A04%3A32.9229712Z'\\\"_W/\\\"datetime'2021-02-25T09%3A04%3A32.9299758Z'\\\"\",\r\n - \ \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n - \ \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": - 0,\r\n \"nodeCount\": 0\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestmxnw7elfklpidooissbiwqufvc2n2jdh5pr3h7bxf45gynvanks5zqgfbvvn7don6txt/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n - \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n - \ \"sku\": {\r\n \"name\": \"Gateway\",\r\n \"tier\": \"Standard\"\r\n - \ },\r\n \"etag\": \"W/\\\"datetime'2021-02-25T07%3A56%3A56.7201744Z'\\\"_W/\\\"datetime'2021-02-25T07%3A56%3A56.7311819Z'\\\"\",\r\n - \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": - \"c9fd4631-c426-427e-bfda-13038fdcc74f\",\r\n \"tenantId\": \"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a\"\r\n - \ },\r\n \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": - \"ReadyToSetup\",\r\n \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": - 0,\r\n \"nodeCount\": 1\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testdevice\",\r\n - \ \"name\": \"testdevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n - \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n - \ \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": - \"Edge\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"etag\": - \"W/\\\"datetime'2021-01-26T09%3A07%3A36.5150105Z'\\\"_W/\\\"datetime'2021-01-26T09%3A07%3A36.5220156Z'\\\"\",\r\n - \ \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n - \ \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": - 0,\r\n \"nodeCount\": 0\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n - \ }\r\n ]\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '3155' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:37 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"tags": {"Key1": "value1", "Key2": "value2"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device update - Connection: - - keep-alive - Content-Length: - - '46' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - --name --tags --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice?api-version=2019-08-01 - response: - body: - string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"Key1\": - \"value1\",\r\n \"Key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": - \"Edge\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"etag\": \"W/\\\"datetime'2021-02-25T09%3A04%3A39.5956978Z'\\\"_W/\\\"datetime'2021-02-25T09%3A04%3A39.6027025Z'\\\"\",\r\n - \ \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n - \ \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": - 0,\r\n \"nodeCount\": 0,\r\n \"resourceMoveDetails\": {\r\n \"operationInProgress\": - \"None\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '811' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:42 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device show - Connection: - - keep-alive - ParameterSetName: - - --name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice?api-version=2019-08-01 - response: - body: - string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"Key1\": - \"value1\",\r\n \"Key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": - \"Edge\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"etag\": \"W/\\\"datetime'2021-02-25T09%3A04%3A39.5956978Z'\\\"_W/\\\"datetime'2021-02-25T09%3A04%3A39.6027025Z'\\\"\",\r\n - \ \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n - \ \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": - 0,\r\n \"nodeCount\": 0\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '736' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:43 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y --name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice?api-version=2019-08-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Thu, 25 Feb 2021 09:04:51 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device list - Connection: - - keep-alive - ParameterSetName: - - --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices?api-version=2019-08-01 - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '12' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:52 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_general_Scenario.yaml b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_general_Scenario.yaml deleted file mode 100644 index 8dbe4b82af9..00000000000 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_general_Scenario.yaml +++ /dev/null @@ -1,45 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge list-sku - Connection: - - keep-alive - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataBoxEdge/skus?api-version=2019-08-01 - response: - body: - string: '{"value":[{"resourceType":"dataBoxEdgeDevices","name":"Edge","locations":["eastus2euap"],"locationInfo":[{"location":"eastus2euap","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Gateway","locations":["eastus2euap"],"locationInfo":[{"location":"eastus2euap","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Edge","locations":["centraluseuap"],"locationInfo":[{"location":"centraluseuap","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Gateway","locations":["centraluseuap"],"locationInfo":[{"location":"centraluseuap","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Edge","locations":["eastus"],"locationInfo":[{"location":"eastus","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Gateway","locations":["eastus"],"locationInfo":[{"location":"eastus","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Edge","locations":["westeurope"],"locationInfo":[{"location":"westeurope","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Gateway","locations":["westeurope"],"locationInfo":[{"location":"westeurope","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Edge","locations":["westcentralus"],"locationInfo":[{"location":"westcentralus","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Gateway","locations":["westcentralus"],"locationInfo":[{"location":"westcentralus","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Edge","locations":["westus2"],"locationInfo":[{"location":"westus2","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Gateway","locations":["westus2"],"locationInfo":[{"location":"westus2","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Edge","locations":["southeastasia"],"locationInfo":[{"location":"southeastasia","zones":[],"zoneDetails":[]}],"restrictions":[]},{"resourceType":"dataBoxEdgeDevices","name":"Gateway","locations":["southeastasia"],"locationInfo":[{"location":"southeastasia","zones":[],"zoneDetails":[]}],"restrictions":[]}]}' - headers: - cache-control: - - no-cache - content-length: - - '2396' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:25 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_order.yaml b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_order.yaml new file mode 100644 index 00000000000..ef6228b3272 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_order.yaml @@ -0,0 +1,663 @@ +interactions: +- request: + body: '{"location": "eastus", "sku": {"name": "EdgeP_Base"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge device create + Connection: + - keep-alive + Content-Length: + - '53' + Content-Type: + - application/json + ParameterSetName: + - -l --sku --name -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n + \ \"name\": \"EdgeP_Base\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"etag\": + \"W/\\\"datetime'2021-07-12T02%3A58%3A04.4914927Z'\\\"_W/\\\"datetime'2021-07-12T02%3A58%3A04.4974969Z'\\\"\",\r\n + \ \"kind\": \"AzureStackEdge\",\r\n \"properties\": {\r\n \"dataBoxEdgeDeviceStatus\": + \"ReadyToSetup\",\r\n \"deviceType\": \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": + 0,\r\n \"nodeCount\": 0,\r\n \"resourceMoveDetails\": {\r\n \"operationInProgress\": + \"None\"\r\n },\r\n \"edgeProfile\": {\r\n \"subscription\": {\r\n + \ \"state\": \"Registered\"\r\n }\r\n }\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002\",\r\n + \ \"name\": \"cli-000002\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '904' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 12 Jul 2021 02:58:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"contactInformation": {"contactPerson": "JohnMcclane", + "companyName": "Microsoft", "phone": "426-9400", "emailList": ["john@microsoft.com"]}, + "shippingAddress": {"addressLine1": "MicrosoftCorporation", "postalCode": "98052", + "city": "WA", "state": "WA", "country": "United States"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order create + Connection: + - keep-alive + Content-Length: + - '299' + Content-Type: + - application/json + ParameterSetName: + - --device-name --company-name --contact-person --email-list --phone --address-line1 + --city --country --postal-code --state --resource-group --status + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 12 Jul 2021 02:58:06 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default/operationResults/c8b81dc7-dff6-4706-8667-644255873623?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order create + Connection: + - keep-alive + ParameterSetName: + - --device-name --company-name --contact-person --email-list --phone --address-line1 + --city --country --postal-code --state --resource-group --status + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default/operationResults/c8b81dc7-dff6-4706-8667-644255873623?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 12 Jul 2021 02:58:38 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order create + Connection: + - keep-alive + ParameterSetName: + - --device-name --company-name --contact-person --email-list --phone --address-line1 + --city --country --postal-code --state --resource-group --status + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"contactInformation\": {\r\n \"contactPerson\": + \"JohnMcclane\",\r\n \"companyName\": \"Microsoft\",\r\n \"phone\": + \"426-9400\",\r\n \"emailList\": [\r\n \"john@microsoft.com\"\r\n + \ ]\r\n },\r\n \"shippingAddress\": {\r\n \"addressLine1\": + \"MicrosoftCorporation\",\r\n \"postalCode\": \"98052\",\r\n \"city\": + \"WA\",\r\n \"state\": \"WA\",\r\n \"country\": \"United States\"\r\n + \ },\r\n \"currentStatus\": {\r\n \"status\": \"Untracked\",\r\n + \ \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n \"comments\": + \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n },\r\n \"orderHistory\": [\r\n {\r\n \"status\": + \"Untracked\",\r\n \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n + \ \"comments\": \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n }\r\n ],\r\n \"deliveryTrackingInfo\": [],\r\n \"returnTrackingInfo\": + [],\r\n \"shipmentType\": \"ShippedToCustomer\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default\",\r\n + \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/orders\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1292' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 12 Jul 2021 02:59:08 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order update + Connection: + - keep-alive + ParameterSetName: + - --device-name --company-name --contact-person --email-list --phone --address-line1 + --city --country --postal-code --state --resource-group --status + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"contactInformation\": {\r\n \"contactPerson\": + \"JohnMcclane\",\r\n \"companyName\": \"Microsoft\",\r\n \"phone\": + \"426-9400\",\r\n \"emailList\": [\r\n \"john@microsoft.com\"\r\n + \ ]\r\n },\r\n \"shippingAddress\": {\r\n \"addressLine1\": + \"MicrosoftCorporation\",\r\n \"postalCode\": \"98052\",\r\n \"city\": + \"WA\",\r\n \"state\": \"WA\",\r\n \"country\": \"United States\"\r\n + \ },\r\n \"currentStatus\": {\r\n \"status\": \"Untracked\",\r\n + \ \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n \"comments\": + \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n },\r\n \"orderHistory\": [\r\n {\r\n \"status\": + \"Untracked\",\r\n \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n + \ \"comments\": \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n }\r\n ],\r\n \"deliveryTrackingInfo\": [],\r\n \"returnTrackingInfo\": + [],\r\n \"shipmentType\": \"ShippedToCustomer\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default\",\r\n + \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/orders\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1292' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 12 Jul 2021 02:59:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"contactInformation": {"contactPerson": "JohnMcclane", + "companyName": "Microsoft", "phone": "426-9400", "emailList": ["john@microsoft.com"]}, + "shippingAddress": {"addressLine1": "MicrosoftCorporation", "postalCode": "98052", + "city": "WA", "state": "WA", "country": "United States"}, "shipmentType": "ShippedToCustomer"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order update + Connection: + - keep-alive + Content-Length: + - '336' + Content-Type: + - application/json + ParameterSetName: + - --device-name --company-name --contact-person --email-list --phone --address-line1 + --city --country --postal-code --state --resource-group --status + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 12 Jul 2021 02:59:12 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default/operationResults/e750873e-e353-4230-9b45-b688592805f7?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order update + Connection: + - keep-alive + ParameterSetName: + - --device-name --company-name --contact-person --email-list --phone --address-line1 + --city --country --postal-code --state --resource-group --status + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default/operationResults/e750873e-e353-4230-9b45-b688592805f7?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 12 Jul 2021 02:59:42 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order update + Connection: + - keep-alive + ParameterSetName: + - --device-name --company-name --contact-person --email-list --phone --address-line1 + --city --country --postal-code --state --resource-group --status + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"contactInformation\": {\r\n \"contactPerson\": + \"JohnMcclane\",\r\n \"companyName\": \"Microsoft\",\r\n \"phone\": + \"426-9400\",\r\n \"emailList\": [\r\n \"john@microsoft.com\"\r\n + \ ]\r\n },\r\n \"shippingAddress\": {\r\n \"addressLine1\": + \"MicrosoftCorporation\",\r\n \"postalCode\": \"98052\",\r\n \"city\": + \"WA\",\r\n \"state\": \"WA\",\r\n \"country\": \"United States\"\r\n + \ },\r\n \"currentStatus\": {\r\n \"status\": \"Untracked\",\r\n + \ \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n \"comments\": + \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n },\r\n \"orderHistory\": [\r\n {\r\n \"status\": + \"Untracked\",\r\n \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n + \ \"comments\": \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n }\r\n ],\r\n \"deliveryTrackingInfo\": [],\r\n \"returnTrackingInfo\": + [],\r\n \"shipmentType\": \"ShippedToCustomer\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default\",\r\n + \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/orders\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1292' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 12 Jul 2021 03:00:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order list + Connection: + - keep-alive + ParameterSetName: + - -d -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"contactInformation\": + {\r\n \"contactPerson\": \"JohnMcclane\",\r\n \"companyName\": + \"Microsoft\",\r\n \"phone\": \"426-9400\",\r\n \"emailList\": + [\r\n \"john@microsoft.com\"\r\n ]\r\n },\r\n \"shippingAddress\": + {\r\n \"addressLine1\": \"MicrosoftCorporation\",\r\n \"postalCode\": + \"98052\",\r\n \"city\": \"WA\",\r\n \"state\": \"WA\",\r\n + \ \"country\": \"United States\"\r\n },\r\n \"currentStatus\": + {\r\n \"status\": \"Untracked\",\r\n \"updateDateTime\": + \"0001-01-01T00:00:00Z\",\r\n \"comments\": \"Initialising Order + with Untracked status\",\r\n \"additionalOrderDetails\": {}\r\n },\r\n + \ \"orderHistory\": [\r\n {\r\n \"status\": \"Untracked\",\r\n + \ \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n \"comments\": + \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n }\r\n ],\r\n \"deliveryTrackingInfo\": [],\r\n + \ \"returnTrackingInfo\": [],\r\n \"shipmentType\": \"ShippedToCustomer\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default\",\r\n + \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/orders\"\r\n + \ }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1473' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 12 Jul 2021 03:00:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order show + Connection: + - keep-alive + ParameterSetName: + - -d -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"contactInformation\": {\r\n \"contactPerson\": + \"JohnMcclane\",\r\n \"companyName\": \"Microsoft\",\r\n \"phone\": + \"426-9400\",\r\n \"emailList\": [\r\n \"john@microsoft.com\"\r\n + \ ]\r\n },\r\n \"shippingAddress\": {\r\n \"addressLine1\": + \"MicrosoftCorporation\",\r\n \"postalCode\": \"98052\",\r\n \"city\": + \"WA\",\r\n \"state\": \"WA\",\r\n \"country\": \"United States\"\r\n + \ },\r\n \"currentStatus\": {\r\n \"status\": \"Untracked\",\r\n + \ \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n \"comments\": + \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n },\r\n \"orderHistory\": [\r\n {\r\n \"status\": + \"Untracked\",\r\n \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n + \ \"comments\": \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": + {}\r\n }\r\n ],\r\n \"deliveryTrackingInfo\": [],\r\n \"returnTrackingInfo\": + [],\r\n \"shipmentType\": \"ShippedToCustomer\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default\",\r\n + \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/orders\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1292' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 12 Jul 2021 03:00:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -d -g -y + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 12 Jul 2021 03:00:18 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default/operationResults/6b78d7af-2d0f-4cad-a0a1-3ea767a27e4d?api-version=2021-02-01-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order delete + Connection: + - keep-alive + ParameterSetName: + - -d -g -y + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders/default/operationResults/6b78d7af-2d0f-4cad-a0a1-3ea767a27e4d?api-version=2021-02-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Mon, 12 Jul 2021 03:00:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - databoxedge order list + Connection: + - keep-alive + ParameterSetName: + - -d -g + User-Agent: + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-databoxedge/1.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/cli-000002/orders?api-version=2021-02-01-preview + response: + body: + string: "{\r\n \"value\": []\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '19' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 12 Jul 2021 03:01:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_order_Scenario.yaml b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_order_Scenario.yaml deleted file mode 100644 index 26ae323d4ac..00000000000 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/recordings/test_order_Scenario.yaml +++ /dev/null @@ -1,520 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus", "sku": {"name": "Edge"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device create - Connection: - - keep-alive - Content-Length: - - '47' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - --location --sku --name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice?api-version=2019-08-01 - response: - body: - string: "{\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n - \ \"name\": \"Edge\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"etag\": - \"W/\\\"datetime'2021-02-25T09%3A04%3A32.9229712Z'\\\"_W/\\\"datetime'2021-02-25T09%3A04%3A32.9299758Z'\\\"\",\r\n - \ \"identity\": {\r\n \"type\": \"None\"\r\n },\r\n \"properties\": {\r\n - \ \"dataBoxEdgeDeviceStatus\": \"ReadyToSetup\",\r\n \"deviceType\": - \"DataBoxEdgeDevice\",\r\n \"deviceLocalCapacity\": 0,\r\n \"nodeCount\": - 0,\r\n \"resourceMoveDetails\": {\r\n \"operationInProgress\": \"None\"\r\n - \ }\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice\",\r\n - \ \"name\": \"testedgedevice\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '805' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:04:33 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: OK -- request: - body: '{"properties": {"contactInformation": {"contactPerson": "John Mcclane", - "companyName": "Microsoft", "phone": "(800) 426-9400", "emailList": ["john@microsoft.com"]}, - "shippingAddress": {"addressLine1": "Microsoft Corporation", "addressLine2": - "One Microsoft Way", "addressLine3": "Redmond", "postalCode": "98052", "city": - "WA", "state": "WA", "country": "United States"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge order create - Connection: - - keep-alive - Content-Length: - - '371' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - --device-name --company-name --contact-person --email-list --phone --address-line1 - --address-line2 --address-line3 --city --country --postal-code --state --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default?api-version=2019-08-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 25 Feb 2021 09:04:36 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default/operationResults/140fe4c9-921b-4029-a284-d4cd73cad10a?api-version=2019-08-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge order create - Connection: - - keep-alive - ParameterSetName: - - --device-name --company-name --contact-person --email-list --phone --address-line1 - --address-line2 --address-line3 --city --country --postal-code --state --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default/operationResults/140fe4c9-921b-4029-a284-d4cd73cad10a?api-version=2019-08-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 25 Feb 2021 09:05:06 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default?api-version=2019-08-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge order create - Connection: - - keep-alive - ParameterSetName: - - --device-name --company-name --contact-person --email-list --phone --address-line1 - --address-line2 --address-line3 --city --country --postal-code --state --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default?api-version=2019-08-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"contactInformation\": {\r\n \"contactPerson\": - \"John Mcclane\",\r\n \"companyName\": \"Microsoft\",\r\n \"phone\": - \"(800) 426-9400\",\r\n \"emailList\": [\r\n \"john@microsoft.com\"\r\n - \ ]\r\n },\r\n \"shippingAddress\": {\r\n \"addressLine1\": - \"Microsoft Corporation\",\r\n \"addressLine2\": \"One Microsoft Way\",\r\n - \ \"addressLine3\": \"Redmond\",\r\n \"postalCode\": \"98052\",\r\n - \ \"city\": \"WA\",\r\n \"state\": \"WA\",\r\n \"country\": - \"United States\"\r\n },\r\n \"currentStatus\": {\r\n \"status\": - \"Untracked\",\r\n \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n - \ \"comments\": \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": - {}\r\n },\r\n \"orderHistory\": [\r\n {\r\n \"status\": - \"Untracked\",\r\n \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n - \ \"comments\": \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": - {}\r\n }\r\n ],\r\n \"deliveryTrackingInfo\": [],\r\n \"returnTrackingInfo\": - []\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default\",\r\n - \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/orders\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1330' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:05:36 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge order show - Connection: - - keep-alive - ParameterSetName: - - --device-name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default?api-version=2019-08-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"contactInformation\": {\r\n \"contactPerson\": - \"John Mcclane\",\r\n \"companyName\": \"Microsoft\",\r\n \"phone\": - \"(800) 426-9400\",\r\n \"emailList\": [\r\n \"john@microsoft.com\"\r\n - \ ]\r\n },\r\n \"shippingAddress\": {\r\n \"addressLine1\": - \"Microsoft Corporation\",\r\n \"addressLine2\": \"One Microsoft Way\",\r\n - \ \"addressLine3\": \"Redmond\",\r\n \"postalCode\": \"98052\",\r\n - \ \"city\": \"WA\",\r\n \"state\": \"WA\",\r\n \"country\": - \"United States\"\r\n },\r\n \"currentStatus\": {\r\n \"status\": - \"Untracked\",\r\n \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n - \ \"comments\": \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": - {}\r\n },\r\n \"orderHistory\": [\r\n {\r\n \"status\": - \"Untracked\",\r\n \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n - \ \"comments\": \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": - {}\r\n }\r\n ],\r\n \"deliveryTrackingInfo\": [],\r\n \"returnTrackingInfo\": - []\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default\",\r\n - \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/orders\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1330' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:05:39 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge order list - Connection: - - keep-alive - ParameterSetName: - - --device-name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders?api-version=2019-08-01 - response: - body: - string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"contactInformation\": - {\r\n \"contactPerson\": \"John Mcclane\",\r\n \"companyName\": - \"Microsoft\",\r\n \"phone\": \"(800) 426-9400\",\r\n \"emailList\": - [\r\n \"john@microsoft.com\"\r\n ]\r\n },\r\n \"shippingAddress\": - {\r\n \"addressLine1\": \"Microsoft Corporation\",\r\n \"addressLine2\": - \"One Microsoft Way\",\r\n \"addressLine3\": \"Redmond\",\r\n \"postalCode\": - \"98052\",\r\n \"city\": \"WA\",\r\n \"state\": \"WA\",\r\n - \ \"country\": \"United States\"\r\n },\r\n \"currentStatus\": - {\r\n \"status\": \"Untracked\",\r\n \"updateDateTime\": - \"0001-01-01T00:00:00Z\",\r\n \"comments\": \"Initialising Order - with Untracked status\",\r\n \"additionalOrderDetails\": {}\r\n },\r\n - \ \"orderHistory\": [\r\n {\r\n \"status\": \"Untracked\",\r\n - \ \"updateDateTime\": \"0001-01-01T00:00:00Z\",\r\n \"comments\": - \"Initialising Order with Untracked status\",\r\n \"additionalOrderDetails\": - {}\r\n }\r\n ],\r\n \"deliveryTrackingInfo\": [],\r\n - \ \"returnTrackingInfo\": []\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default\",\r\n - \ \"name\": \"default\",\r\n \"type\": \"Microsoft.DataBoxEdge/dataBoxEdgeDevices/orders\"\r\n - \ }\r\n ]\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1515' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:05:40 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge order delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y --device-name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default?api-version=2019-08-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 25 Feb 2021 09:05:42 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default/operationResults/9b0232f0-0fbf-4390-9f75-4031539fdded?api-version=2019-08-01 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge order delete - Connection: - - keep-alive - ParameterSetName: - - -y --device-name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders/default/operationResults/9b0232f0-0fbf-4390-9f75-4031539fdded?api-version=2019-08-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Thu, 25 Feb 2021 09:06:13 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge order list - Connection: - - keep-alive - ParameterSetName: - - --device-name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/orders?api-version=2019-08-01 - response: - body: - string: "{\r\n \"value\": []\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '19' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 25 Feb 2021 09:06:15 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - databoxedge device delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -y --name --resource-group - User-Agent: - - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-databoxedge/0.2.0 Azure-SDK-For-Python AZURECLI/2.19.1 - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice?api-version=2019-08-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - date: - - Thu, 25 Feb 2021 09:06:22 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 204 - message: No Content -version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_device_scenario.py b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_device_scenario.py index 47ebcffebe3..9eeb33819fb 100644 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_device_scenario.py +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_device_scenario.py @@ -1,134 +1,67 @@ -# -------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------- # 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. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- -import os -from azure.cli.testsdk.checkers import JMESPathCheckGreaterThan -from azure.cli.testsdk import ScenarioTest -from azure.cli.testsdk import ResourceGroupPreparer -from .example_steps import step_device_create -from .example_steps import step_device_show -from .example_steps import step_device_list -from .example_steps import step_device_list2 -from .example_steps import step_device_update -from .example_steps import step_device_delete -from .example_steps import step_device_create_min -from .example_steps import step_device_show_min -from .example_steps import step_device_list_min -from .example_steps import step_device_list2_min -from .example_steps import step_device_update_min -from .example_steps import step_device_delete_min -from .. import ( - try_manual, - raise_if, - calc_coverage -) +import time +from azure.cli.testsdk import ScenarioTest,ResourceGroupPreparer -TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) +class TestDevice(ScenarioTest): - -# Env setup_general -@try_manual -def setup_general(test, rg): - pass - - -# Env cleanup_general -@try_manual -def cleanup_general(test, rg): - pass - - -# Testcase: general -@try_manual -def call_general(test, rg): - setup_general(test, rg) - step_device_create(test, rg, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("sku.name", "Edge", case_sensitive=False), - test.check("sku.tier", "Standard", case_sensitive=False), - test.check("name", "{myDevice}", case_sensitive=False), - ]) - step_device_show(test, rg, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("sku.name", "Edge", case_sensitive=False), - test.check("sku.tier", "Standard", case_sensitive=False), - test.check("name", "{myDevice}", case_sensitive=False), - ]) - step_device_list(test, rg, checks=[ - test.check('length(@)', 1), - ]) - step_device_list2(test, rg, checks=[ - JMESPathCheckGreaterThan('length(@)', 0), - ]) - step_device_update(test, rg, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("sku.name", "Edge", case_sensitive=False), - test.check("sku.tier", "Standard", case_sensitive=False), - test.check("name", "{myDevice}", case_sensitive=False), - test.check("tags.Key1", "value1", case_sensitive=False), - test.check("tags.Key2", "value2", case_sensitive=False), - ]) - step_device_show(test, rg, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("sku.name", "Edge", case_sensitive=False), - test.check("sku.tier", "Standard", case_sensitive=False), - test.check("name", "{myDevice}", case_sensitive=False), - ]) - step_device_delete(test, rg, checks=[]) - step_device_list(test, rg, checks=[ - test.check('length(@)', 0), - ]) - cleanup_general(test, rg) - - -@try_manual -def call_general_min(test, rg): - setup_general(test, rg) - step_device_create_min(test, rg, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("name", "{myDevice}", case_sensitive=False), - ]) - step_device_show_min(test, rg, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("name", "{myDevice}", case_sensitive=False), - ]) - step_device_list_min(test, rg, checks=[ - test.check('length(@)', 1), - ]) - step_device_list2_min(test, rg, checks=[ - test.check('length(@)', 1), - ]) - step_device_update_min(test, rg, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("name", "{myDevice}", case_sensitive=False), - ]) - step_device_show_min(test, rg, checks=[ - test.check("location", "eastus", case_sensitive=False), - test.check("name", "{myDevice}", case_sensitive=False), - ]) - step_device_delete_min(test, rg, checks=[]) - cleanup_general(test, rg) - - -# Test class for general -@try_manual -class DevicegeneralTest(ScenarioTest): - - @ResourceGroupPreparer(name_prefix='clitestdataboxedge_GroupForEdgeAutomation'[:7], key='rg', parameter_name='rg') - def test_device_general(self, rg): + @ResourceGroupPreparer(key='rg') + def test_device(self): + tag_key = self.create_random_name(prefix='key-', length=10) + tag_value = self.create_random_name(prefix='val-', length=10) self.kwargs.update({ - 'myDevice': 'testedgedevice', + 'name': self.create_random_name(prefix='cli-', length=20), + 'sku': 'Gateway', + 'location': 'eastus', + 'tags': tag_key + '=' + tag_value, }) - call_general(self, rg) - calc_coverage(__file__) - raise_if() + device = self.cmd('databoxedge device create -l {location} --sku {sku} --name {name} -g {rg}', checks=[ + self.check('name', '{name}'), + self.check('resourceGroup', '{rg}'), + self.check('deviceType', 'DataBoxEdgeDevice'), + self.check('sku.name', '{sku}'), + self.check('sku.tier', 'Standard'), + self.check('location', '{location}') + ]).get_output_in_json() + + self.cmd('databoxedge device update --name {name} -g {rg} --tags {tags}', checks=[ + self.check('id', device['id']), + self.check('name', '{name}'), + self.check('resourceGroup', '{rg}'), + self.check('tags', {tag_key: tag_value}) + ]) + + self.cmd('databoxedge device list -g {rg}', checks=[ + self.check('length(@)', 1), + self.check('type(@)', 'array'), + self.check('[0].id', device['id']), + self.check('[0].name', '{name}'), + self.check('[0].resourceGroup', '{rg}'), + self.check('[0].tags', {tag_key: tag_value}) + ]) + + self.cmd('databoxedge device show -n {name} -g {rg}', checks=[ + self.check('name', '{name}'), + self.check('resourceGroup', '{rg}'), + self.check('deviceType', 'DataBoxEdgeDevice'), + self.check('sku.name', '{sku}'), + self.check('sku.tier', 'Standard'), + self.check('location', '{location}'), + self.check('tags', {tag_key: tag_value}) + ]) + + self.cmd('databoxedge device show-update-summary -n {name} -g {rg}', checks=[ + self.check('name', 'default'), + self.check('resourceGroup', '{rg}') + ]) + self.cmd('databoxedge alert list -d {name} -g {rg}', checks=self.is_empty()) + self.cmd('databoxedge list-node -g {rg} -d {name}', checks=self.is_empty()) + self.cmd('databoxedge device delete -n {name} -g {rg} -y') + time.sleep(30) + self.cmd('databoxedge device list -g {rg}', checks=[self.is_empty()]) diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_general_scenario.py b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_general_scenario.py index ccad26e2bed..1cbc5bf0b38 100644 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_general_scenario.py +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_general_scenario.py @@ -1,67 +1,77 @@ -# -------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------- # 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. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- -import os -from azure.cli.testsdk.checkers import JMESPathCheckGreaterThan -from azure.cli.testsdk import ScenarioTest -from azure.cli.testsdk import ResourceGroupPreparer -from .example_steps import step_list_sku -from .example_steps import step_list_sku_min -from .. import ( - try_manual, - raise_if, - calc_coverage -) +import time +import unittest +from azure.cli.testsdk import ScenarioTest, record_only -TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) +class TestBandwidth(ScenarioTest): - -# Env setup_scenario -@try_manual -def setup_scenario(test, rg): - pass - - -# Env cleanup_scenario -@try_manual -def cleanup_scenario(test, rg): - pass - - -# Testcase: Scenario -@try_manual -def call_scenario(test, rg): - setup_scenario(test, rg) - step_list_sku(test, rg, checks=[JMESPathCheckGreaterThan('length(@)', 0)]) - cleanup_scenario(test, rg) - - -@try_manual -def call_scenario_min(test, rg): - setup_scenario(test, rg) - step_list_sku_min(test, rg, checks=[]) - cleanup_scenario(test, rg) - - -# Test class for Scenario -@try_manual -class GeneralScenarioTest(ScenarioTest): - - @ResourceGroupPreparer(name_prefix='clitestdataboxedge_GroupForEdgeAutomation'[:7], key='rg', parameter_name='rg') - def test_general_Scenario(self, rg): + @record_only() + def test_bandwidth(self): self.kwargs.update({ - 'myDevice': 'testedgedevice', + 'rg': 'dtest', + 'name': 'dev1', + 'bwname': self.create_random_name(prefix='cli-', length=10), + 'sku': 'Edge', + 'location': 'eastus', + 'days': 'Sunday', + 'days-update': 'Monday', + 'rate': '100', + 'rate-update': '200', + 'start': '00:00:00', + 'start-update': '12:00:00', + 'stop': '12:00:00', + 'stop-update' : '23:00:00' }) - call_scenario(self, rg) - calc_coverage(__file__) - raise_if() + schedule = self.cmd('az databoxedge bandwidth-schedule create ' + '--device-name {name} --days {days} ' + '--name {bwname} --rate-in-mbps {rate} ' + '--resource-group {rg} --start {start} --stop {stop}',checks=[ + self.check('days', ['Sunday']), + self.check('name', '{bwname}'), + self.check('rateInMbps', '{rate}'), + self.check('resourceGroup', '{rg}'), + self.check('start', '{start}'), + self.check('stop', '{stop}') + ]).get_output_in_json() + + self.cmd('az databoxedge bandwidth-schedule update ' + '--device-name {name} --days {days-update} ' + '--name {bwname} --rate-in-mbps {rate-update} ' + '--resource-group {rg} --start {start-update} --stop {stop-update}',checks=[ + self.check('id', schedule['id']), + self.check('days', ['Monday']), + self.check('name', '{bwname}'), + self.check('rateInMbps', '{rate-update}'), + self.check('resourceGroup', '{rg}'), + self.check('start', '{start-update}'), + self.check('stop', '{stop-update}') + ]) + + self.cmd('databoxedge bandwidth-schedule list -d {name} -g {rg}', checks=[ + self.check('[0].id', schedule['id']), + self.check('[0].days', ['Monday']), + self.check('[0].name', '{bwname}'), + self.check('[0].rateInMbps', '{rate-update}'), + self.check('[0].resourceGroup', '{rg}'), + self.check('[0].start', '{start-update}'), + self.check('[0].stop', '{stop-update}') + ]) + self.cmd('databoxedge bandwidth-schedule show -d {name} -g {rg} --name {bwname}', checks=[ + self.check('id', schedule['id']), + self.check('days', ['Monday']), + self.check('name', '{bwname}'), + self.check('rateInMbps', '{rate-update}'), + self.check('resourceGroup', '{rg}'), + self.check('start', '{start-update}'), + self.check('stop', '{stop-update}') + ]) + self.cmd('databoxedge bandwidth-schedule delete -d {name} -g {rg} --name {bwname} -y') + time.sleep(20) + self.cmd('databoxedge bandwidth-schedule list -d {name} -g {rg}', checks=[self.is_empty()]) diff --git a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_order_scenario.py b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_order_scenario.py index 70977139ff9..71d54168b21 100644 --- a/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_order_scenario.py +++ b/src/azure-cli/azure/cli/command_modules/databoxedge/tests/latest/test_order_scenario.py @@ -1,93 +1,106 @@ -# -------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------- # 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. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- -import os -from azure.cli.testsdk import ScenarioTest -from azure.cli.testsdk import ResourceGroupPreparer -from .example_steps import step_device_create -from .example_steps import step_device_delete -from .example_steps import step_order_create -from .example_steps import step_order_show -from .example_steps import step_order_list -from .example_steps import step_order_delete -from .example_steps import step_order_create_min -from .example_steps import step_order_show_min -from .example_steps import step_order_list_min -from .example_steps import step_order_delete_min -from .. import ( - try_manual, - raise_if, - calc_coverage -) +import time +import unittest +from azure.cli.testsdk import ScenarioTest,ResourceGroupPreparer -TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) +class TestOrder(ScenarioTest): - -# Env setup_scenario -@try_manual -def setup_scenario(test, rg): - step_device_create(test, rg) - - -# Env cleanup_scenario -@try_manual -def cleanup_scenario(test, rg): - step_device_delete(test, rg) - - -# Testcase: Scenario -@try_manual -def call_scenario(test, rg): - setup_scenario(test, rg) - step_order_create(test, rg, checks=[ - test.check("contactInformation.companyName", "Microsoft", case_sensitive=False), - test.check("contactInformation.contactPerson", "John Mcclane", case_sensitive=False), - test.check("shippingAddress.country", "United States", case_sensitive=False), - ]) - step_order_show(test, rg, checks=[ - test.check("contactInformation.companyName", "Microsoft", case_sensitive=False), - test.check("contactInformation.contactPerson", "John Mcclane", case_sensitive=False), - test.check("shippingAddress.country", "United States", case_sensitive=False), - ]) - step_order_list(test, rg, checks=[ - test.check('length(@)', 1), - ]) - step_order_delete(test, rg, checks=[]) - step_order_list(test, rg, checks=[ - test.check('length(@)', 0), - ]) - cleanup_scenario(test, rg) - - -@try_manual -def call_scenario_min(test, rg): - setup_scenario(test, rg) - step_order_create_min(test, rg, checks=[]) - step_order_show_min(test, rg, checks=[]) - step_order_list_min(test, rg, checks=[]) - step_order_delete_min(test, rg, checks=[]) - cleanup_scenario(test, rg) - - -# Test class for Scenario -@try_manual -class OrderScenarioTest(ScenarioTest): - - @ResourceGroupPreparer(name_prefix='clitestdataboxedge_GroupForEdgeAutomation'[:7], key='rg', parameter_name='rg') - def test_order_Scenario(self, rg): + @ResourceGroupPreparer(key='rg') + def test_order(self): self.kwargs.update({ - 'myDevice': 'testedgedevice', + 'name': self.create_random_name(prefix='cli-', length=20), + 'sku': 'EdgeP_Base', + 'location': 'eastus', }) - call_scenario(self, rg) - calc_coverage(__file__) - raise_if() + self.cmd('databoxedge device create -l {location} --sku {sku} --name {name} -g {rg}', checks=[ + self.check('name', '{name}'), + self.check('resourceGroup', '{rg}'), + self.check('deviceType', 'DataBoxEdgeDevice'), + self.check('sku.name', '{sku}'), + self.check('sku.tier', 'Standard'), + self.check('location', '{location}') + ]) + + order = self.cmd('az databoxedge order create ' + '--device-name {name} --company-name Microsoft ' + '--contact-person JohnMcclane --email-list john@microsoft.com ' + '--phone 426-9400 --address-line1 MicrosoftCorporation ' + '--city WA --country "United States" --postal-code 98052 ' + '--state WA --resource-group {rg} --status Untracked', checks=[ + self.check('name', 'default'), + self.check('contactInformation.companyName', 'Microsoft'), + self.check('contactInformation.contactPerson', 'JohnMcclane'), + self.check('contactInformation.emailList', ['john@microsoft.com']), + self.check('contactInformation.phone', '426-9400'), + self.check('currentStatus.status', 'Untracked'), + self.check('resourceGroup', '{rg}'), + self.check('shippingAddress.addressLine1', 'MicrosoftCorporation'), + self.check('shippingAddress.city', 'WA'), + self.check('shippingAddress.country', 'United States'), + self.check('shippingAddress.postalCode', '98052'), + self.check('shippingAddress.state', 'WA') + ]).get_output_in_json() + + self.cmd('az databoxedge order update ' + '--device-name {name} --company-name Microsoft ' + '--contact-person JohnMcclane --email-list john@microsoft.com ' + '--phone 426-9400 --address-line1 MicrosoftCorporation ' + '--city WA --country "United States" --postal-code 98052 ' + '--state WA --resource-group {rg} --status Untracked', checks=[ + self.check('name', 'default'), + self.check('contactInformation.companyName', 'Microsoft'), + self.check('contactInformation.contactPerson', 'JohnMcclane'), + self.check('contactInformation.emailList', ['john@microsoft.com']), + self.check('contactInformation.phone', '426-9400'), + self.check('currentStatus.status', 'Untracked'), + self.check('resourceGroup', '{rg}'), + self.check('shippingAddress.addressLine1', 'MicrosoftCorporation'), + self.check('shippingAddress.city', 'WA'), + self.check('shippingAddress.country', 'United States'), + self.check('shippingAddress.postalCode', '98052'), + self.check('shippingAddress.state', 'WA') + ]) + + self.cmd('databoxedge order list -d {name} -g {rg}', checks=[ + self.check('length(@)', 1), + self.check('type(@)', 'array'), + self.check('[0].id', order['id']), + self.check('[0].name', 'default'), + self.check('[0].contactInformation.companyName', 'Microsoft'), + self.check('[0].contactInformation.contactPerson', 'JohnMcclane'), + self.check('[0].contactInformation.emailList', ['john@microsoft.com']), + self.check('[0].contactInformation.phone', '426-9400'), + self.check('[0].currentStatus.status', 'Untracked'), + self.check('[0].resourceGroup', '{rg}'), + self.check('[0].shippingAddress.addressLine1', 'MicrosoftCorporation'), + self.check('[0].shippingAddress.city', 'WA'), + self.check('[0].shippingAddress.country', 'United States'), + self.check('[0].shippingAddress.postalCode', '98052'), + self.check('[0].shippingAddress.state', 'WA') + ]) + + self.cmd('databoxedge order show -d {name} -g {rg}', checks=[ + self.check('name', 'default'), + self.check('contactInformation.companyName', 'Microsoft'), + self.check('contactInformation.contactPerson', 'JohnMcclane'), + self.check('contactInformation.emailList', ['john@microsoft.com']), + self.check('contactInformation.phone', '426-9400'), + self.check('currentStatus.status', 'Untracked'), + self.check('resourceGroup', '{rg}'), + self.check('shippingAddress.addressLine1', 'MicrosoftCorporation'), + self.check('shippingAddress.city', 'WA'), + self.check('shippingAddress.country', 'United States'), + self.check('shippingAddress.postalCode', '98052'), + self.check('shippingAddress.state', 'WA') + ]) + + self.cmd('databoxedge order delete -d {name} -g {rg} -y') + time.sleep(30) + self.cmd('databoxedge order list -d {name} -g {rg}', checks=[self.is_empty()]) diff --git a/src/azure-cli/requirements.py3.Darwin.txt b/src/azure-cli/requirements.py3.Darwin.txt index d6738d3a6b3..526255ad4ac 100644 --- a/src/azure-cli/requirements.py3.Darwin.txt +++ b/src/azure-cli/requirements.py3.Darwin.txt @@ -36,7 +36,7 @@ azure-mgmt-containerregistry==8.0.0 azure-mgmt-containerservice==16.0.0 azure-mgmt-core==1.2.1 azure-mgmt-cosmosdb==6.4.0 -azure-mgmt-databoxedge==0.2.0 +azure-mgmt-databoxedge==1.0.0 azure-mgmt-datalake-analytics==0.2.1 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.5.0 diff --git a/src/azure-cli/requirements.py3.Linux.txt b/src/azure-cli/requirements.py3.Linux.txt index ed0903c01bb..522c01e175e 100644 --- a/src/azure-cli/requirements.py3.Linux.txt +++ b/src/azure-cli/requirements.py3.Linux.txt @@ -36,7 +36,7 @@ azure-mgmt-containerregistry==8.0.0 azure-mgmt-containerservice==16.0.0 azure-mgmt-core==1.2.1 azure-mgmt-cosmosdb==6.4.0 -azure-mgmt-databoxedge==0.2.0 +azure-mgmt-databoxedge==1.0.0 azure-mgmt-datalake-analytics==0.2.1 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.5.0 diff --git a/src/azure-cli/requirements.py3.windows.txt b/src/azure-cli/requirements.py3.windows.txt index 430038fa43d..f22cb896fc6 100644 --- a/src/azure-cli/requirements.py3.windows.txt +++ b/src/azure-cli/requirements.py3.windows.txt @@ -36,7 +36,7 @@ azure-mgmt-containerregistry==8.0.0 azure-mgmt-containerservice==16.0.0 azure-mgmt-core==1.2.1 azure-mgmt-cosmosdb==6.4.0 -azure-mgmt-databoxedge==0.2.0 +azure-mgmt-databoxedge==1.0.0 azure-mgmt-datalake-analytics==0.2.1 azure-mgmt-datalake-nspkg==3.0.1 azure-mgmt-datalake-store==0.5.0 diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index b5438cede7e..b6d632c48c4 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -79,7 +79,7 @@ 'azure-mgmt-containerregistry==8.0.0', 'azure-mgmt-containerservice~=16.0.0', 'azure-mgmt-cosmosdb~=6.4.0', - 'azure-mgmt-databoxedge~=0.2.0', + 'azure-mgmt-databoxedge~=1.0.0', 'azure-mgmt-datalake-analytics~=0.2.1', 'azure-mgmt-datalake-store~=0.5.0', 'azure-mgmt-datamigration~=9.0.0',