Open sandervandevelde opened 9 months ago
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-iot-cli-triage.
Seeing similar behavior when running az iot hub list, which shows an empty array. However, the IOT Hub is visible and active from the Portal + from Azure PowerShell
since most other IOT interactions are using az iot CLI, I don't like switching to PowerShell for this. any idea? thanks, Peter
Here, we are trying to separate the service's response into configurations and deployments. An Iot Hub configuration is defined as a configuration if it's contents have either "deviceContent" or "moduleContent". Since the basicdeployment
content does not have either of these keys (but it does have "modulesContent", note the s), this is considered to be a deployment and filtered out from the az iot hub configuration list
results.
Regarding the az iot hub list
issue, are you in the correct subscription? Make sure you assign the correct subscription with az account set -s {subscription id}
.
Describe the bug
The "az iot hub configuration list" returns an empty array. When executed with --debug, the debug text shows at the end that layered deployments are found in the iot hub.
When the id of one of the deployment configurations is used in "az iot hub configuration show", that configuration is returned.
Thus, the "az iot hub configuration list" seems to be needed some attention.
Related command
az iot hub configuration list
Errors
No error shown. Command just returns an empty list
Issue script & Debug output
.... <--- this returns an empty list.
... <- but there are configurations. In this case: basicdeployment
Expected behavior
The available configuration (in this example 'basicdeployment', as seen in debug information) should be listed.
Environment Summary
sander@Azure:~$ az --version azure-cli 2.57.0
core 2.57.0 telemetry 1.1.0
Extensions: ai-examples 0.2.5 azure-iot 0.23.1 interactive 0.5.3 ml 2.22.0 ssh 2.0.2 stream-analytics 1.0.0
Dependencies: msal 1.26.0 azure-mgmt-resource 23.1.0b2
Python location '/usr/bin/python3.9' Extensions directory '/home/sander/.azure/cliextensions' Extensions system directory '/usr/lib/python3.9/site-packages/azure-cli-extensions'
Python (Linux) 3.9.14 (main, Oct 12 2023, 19:48:32) [GCC 11.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date. sander@Azure:~$
Additional context
See also https://learn.microsoft.com/en-us/answers/questions/1596261/azure-iot-edge-layered-deployment-module-image-ver