Skip to content

Commit 4dac755

Browse files
authored
{IoT} Remove azure-mgmt-iothub, iothubprovisioningservices, and iotcentral Api references (#31955)
1 parent b0d06b0 commit 4dac755

18 files changed

+11577
-8229
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ def default_api_version(self):
214214
ResourceType.MGMT_MONITOR: None,
215215
ResourceType.MGMT_MSI: '2023-01-31',
216216
ResourceType.MGMT_APPSERVICE: '2024-11-01',
217-
ResourceType.MGMT_IOTHUB: '2023-06-30-preview',
218-
ResourceType.MGMT_IOTDPS: '2021-10-15',
219-
ResourceType.MGMT_IOTCENTRAL: '2021-11-01-preview',
217+
ResourceType.MGMT_IOTHUB: None,
218+
ResourceType.MGMT_IOTDPS: None,
219+
ResourceType.MGMT_IOTCENTRAL: None,
220220
ResourceType.MGMT_ARO: '2023-11-22',
221221
ResourceType.MGMT_DATABOXEDGE: '2021-02-01-preview',
222222
ResourceType.MGMT_CUSTOMLOCATION: '2021-03-15-preview',

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ def load_command_table(self, _): # pylint: disable=too-many-statements
174174
transform=EndpointUpdateResultTransform(self.cli_ctx))
175175

176176
# iot hub message enrichment commands
177-
with self.command_group('iot hub message-enrichment', client_factory=iot_hub_service_factory,
178-
min_api="2019-07-01-preview") as g:
177+
with self.command_group('iot hub message-enrichment', client_factory=iot_hub_service_factory) as g:
179178
g.custom_command('create', 'iot_message_enrichment_create')
180179
g.custom_command('list', 'iot_message_enrichment_list')
181180
g.custom_command('delete', 'iot_message_enrichment_delete')

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
)
2121
from azure.cli.core.commands import LongRunningOperation
2222
from azure.cli.core.util import sdk_no_wait
23-
from azure.cli.core.profiles._shared import AZURE_API_PROFILES, ResourceType
2423

2524
from azure.mgmt.iothub.models import (IotHubSku,
2625
AccessRights,
@@ -433,10 +432,8 @@ def iot_hub_certificate_create(client, hub_name, certificate_name, certificate_p
433432
raise CLIError("Error uploading certificate '{0}'.".format(certificate_path))
434433
cert_properties = CertificateProperties(certificate=certificate, is_verified=is_verified)
435434

436-
if AZURE_API_PROFILES["latest"][ResourceType.MGMT_IOTHUB] in client.profile.label:
437-
cert_description = CertificateDescription(properties=cert_properties)
438-
return client.certificates.create_or_update(resource_group_name, hub_name, certificate_name, cert_description)
439-
return client.certificates.create_or_update(resource_group_name, hub_name, certificate_name, cert_properties)
435+
cert_description = CertificateDescription(properties=cert_properties)
436+
return client.certificates.create_or_update(resource_group_name, hub_name, certificate_name, cert_description)
440437

441438

442439
def iot_hub_certificate_update(client, hub_name, certificate_name, certificate_path, etag, resource_group_name=None, is_verified=None):
@@ -449,10 +446,8 @@ def iot_hub_certificate_update(client, hub_name, certificate_name, certificate_p
449446
raise CLIError("Error uploading certificate '{0}'.".format(certificate_path))
450447
cert_properties = CertificateProperties(certificate=certificate, is_verified=is_verified)
451448

452-
if AZURE_API_PROFILES["latest"][ResourceType.MGMT_IOTHUB] in client.profile.label:
453-
cert_description = CertificateDescription(properties=cert_properties)
454-
return client.certificates.create_or_update(resource_group_name, hub_name, certificate_name, cert_description, etag)
455-
return client.certificates.create_or_update(resource_group_name, hub_name, certificate_name, cert_properties, etag)
449+
cert_description = CertificateDescription(properties=cert_properties)
450+
return client.certificates.create_or_update(resource_group_name, hub_name, certificate_name, cert_description, etag)
456451
raise CLIError("Certificate '{0}' does not exist. Use 'iot hub certificate create' to create a new certificate."
457452
.format(certificate_name))
458453

src/azure-cli/azure/cli/command_modules/iot/tests/latest/recordings/test_certificate_lifecycle.yaml

Lines changed: 168 additions & 188 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/iot/tests/latest/recordings/test_dps_certificate_lifecycle.yaml

Lines changed: 184 additions & 184 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/iot/tests/latest/recordings/test_dps_lifecycle.yaml

Lines changed: 418 additions & 418 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/iot/tests/latest/recordings/test_dps_linked_hub_lifecycle.yaml

Lines changed: 1203 additions & 603 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/iot/tests/latest/recordings/test_hub_file_upload.yaml

Lines changed: 875 additions & 852 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/iot/tests/latest/recordings/test_hub_wait.yaml

Lines changed: 320 additions & 492 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/iot/tests/latest/recordings/test_identity_hub.yaml

Lines changed: 2149 additions & 2076 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)