Skip to content

Commit

Permalink
chore: remove iot hub root authority commands (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
vilit1 authored Jan 21, 2025
1 parent 291bbed commit fb01bef
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 252 deletions.
6 changes: 5 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Release History
**General updates**

* We have dropped support for Python 3.8
* This extension now supports Python 3.12 as the CLI core is packaging newer releases with this python version,
* This extension now supports Python 3.12 as the CLI core is packaging newer releases with this python version,
* **[Breaking Change]** Older versions of `uamqp` (below `1.6.6`) are not compatible with Python 3.12
* If you update your packaged AZ CLI version (`2.66.0` or later) or otherwise change your environment's Python version to 3.12, you will need to update your `uamqp` dependency to `1.6.6` or above in order to use commands like `az iot hub monitor-events`
* You can repair this dependency at command runtime by utilizing the `--repair` / `-r` argument in `az iot hub monitor-events`
Expand All @@ -20,6 +20,10 @@ Release History
* `ContentEncoding` system property is now `content-encoding`
* `ContentType` system property is now `content-type`

**IoT Hub updates**

* Removal of `az iot hub certificate root-authority`. For any issues, email iot-ca-updates@microsoft.com.


0.25.0
+++++++++++++++
Expand Down
30 changes: 0 additions & 30 deletions azext_iot/iothub/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,33 +955,3 @@ def load_iothub_help():
text: >
az iot hub message-route fallback set -n {iothub_name} --enabled false
"""

helps["iot hub certificate root-authority"] = """
type: group
short-summary: Manage the certificate root-authority for an IoT Hub instance.
"""

helps["iot hub certificate root-authority set"] = """
type: command
short-summary: Set the certificate root-authority for an IoT Hub instance to a specific version.
long-summary: Transition this resource to a certificate on the DigiCert Global G2 root (v2) or revert to Baltimore root (v1).
Before making this transition, please ensure all devices are updated to contain the public portion of the root
that the IoT Hub will be transitioned to. Devices will disconnect and reconnect using the new root.
We suggest monitoring current connections but an user defined metric may be more appropriate for your situation.
examples:
- name: Transition the target IoT Hub certificate root authority to Digicert.
text: >
az iot hub certificate root-authority set --hub-name {iothub_name} --certificate-authority v2
- name: Revert the target IoT Hub certificate root authority to Baltimore.
text: >
az iot hub certificate root-authority set --hub-name {iothub_name} --certificate-authority v1
"""

helps["iot hub certificate root-authority show"] = """
type: command
short-summary: Show the current certificate root-authority for an IoT Hub instance.
examples:
- name: Show the target IoT Hub certificate root authority.
text: >
az iot hub certificate root-authority show --hub-name {iothub_name}
"""
6 changes: 0 additions & 6 deletions azext_iot/iothub/command_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,3 @@ def load_iothub_commands(self, _):
"iot edge devices", command_type=device_identity_ops
) as cmd_group:
cmd_group.command("create", "iot_edge_devices_create", is_experimental=True)

with self.command_group(
"iot hub certificate root-authority", command_type=iothub_resource_ops, deprecate_info=self.deprecate()
) as cmd_group:
cmd_group.show_command("show", "certificate_root_authority_show")
cmd_group.command("set", "certificate_root_authority_set")
42 changes: 0 additions & 42 deletions azext_iot/iothub/commands_certificate.py

This file was deleted.

8 changes: 0 additions & 8 deletions azext_iot/iothub/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,6 @@ def list_valid_types(cls):
return list(filter(lambda d: d != RouteSourceType.Invalid.value, map(lambda c: c.value, cls)))


class CertificateAuthorityVersions(Enum):
"""
Certificate Authority Versions
"""
v2 = "v2"
v1 = "v1"


class IoTHubSDKVersion(Enum):
"""
Types to determine which object properties the hub supports for backwards compatibility with the
Expand Down
9 changes: 0 additions & 9 deletions azext_iot/iothub/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# --------------------------------------------------------------------------------------------

from azext_iot.iothub.providers.state import HubAspects
from azext_iot.iothub.common import CertificateAuthorityVersions
from azure.cli.core.commands.parameters import get_enum_type, get_three_state_flag
from azext_iot.common.shared import DeviceAuthType, SettleType, ProtocolType, AckType
from azext_iot.assets.user_messages import info_param_properties_device
Expand Down Expand Up @@ -658,11 +657,3 @@ def load_iothub_arguments(self, _):
options_list=["--system-properties", "--sp"],
help="System properties of the route message.",
)

with self.argument_context("iot hub certificate root-authority set") as context:
context.argument(
"ca_version",
options_list=["--certificate-authority", "--cav"],
help="Certificate Root Authority version. The v1 represents Baltimore CA and v2 represents Digicert CA.",
arg_type=get_enum_type(CertificateAuthorityVersions),
)
102 changes: 0 additions & 102 deletions azext_iot/iothub/providers/certificate.py

This file was deleted.

5 changes: 0 additions & 5 deletions azext_iot/tests/iothub/certificate/__init__.py

This file was deleted.

This file was deleted.

0 comments on commit fb01bef

Please sign in to comment.