Azure / azure-cli

Azure Command-Line Interface
MIT License
4.04k stars 3.01k forks source link

"az iot hub configuration list" response is ignoring deployments #28470

Open sandervandevelde opened 9 months ago

sandervandevelde commented 9 months ago

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

sander@Azure:~$ az  iot hub configuration list --hub-name adt-demonstration-ih
[]
sander@Azure:~$

.... <--- this returns an empty list.

sander@Azure:~$ az  iot hub configuration list --hub-name adt-demonstration-ih --debug
cli.knack.cli: Command arguments: ['iot', 'hub', 'configuration', 'list', '--hub-name', 'adt-demonstration-ih', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7fe8ac7e71f0>, <function OutputProducer.on_global_arguments at 0x7fe8ac702d30>, <function CLIQuery.on_global_arguments at 0x7fe8ac69a310>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'iot': ['azure.cli.command_modules.iot', 'azext_iot']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: iot                       0.569        19        82
cli.azure.cli.core: Total (1)                 0.569        19        82
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: ai-examples               0.140         1         1  /usr/lib/python3.9/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: azure-iot                 0.045       103       337  /home/sander/.azure/cliextensions/azure-iot
cli.azure.cli.core: Total (2)                 0.185       104       338
cli.azure.cli.core: Loaded 118 groups, 420 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : iot hub configuration list
cli.azure.cli.core: Command table: iot hub configuration list
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fe8abb41940>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/sander/.azure/commands/2024-02-27.08-24-49.iot_hub_configuration_list.1065.log'.
az_command_data_logger: command args: iot hub configuration list --hub-name {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7fe8abae9550>]
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7fe8abb10550>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7fe8abab4430>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fe8ac702dc0>, <function CLIQuery.handle_query_parameter at 0x7fe8ac69a3a0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7fe8abab43a0>]
az_command_data_logger: extension name: azure-iot
az_command_data_logger: extension version: 0.23.1
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=IotHubClient
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 2233
msrestazure.azure_active_directory: MSI: Retrieving a token from http://localhost:50342/oauth2/token, with payload {'resource': 'https://management.core.windows.net/'}
cli.azure.cli.core.auth.adal_authentication: MSIAuthenticationWrapper.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 2233
msrestazure.azure_active_directory: MSI: Retrieving a token from http://localhost:50342/oauth2/token, with payload {'resource': 'https://management.core.windows.net/'}
cli.azure.cli.core.auth.adal_authentication: Normalize expires_on: '1709026244' -> 1709026244
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/ad331ace-d1e3-4655-af8f-84013ad41d6c/providers/Microsoft.Devices/IotHubs?api-version=2023-06-30-preview'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': 'ac1b020e-d549-11ee-a242-00155d3a650a'
cli.azure.cli.core.sdk.policies:     'CommandName': 'iot hub configuration list'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--hub-name --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.57.0 (RPM) azsdk-python-azure-mgmt-iothub/3.0.0 Python/3.9.14 (Linux-5.10.102.2-microsoft-standard-x86_64-with-glibc2.35) cloud-shell/1.0'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/ad331ace-d1e3-4655-af8f-84013ad41d6c/providers/Microsoft.Devices/IotHubs?api-version=2023-06-30-preview HTTP/1.1" 200 7068
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '7068'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11998'
cli.azure.cli.core.sdk.policies:     'Server': 'Microsoft-HTTPAPI/2.0'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '0cdd1dfd-41e9-43ab-b418-b2285e7a7c13'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '0cdd1dfd-41e9-43ab-b418-b2285e7a7c13'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTEUROPE:20240227T082451Z:0cdd1dfd-41e9-43ab-b418-b2285e7a7c13'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'Date': 'Tue, 27 Feb 2024 08:24:50 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"value":[{"id":"/subscriptions/ad331ace-d1e3-4655-af8f-84013ad41d6c/resourceGroups/beerlift-weu-rg/providers/Microsoft.Devices/IotHubs/beerlift-weu-ih","name":"beerlift-weu-ih","type":"Microsoft.Devices/IotHubs","location":"westeurope","tags":{},"subscriptionid":"ad331ace-d1e3-4655-af8f-84013ad41d6c","resourcegroup":"beerlift-weu-rg","etag":"BAAAAAAAAAA=","properties":{"locations":[{"location":"West Europe","role":"primary"},{"location":"North Europe","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"beerlift-weu-ih.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"beerlift-weu-ih","endpoint":"sb://iothub-ns-beerlift-w-5588750-508d14b7dc.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[{"connectionString":"DefaultEndpointsProtocol=https;AccountName=beerliftweustor;AccountKey=****","containerName":"beerliftcool","fileNameFormat":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}.json","batchFrequencyInSeconds":100,"maxChunkSizeInBytes":104857600,"encoding":"json","name":"coolstorageendpoint","id":"36627170-54fc-4f7e-95ae-0281d61aad04","subscriptionId":"ad331ace-d1e3-4655-af8f-84013ad41d6c","resourceGroup":"beerlift-weu-rg"},{"connectionString":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=beerliftweustor;AccountKey=****","containerName":"deviceconnectionstateevents","fileNameFormat":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}.json","batchFrequencyInSeconds":100,"maxChunkSizeInBytes":104857600,"encoding":"json","authenticationType":"keyBased","name":"DeviceConnectionStateEventsEndpoint","id":"98177360-f9a1-436f-82c9-172f83fb32f6","subscriptionId":"ad331ace-d1e3-4655-af8f-84013ad41d6c","resourceGroup":"beerlift-weu-rg"},{"connectionString":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=beerliftweustor;AccountKey=****","containerName":"devicelifecycleevents","fileNameFormat":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}.json","batchFrequencyInSeconds":100,"maxChunkSizeInBytes":104857600,"encoding":"json","authenticationType":"keyBased","name":"DeviceLifecycleEventsEndpoint","id":"63bf0463-5d59-429d-a39e-8ce750783662","subscriptionId":"ad331ace-d1e3-4655-af8f-84013ad41d6c","resourceGroup":"beerlift-weu-rg"},{"connectionString":"DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=beerliftweustor;AccountKey=****","containerName":"devicetwinstateevents","fileNameFormat":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}.json","batchFrequencyInSeconds":100,"maxChunkSizeInBytes":104857600,"encoding":"json","authenticationType":"keyBased","name":"DeviceTwinStateEventsEndpoint","id":"fd17dee1-ceef-4866-a93a-73213d45efb3","subscriptionId":"ad331ace-d1e3-4655-af8f-84013ad41d6c","resourceGroup":"beerlift-weu-rg"}],"cosmosDBSqlContainers":[]},"enrichments":[{"key":"model","value":"$twin.tags.model","endpointNames":["coolstorageendpoint","events"]},{"key":"make","vaiveryCount":10}},"features":"GWV2, RootCertificateV2","allowedFqdnList":[],"rootCertificate":{"enableRootCertificateV2":true,"lastUpdatedTimeUtc":"2023-09-05T20:02:18.3002744Z","microsoftMigratedRootCert":false}},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"type":"None"},"systemData":{"createdAt":"2020-10-29T11:10:08.643Z"}},{"id":"/subscriptions/ad331ace-d1e3-4655-af8f-84013ad41d6c/resourceGroups/adt-demonstration-rg/providers/Microsoft.Devices/IotHubs/adt-demonstration-ih","name":"adt-demonstration-ih","type":"Microsoft.Devices/IotHubs","location":"westeurope","tags":{},"subscriptionid":"ad331ace-d1e3-4655-af8f-84013ad41d6c","resourcegroup":"adt-demonstration-rg","etag":"CgAAAAQAAAA=","properties":{"locations":[{"location":"West Europe","role":"primary"},{"location":"North Europe","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"adt-demonstration-ih.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"adt-demonstration-ih","endpoint":"sb://iothub-ns-adt-demons-25269461-98e37c2093.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[],"cosmosDBSqlContainers":[]},"routes":[{"name":"Built-in-route","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"GWV2, RootCertificateV2","disableLocalAuth":false,"allowedFqdnList":[],"enableDataResidency":false,"rootCertificate":{"enableRootCertificateV2":true,"lastUpdatedTimeUtc":"2023-09-27T19:30:55.7658643Z"}},"sku":{"name":"S1","tier":"Standard","capacity":1},"identity":{"tenantId":"e8bf76a5-4456-4e61-8fdd-a7fa11b9efbf","type":"SystemAssigned","principalId":"7b6b14f3-9b4b-46da-a036-8aac906de4b4"},"systemData":{"createdAt":"2023-09-27T19:30:58.9866667Z"}}]}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/ad331ace-d1e3-4655-af8f-84013ad41d6c/resourceGroups/adt-demonstration-rg/providers/Microsoft.Devices/IotHubs/adt-demonstration-ih/listkeys?api-version=2023-06-30-preview'
cli.azure.cli.core.sdk.policies: Request method: 'POST'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': 'ac1b020e-d549-11ee-a242-00155d3a650a'
cli.azure.cli.core.sdk.policies:     'CommandName': 'iot hub configuration list'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--hub-name --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.57.0 (RPM) azsdk-python-azure-mgmt-iothub/3.0.0 Python/3.9.14 (Linux-5.10.102.2-microsoft-standard-x86_64-with-glibc2.35) cloud-shell/1.0'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/ad331ace-d1e3-4655-af8f-84013ad41d6c/resourceGroups/adt-demonstration-rg/providers/Microsoft.Devices/IotHubs/adt-demonstration-ih/listkeys?api-version=2023-06-30-preview HTTP/1.1" 200 905
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '905'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1198'
cli.azure.cli.core.sdk.policies:     'Server': 'Microsoft-HTTPAPI/2.0'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'f8932328-03a5-4d81-8c46-280c2c7920c8'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'f8932328-03a5-4d81-8c46-280c2c7920c8'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTEUROPE:20240227T082451Z:f8932328-03a5-4d81-8c46-280c2c7920c8'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'Date': 'Tue, 27 Feb 2024 08:24:51 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"value":[{"keyName":"iothubowner","primaryKey":"--=","secondaryKey":"--=","rights":"RegistryWrite, ServiceConnect, DeviceConnect"},{"keyName":"service","primaryKey":"--=","secondaryKey":"--=","rights":"ServiceConnect"},{"keyName":"device","primaryKey":"--=","secondaryKey":"--=","rights":"DeviceConnect"},{"keyName":"registryRead","primaryKey":"--=","secondaryKey":"--=","rights":"RegistryRead"},{"keyName":"registryReadWrite","primaryKey":"--=","secondaryKey":"--=","rights":"RegistryWrite"}]}
cli.azext_iot.common.base_discovery: Using policy 'iothubowner' for IoT Hub interaction.
msrest.universal_http.requests: Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
msrest.service_client: Accept header absent and forced to application/json
msrest.http_logger: Request URL: 'https://adt-demonstration-ih.azure-devices.net/configurations?api-version=2021-04-12'
msrest.http_logger: Request method: 'GET'
msrest.http_logger: Request headers:
msrest.http_logger:     'Accept': 'application/json'
msrest.http_logger:     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger:     'x-ms-client-request-id': 'ad4f7c54-d549-11ee-a242-00155d3a650a'
msrest.http_logger:     'accept-language': 'en-US'
msrest.http_logger:     'User-Agent': 'python/3.9.14 (Linux-5.10.102.2-microsoft-standard-x86_64-with-glibc2.35) msrest/0.7.1 cloud-shell/1.0 msrest_azure/0.6.4 iothubgatewayserviceapis/2021-04-12 IoTPlatformCliExtension/0.23.1'
msrest.http_logger: Request body:
msrest.http_logger: None
msrest.universal_http: Configuring redirects: allow=True, max=30
msrest.universal_http: Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http: Configuring proxies: ''
msrest.universal_http: Evaluate proxies against ENV settings: True
urllib3.connectionpool: Starting new HTTPS connection (1): adt-demonstration-ih.azure-devices.net:443
urllib3.connectionpool: https://adt-demonstration-ih.azure-devices.net:443 "GET /configurations?api-version=2021-04-12 HTTP/1.1" 200 1852
msrest.http_logger: Response status: 200
msrest.http_logger: Response headers:
msrest.http_logger:     'content-length': '1852'
msrest.http_logger:     'vary': 'Origin'
msrest.http_logger:     'x-ms-request-id': '1711960f-6ff3-429d-80c6-131ebc2780b0'
msrest.http_logger:     'server': 'Microsoft-HTTPAPI/2.0'
msrest.http_logger:     'content-type': 'application/json; charset=utf-8'
msrest.http_logger:     'date': 'Tue, 27 Feb 2024 08:24:50 GMT'
msrest.http_logger: Response content:
msrest.http_logger: [{"id":"basicdeployment","schemaVersion":null,"labels":{},"content":{"modulesContent":{"$edgeAgent":{"properties.desired":{"schemaVersion":"1.1","runtime":{"type":"docker","settings":{}},"systemModules":{"edgeAgent":{"imagePullPolicy":"on-create","settings":{"image":"mcr.microsoft.com/azureiotedge-agent:1.4"},"type":"docker"},"edgeHub":{"imagePullPolicy":"on-create","restartPolicy":"always","settings":{"image":"mcr.microsoft.com/azureiotedge-hub:1.4","createOptions":"{\"HostConfig\":{\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}]}}}"},"status":"running","type":"docker"}},"modules":{}}},"$edgeHub":{"properties.desired":{"schemaVersion":"1.1","storeAndForwardConfiguration":{"timeToLiveSecs":7200},"routes":{}}}}},"targetCondition":"tags.test = true","createdTimeUtc":"2024-02-27T08:24:33.9243964Z","lastUpdatedTimeUtc":"2024-02-27T08:24:33.9243964Z","priority":10,"systemMetrics":{"results":{},"queries":{"targetedCount":"select deviceId from devices where capabilities.iotEdge = true and tags.test = true","appliedCount":"select deviceId from devices.modules where moduleId = '$edgeAgent' and configurations.[[basicdeployment]].status = 'Applied'","reportedSuccessfulCount":"select deviceId from devices.modules where moduleId = '$edgeAgent' and configurations.[[basicdeployment]].status = 'Applied' and properties.desired.$version = properties.reported.lastDesiredVersion and properties.reported.lastDesiredStatus.code = 200","reportedFailedCount":"select deviceId from devices.modules where moduleId = '$edgeAgent' and configurations.[[basicdeployment]].status = 'Applied' and properties.desired.$version = properties.reported.lastDesiredVersion and properties.reported.lastDesiredStatus.code != 200"}},"metrics":{"results":{},"queries":{}},"etag":"MQ=="}]
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fe8abb09820>, <function _x509_from_base64_to_hex_transform at 0x7fe8abb098b0>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
[]
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fe8abb41b80>]
az_command_data_logger: exit code: 0
cli.__main__: Command ran in 2.412 seconds (init: 0.272, invoke: 2.140)
sander@Azure:~$

... <- 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

yonzhan commented 9 months ago

Thank you for opening this issue, we will look into it.

microsoft-github-policy-service[bot] commented 9 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-iot-cli-triage.

pdtit commented 8 months ago

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

image

image

since most other IOT interactions are using az iot CLI, I don't like switching to PowerShell for this. any idea? thanks, Peter

vilit1 commented 6 months ago

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}.