Skip to content

Commit

Permalink
fix: root authority quote bug (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
vilit1 authored Nov 8, 2023
1 parent 31ee49f commit 5b4c411
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
+++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion azext_iot/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion azext_iot/iothub/providers/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit 5b4c411

Please sign in to comment.