diff --git a/HISTORY.rst b/HISTORY.rst index 91053f60e..ac9be863c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,15 @@ Release History =============== +0.23.1 ++++++++++++++++ + + +**IoT Hub updates** + +* Fix parsing issue for `az iot hub certificate root-authority`. + + 0.23.0 +++++++++++++++ diff --git a/azext_iot/constants.py b/azext_iot/constants.py index 21a6c558f..fd8c13249 100644 --- a/azext_iot/constants.py +++ b/azext_iot/constants.py @@ -7,7 +7,7 @@ import os -VERSION = "0.23.0" +VERSION = "0.23.1" EXTENSION_NAME = "azure-iot" EXTENSION_ROOT = os.path.dirname(os.path.abspath(__file__)) EXTENSION_CONFIG_ROOT_KEY = "iotext" diff --git a/azext_iot/iothub/providers/certificate.py b/azext_iot/iothub/providers/certificate.py index 36c2de654..167b0bc80 100644 --- a/azext_iot/iothub/providers/certificate.py +++ b/azext_iot/iothub/providers/certificate.py @@ -77,7 +77,8 @@ def iot_hub_certificate_root_authority_set( if root_ca is None: properties["rootCertificate"] = {"enableRootCertificateV2": not root_ca} - command += f" --set properties='{json.dumps(properties)}'" + dumped = json.dumps(properties).replace('"', '\\"') + command += f" --set properties=\"{dumped}\"" else: command += f" --set properties.rootCertificate.enableRootCertificateV2={not root_ca}"