Skip to content

Commit 72c7db5

Browse files
committed
still need to rerun tests
1 parent c8ef40c commit 72c7db5

File tree

5 files changed

+2
-39
lines changed

5 files changed

+2
-39
lines changed

src/azure-cli-core/azure/cli/core/profiles/_shared.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,6 @@ def default_api_version(self):
233233
# We should avoid using ad hoc API versions,
234234
# use the version in a profile as much as possible.
235235
AD_HOC_API_VERSIONS = {
236-
ResourceType.MGMT_IOTHUB: {
237-
# src/azure-cli/azure/cli/command_modules/iot/custom.py#iot_hub_devicestream_show
238-
'iot_hub_resource': '2019-07-01-preview',
239-
},
240236
ResourceType.MGMT_APPSERVICE: {
241237
# src/azure-cli/azure/cli/command_modules/appservice/_constants.py:68
242238
'app_service_certificate_orders': '2022-09-01'

src/azure-cli/azure/cli/command_modules/iot/_help.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -427,21 +427,6 @@
427427
crafted: true
428428
"""
429429

430-
helps['iot hub devicestream'] = """
431-
type: group
432-
short-summary: Manage device streams of an IoT hub.
433-
"""
434-
435-
helps['iot hub devicestream show'] = """
436-
type: command
437-
short-summary: Get IoT Hub's device streams endpoints.
438-
long-summary: Get IoT Hub's device streams endpoints.
439-
examples:
440-
- name: Get all the device streams from "MyIotHub" IoT Hub.
441-
text: >
442-
az iot hub devicestream show -n MyIotHub
443-
"""
444-
445430
helps['iot hub identity'] = """
446431
type: group
447432
short-summary: Manage identities of an Azure IoT hub.

src/azure-cli/azure/cli/command_modules/iot/commands.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,6 @@ def load_command_table(self, _): # pylint: disable=too-many-statements
191191
g.custom_command('update', 'iot_hub_route_update', transform=RouteUpdateResultTransform(self.cli_ctx))
192192
g.custom_command('test', 'iot_hub_route_test')
193193

194-
# iot hub device stream commands
195-
with self.command_group('iot hub devicestream', client_factory=iot_hub_service_factory,
196-
min_api="2019-07-01-preview", is_preview=True) as g:
197-
g.custom_show_command('show', 'iot_hub_devicestream_show')
198-
199194
# iot central commands
200195
with self.command_group('iot central app', iot_central_sdk, client_factory=iot_central_service_factory) as g:
201196
g.custom_command('create', 'iot_central_app_create', supports_no_wait=True)

src/azure-cli/azure/cli/command_modules/iot/custom.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,15 +1210,6 @@ def iot_message_enrichment_list(cmd, client, hub_name, resource_group_name=None)
12101210
return hub.properties.routing.enrichments
12111211

12121212

1213-
def iot_hub_devicestream_show(cmd, client, hub_name, resource_group_name=None):
1214-
from azure.cli.core.commands.client_factory import get_mgmt_service_client
1215-
resource_group_name = _ensure_hub_resource_group_name(client, resource_group_name, hub_name)
1216-
# DeviceStreams property is still in preview, so until GA we need to use a preview API-version
1217-
client = get_mgmt_service_client(cmd.cli_ctx, ResourceType.MGMT_IOTHUB, api_version='2019-07-01-preview')
1218-
hub = client.iot_hub_resource.get(resource_group_name, hub_name)
1219-
return hub.properties.device_streams
1220-
1221-
12221213
def iot_hub_manual_failover(cmd, client, hub_name, resource_group_name=None, no_wait=False):
12231214
hub = iot_hub_get(cmd, client, hub_name, resource_group_name)
12241215
resource_group_name = hub.additional_properties['resourcegroup']

src/azure-cli/azure/cli/command_modules/iot/tests/latest/test_iot_commands.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,6 @@ def test_iot_hub(self, resource_group, resource_group_location, storage_account)
388388
self.check('length(serviceBusTopics[*])', 0),
389389
self.check('length(storageContainers[*])', 1)])
390390

391-
# Test 'az iot hub devicestream show'
392-
self.cmd('iot hub devicestream show -n {0} -g {1}'.format(hub, rg), checks=self.is_empty())
393-
394391
# Test 'az iot hub message-enrichment create'
395392
real_endpoints = 'events'
396393
fake_endpoints = 'events fake_endpoint'
@@ -768,18 +765,17 @@ def test_hub_file_upload(self, resource_group, resource_group_location, storage_
768765

769766
# File upload - add connection string and containername - keybased
770767
updated_hub = self.cmd('iot hub update -n {0} -g {1} --fc {2} --fcs {3}'
771-
.format(hub, rg, containerName, storageConnectionString)).get_output_in_json()
768+
.format(hub, rg, containerName, storageConnectionString)).get_output_in_json()
772769
assert not updated_hub['properties']['storageEndpoints']['$default']['authenticationType']
773770
assert storage_cs_pattern in updated_hub['properties']['storageEndpoints']['$default']['connectionString']
774771
assert updated_hub['properties']['storageEndpoints']['$default']['containerName'] == containerName
775772

776773
updated_hub = self.cmd('iot hub update -n {0} -g {1} --fsa {2}'
777-
.format(hub, rg, key_based_auth)).get_output_in_json()
774+
.format(hub, rg, key_based_auth)).get_output_in_json()
778775
assert updated_hub['properties']['storageEndpoints']['$default']['authenticationType'] == key_based_auth
779776
assert storage_cs_pattern in updated_hub['properties']['storageEndpoints']['$default']['connectionString']
780777
assert updated_hub['properties']['storageEndpoints']['$default']['containerName'] == containerName
781778

782-
783779
# Change to identity-based (with no identity) - fail
784780
self.cmd('iot hub update -n {0} -g {1} --fsa identitybased'.format(hub, rg), expect_failure=True)
785781

0 commit comments

Comments
 (0)