azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Missing APIs in Storage Management Client on Linux Environments

Open Elsie4ever opened this issue 6 months ago • 8 comments

Describe the bug

When using self.storage_mgmt_client.storage_accounts.get_properties from the storage management client in our extension, we encountered the following error:

ModuleNotFoundError: No module named 'azure.mgmt.storage.v2022_09_01'

Upon inspecting the Azure CLI package, we noticed that version 2022_09_01 is missing. Below is a screenshot of the error:

image

This issue has been reproduced on both WSL Ubuntu and Azure Cloud Shell, using the latest Azure CLI version 2.63.0.

Related command

.

Errors

The command failed with an unexpected error. Here is the traceback: No module named 'azure.mgmt.storage.v2022_09_01' Traceback (most recent call last): File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 664, in execute raise ex File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job result = cmd_copy(params) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 334, in call return self.handler(*args, **kwargs) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(**command_args) File "/home/elsie/.azure/cliextensions/azure-iot-ops/azext_edge/edge/commands_schema.py", line 30, in create_registry return SchemaRegistries(cmd).create( File "/home/elsie/.azure/cliextensions/azure-iot-ops/azext_edge/edge/providers/orchestration/resources/schema_registries.py", line 80, in create storage_properties: dict = self.storage_mgmt_client.storage_accounts.get_properties( File "/usr/lib64/az/lib/python3.9/site-packages/azure/mgmt/storage/_storage_management_client.py", line 1096, in storage_accounts from .v2022_09_01.operations import StorageAccountsOperations as OperationClass ModuleNotFoundError: No module named 'azure.mgmt.storage.v2022_09_01'

Issue script & Debug output

image

Expected behavior

Expected to have same API versions in windows image

Environment Summary

azure-cli 2.63.0

core 2.63.0 telemetry 1.1.0

Extensions: ai-examples 0.2.5 azure-iot-ops 0.7.0a1 ml 2.28.0 ssh 2.0.5

Dependencies: msal 1.30.0 azure-mgmt-resource 23.1.1

Python location '/usr/bin/python3.9' Extensions directory '/home/elsie/.azure/cliextensions' Extensions system directory '/usr/lib/python3.9/site-packages/azure-cli-extensions'

Python (Linux) 3.9.19 (main, Jul 31 2024, 03:47:41) [GCC 11.2.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Elsie4ever avatar Aug 20 '24 17:08 Elsie4ever