Skip to content

{Network} Optimize import logic in network module#32838

Draft
ReaNAiveD wants to merge 5 commits intoAzure:devfrom
ReaNAiveD:network-optimization
Draft

{Network} Optimize import logic in network module#32838
ReaNAiveD wants to merge 5 commits intoAzure:devfrom
ReaNAiveD:network-optimization

Conversation

@ReaNAiveD
Copy link
Member

@ReaNAiveD ReaNAiveD commented Feb 24, 2026

Related command

az network --help

Description

Lazy-load AAZ commands for az network via directory-tree navigation

The original commands.py used a dict-based registration pattern that eagerly imported every AAZ command class at module load time. Running any az network subcommand — or even az network --help — caused all command classes across all network subgroups to be imported and instantiated, regardless of which subcommand the user actually invoked.

Changes:

Replaced the monolithic registration in commands.py with a directory-tree layout under operations/latest/network/, where each command lives in its own file (e.g., _create.py, _list.py). The core function _load_aaz_by_path() navigates this tree guided by CLI args at runtime, so only the relevant subtree is ever imported.

  • commands.py no longer contains any AAZ imports or registrations
  • Each command/command-group is discovered on-demand from the filesystem
  • Updated the help parser to display command groups that have no eagerly-loaded child commands, since subcommands in subgroups are now intentionally deferred to avoid unnecessary imports

Result:

Current Azure CLI on DevBox:
image

Optimized Network --help on DevBox:
image


We update the import logic of aaz modules and refactor aaz-based customization into structure of aaz commands.

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Feb 24, 2026

❌AzureCLI-FullTest
🔄acr
🔄latest
🔄3.12
🔄3.13
🔄acs
🔄latest
🔄3.12
🔄3.13
🔄advisor
🔄latest
🔄3.12
🔄3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
🔄apim
🔄latest
🔄3.12
🔄3.13
🔄appconfig
🔄latest
🔄3.12
🔄3.13
❌appservice
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_appservice_plan_managed_instance_comprehensive_create self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f4772db3b60>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f4777454440>
command = 'network vnet create -g clitest.rg000001 -n mi-vnet-comp000004 --address-prefix 10.0.0.0/16'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:141: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ModuleNotFoundError("No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway.update'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ModuleNotFoundError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appservice.tests.latest.test_appservice_plan_managedinstance_commands.AppServicePlanManagedInstanceTest testMethod=test_appservice_plan_managed_instance_comprehensive_create>
resource_group = 'clitest.rg000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=MANAGED_INSTANCE_LOCATION)
    def test_appservice_plan_managed_instance_comprehensive_create(self, resource_group):
        """Test creating a managed instance plan with all features in a single command."""
        plan_name = self.create_random_name('mi-plan-comp', 24)
        identity_name = self.create_random_name('mi-identity-comp', 24)
        vnet_name = self.create_random_name('mi-vnet-comp', 24)
        subnet_name = self.create_random_name('mi-subnet-comp', 24)
    
        # Generate random names for storage account and key vault
        storage_account_name = self.create_random_name('micompstg', 24)
        key_vault_name = self.create_random_name('mi-comp-kv', 20)
    
        # Test data using generated names
        script_name = 'Script1'
        script_uri = f'https://{storage_account_name}.blob.core.windows.net/scripts/comprehensive-script.ps1'
        mount_name = 'Mount1'
        # Use proper Windows UNC path format with proper escaping
        source_path = f'\\\\{storage_account_name}.file.core.windows.net\comprehensive-share'  # 4 backslashes for UNC path
        destination_path = r'D:\comprehensive-mount'  # 1 backslash for drive path
        registry_key = 'HKEY_LOCAL_MACHINE\Software\ComprehensiveApp\Key1'  # Use backslashes for registry keys
        secret_uri = f'https://{key_vault_name}.vault.azure.net/secrets/comprehensive-secret/version'
        storage_secret_uri = f'https://{key_vault_name}.vault.azure.net/secrets/storage-secret/version'
    
        # Expected response values (after JSON parsing)
        expected_source = f'\\{storage_account_name}.file.core.windows.net\comprehensive-share'  # 2 backslashes after JSON parsing
        expected_destination = r'D:\comprehensive-mount'  # 1 backslash after JSON parsing
    
        # Create user-assigned identity
        identity_result = self.cmd('identity create -g {} -n {}'.format(
            resource_group, identity_name)).get_output_in_json()
        identity_id = identity_result['id']
    
        # Create VNet and subnet
>       self.cmd('network vnet create -g {} -n {} --address-prefix 10.0.0.0/16'.format(
            resource_group, vnet_name))

src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:613: 
 
 
                                     _ 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1904: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self._namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2018: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1272: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2018: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1272: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2003: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2523: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:334: in check_value
    recommender.set_help_examples(self.get_examples(command_name_inferred))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:209: in get_examples
    return self.cli_help.get_examples(command,
src/azure-cli-core/azure/cli/core/help.py:251: in get_examples
    else self.group_help_cls(self, delimiters, parser)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/help.py:253: in init
    child.load(options)
src/azure-cli-core/azure/cli/core/help.py:533: in load
    loader.versioned_load(self, options)
src/azure-cli-core/azure/cli/core/help_loaders.py:154: in versioned_load
    super(CliHelpFile, help_obj).load(parser)  # pylint:disable=bad-super-call
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/help.py:198: in load
    description = getattr(options, 'description', None)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/parser.py:241: in getattribute
    self.description = self.description() <br>                       ^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:132: in description_loader
    op = self.get_op_handler(self.op_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:59: in get_op_handler
    handler = import_module(mod_to_import)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/importlib/init.py:90: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1387: in gcd_import
    ???
<frozen importlib.bootstrap>:1360: in find_and_load
    ???
<frozen importlib.bootstrap>:1331: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:935: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:999: in exec_module
    ???
<frozen importlib.bootstrap>:488: in call_with_frames_removed
    ???
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    
    # pylint: disable=no-self-use, no-member, too-many-lines, unused-argument
    # pylint: disable=protected-access, too-few-public-methods, line-too-long
    
    from collections import Counter, OrderedDict
    
    import socket
    from knack.log import get_logger
    from azure.mgmt.core.tools import parse_resource_id, is_valid_resource_id, resource_id
    
    from azure.cli.core.aaz import AAZClientConfiguration, has_value, register_client, AAZFileArgTextFormat
    from azure.cli.core.aaz._client import AAZMgmtClient
    from azure.cli.core.aaz.utils import assign_aaz_list_arg
    from azure.cli.core.commands.client_factory import get_subscription_id, get_mgmt_service_client
    
    from azure.cli.core.util import CLIError, sdk_no_wait
    from azure.cli.core.azclierror import InvalidArgumentValueError, ValidationError, <br>        UnrecognizedArgumentError, ResourceNotFoundError, ArgumentUsageError
    from azure.cli.core.profiles import ResourceType
    
    from azure.cli.command_modules.network.zone_file.parse_zone_file import parse_zone_file
    from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone_file
    
>   from .aaz.latest.network.application_gateway._update import Update as _ApplicationGatewayUpdate
E   ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._update'

src/azure-cli/azure/cli/command_modules/network/custom.py:28: ModuleNotFoundError
azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:578
Failed test_appservice_plan_managed_instance_comprehensive_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:729
Failed test_appservice_plan_managed_instance_network_basic The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:466
Failed test_appservice_plan_managed_instance_network_resource_id The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:521
Failed test_appservice_plan_managed_instance_network_with_plan_creation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:548
Failed test_functionapp_create_with_vnet_consumption_plan The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3466
Failed test_functionapp_create_with_vnet_no_subnet The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3716
Failed test_functionapp_create_with_vnet_wrong_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3660
Failed test_functionapp_create_with_vnet_wrong_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3695
Failed test_functionapp_create_with_vnet_wrong_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3642
Failed test_functionapp_elastic_premium_restricted_public_network_access_storage_mutually_exclusive_flags The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3386
Failed test_functionapp_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3288
Failed test_functionapp_vnet_EP_sku_E2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3500
Failed test_functionapp_vnet_basic_sku_E2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3478
Failed test_functionapp_vnet_duplicate_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3522
Failed test_functionapp_vnet_integration_consumption_plan The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3330
Failed test_webapp_access_restriction_add_service_endpoint The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_access_restriction_commands.py:263
Failed test_webapp_access_restriction_mixed_remove The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_access_restriction_commands.py:316
Failed test_webapp_update_site_configs_persists_ip_restrictions The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:957
Failed test_webapp_slot_clone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1615
Failed test_webapp_create_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2698
Failed test_webapp_create_with_vnet_by_subnet_rid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2725
Failed test_webapp_create_with_vnet_by_vnet_rid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2751
Failed test_webapp_create_with_vnet_no_subnet The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2847
Failed test_webapp_create_with_vnet_wrong_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2794
Failed test_webapp_create_with_vnet_wrong_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2827
Failed test_webapp_create_with_vnet_wrong_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2777
Failed test_webapp_vnetDelegation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2864
Failed test_webapp_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2655
Failed test_webapp_vnetRouteAll The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2975
Failed test_webapp_vnetSameName The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2896
Failed test_webapp_vnetSubnetId The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2946
❌3.13
Type Test Case Error Message Line
Failed test_appservice_plan_managed_instance_comprehensive_create self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f8ea8cc7110>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f8eac3c47d0>
command = 'network vnet create -g clitest.rg000001 -n mi-vnet-comp000004 --address-prefix 10.0.0.0/16'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.13/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:141: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ModuleNotFoundError("No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway.update'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ModuleNotFoundError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appservice.tests.latest.test_appservice_plan_managedinstance_commands.AppServicePlanManagedInstanceTest testMethod=test_appservice_plan_managed_instance_comprehensive_create>
resource_group = 'clitest.rg000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=MANAGED_INSTANCE_LOCATION)
    def test_appservice_plan_managed_instance_comprehensive_create(self, resource_group):
        """Test creating a managed instance plan with all features in a single command."""
        plan_name = self.create_random_name('mi-plan-comp', 24)
        identity_name = self.create_random_name('mi-identity-comp', 24)
        vnet_name = self.create_random_name('mi-vnet-comp', 24)
        subnet_name = self.create_random_name('mi-subnet-comp', 24)
    
        # Generate random names for storage account and key vault
        storage_account_name = self.create_random_name('micompstg', 24)
        key_vault_name = self.create_random_name('mi-comp-kv', 20)
    
        # Test data using generated names
        script_name = 'Script1'
        script_uri = f'https://{storage_account_name}.blob.core.windows.net/scripts/comprehensive-script.ps1'
        mount_name = 'Mount1'
        # Use proper Windows UNC path format with proper escaping
        source_path = f'\\\\{storage_account_name}.file.core.windows.net\comprehensive-share'  # 4 backslashes for UNC path
        destination_path = r'D:\comprehensive-mount'  # 1 backslash for drive path
        registry_key = 'HKEY_LOCAL_MACHINE\Software\ComprehensiveApp\Key1'  # Use backslashes for registry keys
        secret_uri = f'https://{key_vault_name}.vault.azure.net/secrets/comprehensive-secret/version'
        storage_secret_uri = f'https://{key_vault_name}.vault.azure.net/secrets/storage-secret/version'
    
        # Expected response values (after JSON parsing)
        expected_source = f'\\{storage_account_name}.file.core.windows.net\comprehensive-share'  # 2 backslashes after JSON parsing
        expected_destination = r'D:\comprehensive-mount'  # 1 backslash after JSON parsing
    
        # Create user-assigned identity
        identity_result = self.cmd('identity create -g {} -n {}'.format(
            resource_group, identity_name)).get_output_in_json()
        identity_id = identity_result['id']
    
        # Create VNet and subnet
>       self.cmd('network vnet create -g {} -n {} --address-prefix 10.0.0.0/16'.format(
            resource_group, vnet_name))

src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:613: 
 
 
                                     _ 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
env/lib/python3.13/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1898: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self._namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1998: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2528: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:334: in check_value
    recommender.set_help_examples(self.get_examples(command_name_inferred))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:209: in get_examples
    return self.cli_help.get_examples(command,
src/azure-cli-core/azure/cli/core/help.py:251: in get_examples
    else self.group_help_cls(self, delimiters, parser)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/help.py:253: in init
    child.load(options)
src/azure-cli-core/azure/cli/core/help.py:533: in load
    loader.versioned_load(self, options)
src/azure-cli-core/azure/cli/core/help_loaders.py:154: in versioned_load
    super(CliHelpFile, help_obj).load(parser)  # pylint:disable=bad-super-call
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/help.py:198: in load
    description = getattr(options, 'description', None)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:241: in getattribute
    self.description = self.description() <br>                       ^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:132: in description_loader
    op = self.get_op_handler(self.op_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:59: in get_op_handler
    handler = import_module(mod_to_import)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/importlib/init.py:88: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1387: in gcd_import
    ???
<frozen importlib.bootstrap>:1360: in find_and_load
    ???
<frozen importlib.bootstrap>:1331: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:935: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:1023: in exec_module
    ???
<frozen importlib.bootstrap>:488: in call_with_frames_removed
    ???
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    
    # pylint: disable=no-self-use, no-member, too-many-lines, unused-argument
    # pylint: disable=protected-access, too-few-public-methods, line-too-long
    
    from collections import Counter, OrderedDict
    
    import socket
    from knack.log import get_logger
    from azure.mgmt.core.tools import parse_resource_id, is_valid_resource_id, resource_id
    
    from azure.cli.core.aaz import AAZClientConfiguration, has_value, register_client, AAZFileArgTextFormat
    from azure.cli.core.aaz._client import AAZMgmtClient
    from azure.cli.core.aaz.utils import assign_aaz_list_arg
    from azure.cli.core.commands.client_factory import get_subscription_id, get_mgmt_service_client
    
    from azure.cli.core.util import CLIError, sdk_no_wait
    from azure.cli.core.azclierror import InvalidArgumentValueError, ValidationError, <br>        UnrecognizedArgumentError, ResourceNotFoundError, ArgumentUsageError
    from azure.cli.core.profiles import ResourceType
    
    from azure.cli.command_modules.network.zone_file.parse_zone_file import parse_zone_file
    from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone_file
    
>   from .aaz.latest.network.application_gateway._update import Update as _ApplicationGatewayUpdate
E   ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._update'

src/azure-cli/azure/cli/command_modules/network/custom.py:28: ModuleNotFoundError
azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:578
Failed test_appservice_plan_managed_instance_comprehensive_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:729
Failed test_appservice_plan_managed_instance_network_basic The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:466
Failed test_appservice_plan_managed_instance_network_resource_id The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:521
Failed test_appservice_plan_managed_instance_network_with_plan_creation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_appservice_plan_managedinstance_commands.py:548
Failed test_functionapp_create_with_vnet_consumption_plan The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3466
Failed test_functionapp_create_with_vnet_no_subnet The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3716
Failed test_functionapp_create_with_vnet_wrong_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3660
Failed test_functionapp_create_with_vnet_wrong_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3695
Failed test_functionapp_create_with_vnet_wrong_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3642
Failed test_functionapp_elastic_premium_restricted_public_network_access_storage_mutually_exclusive_flags The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3386
Failed test_functionapp_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3288
Failed test_functionapp_vnet_EP_sku_E2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3500
Failed test_functionapp_vnet_basic_sku_E2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3478
Failed test_functionapp_vnet_duplicate_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3522
Failed test_functionapp_vnet_integration_consumption_plan The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:3330
Failed test_webapp_access_restriction_add_service_endpoint The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_access_restriction_commands.py:263
Failed test_webapp_access_restriction_mixed_remove The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_access_restriction_commands.py:316
Failed test_webapp_update_site_configs_persists_ip_restrictions The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:957
Failed test_webapp_slot_clone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1615
Failed test_webapp_create_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2698
Failed test_webapp_create_with_vnet_by_subnet_rid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2725
Failed test_webapp_create_with_vnet_by_vnet_rid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2751
Failed test_webapp_create_with_vnet_no_subnet The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2847
Failed test_webapp_create_with_vnet_wrong_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2794
Failed test_webapp_create_with_vnet_wrong_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2827
Failed test_webapp_create_with_vnet_wrong_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2777
Failed test_webapp_vnetDelegation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2864
Failed test_webapp_vnetE2E The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2655
Failed test_webapp_vnetRouteAll The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2975
Failed test_webapp_vnetSameName The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2896
Failed test_webapp_vnetSubnetId The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2946
🔄aro
🔄latest
🔄3.12
🔄3.13
❌backup
❌latest
🔄3.12
❌3.13
Type Test Case Error Message Line
Failed test_backup_restore self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2bffd4b330>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f2c08de5e50>
command = 'network vnet create -g AzureBackupRG_clitest_000002 -n clitest-vnet000008 --subnet-name clitest-subnet000009'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.13/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:141: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ModuleNotFoundError("No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway.update'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ModuleNotFoundError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.backup.tests.latest.test_backup_commands.BackupTests testMethod=test_backup_restore>
resource_group = 'AzureBackupRG_clitest_000001'
target_resource_group = 'AzureBackupRG_clitest_000002'
vault_name = 'clitest-vault000003', vm_name = 'clitest-vm000004'
storage_account = 'clitest000007'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix="AzureBackupRG_clitest
", location="eastus2euap")
    @ResourceGroupPreparer(name_prefix="AzureBackupRG_clitest
", parameter_name="target_resource_group", location="eastus2euap")
    @VaultPreparer()
    @VMPreparer()
    @ItemPreparer()
    @RPPreparer()
    @StorageAccountPreparer(location="eastus2euap")
    def test_backup_restore(self, resource_group, target_resource_group, vault_name, vm_name, storage_account):
    
        self.kwargs.update({
            'vault': vault_name,
            'vm': vm_name,
            'target_rg': target_resource_group,
            'rg': resource_group,
            'sa': storage_account,
            'vm_id': "VM;iaasvmcontainerv2;" + resource_group + ";" + vm_name,
            'container_id': "IaasVMContainer;iaasvmcontainerv2;" + resource_group + ";" + vm_name,
            'vnet_name': self.create_random_name('clitest-vnet', 30),
            'subnet_name': self.create_random_name('clitest-subnet', 30),
            'target_vm_name': self.create_random_name('clitest-tvm', 15)
        })
        self.kwargs['rp'] = self.cmd('backup recoverypoint list --backup-management-type AzureIaasVM --workload-type VM -g {rg} -v {vault} -c {vm} -i {vm} --query [0].name').get_output_in_json()
    
        # Original Storage Account Restore Fails
        self.cmd('backup restore restore-disks -g {rg} -v {vault} -c {vm} -i {vm} -r {rp} --storage-account {sa} --restore-to-staging-storage-account false', expect_failure=True)
    
        # Trigger Restore Disks
        trigger_restore_job_json = self.cmd('backup restore restore-disks -g {rg} -v {vault} -c {vm} -i {vm} -r {rp} -t {target_rg} --storage-account {sa} --restore-to-staging-storage-account', checks=[
            self.check("properties.entityFriendlyName", '{vm}'),
            self.check("properties.operation", "Restore"),
            self.check("properties.status", "InProgress"),
            self.check("resourceGroup", '{rg}')
        ]).get_output_in_json()
        self.kwargs['job'] = trigger_restore_job_json['name']
        self.cmd('backup job wait -g {rg} -v {vault} -n {job}')
    
        trigger_restore_job_details = self.cmd('backup job show -g {rg} -v {vault} -n {job}', checks=[
            self.check("properties.entityFriendlyName", '{vm}'),
            self.check("properties.operation", "Restore"),
            self.check("properties.status", "Completed"),
            self.check("resourceGroup", '{rg}')
        ]).get_output_in_json()
    
        property_bag = trigger_restore_job_details['properties']['extendedInfo']['propertyBag']
        self.assertEqual(property_bag['Target Storage Account Name'], storage_account)
    
        self.kwargs['container'] = property_bag['Config Blob Container Name']
        self.kwargs['blob'] = property_bag['Config Blob Name']
    
        self.cmd('storage blob exists --account-name {sa} -c {container} -n {blob}',
                 checks=self.check("exists", True))
    
        # Trigger Restore As unmanaged disks
        trigger_restore_job2_json = self.cmd('backup restore restore-disks -g {rg} -v {vault} -c {vm} -i {vm} -r {rp} --restore-as-unmanaged-disks --storage-account {sa}', checks=[
            self.check("properties.entityFriendlyName", '{vm}'),
            self.check("properties.operation", "Restore"),
            self.check("properties.status", "InProgress"),
            self.check("resourceGroup", '{rg}')
        ]).get_output_in_json()
        self.kwargs['job2'] = trigger_restore_job2_json['name']
        self.cmd('backup job wait -g {rg} -v {vault} -n {job2}')
    
        self.cmd('backup job show -g {rg} -v {vault} -n {job2}', checks=[
            self.check("properties.entityFriendlyName", '{vm}'),
            self.check("properties.operation", "Restore"),
            self.check("properties.status", "Completed"),
            self.check("resourceGroup", '{rg}')
        ])
    
        # Trigger Original Location Restore
        trigger_restore_job3_json = self.cmd('backup restore restore-disks -g {rg} -v {vault} -c {vm} -i {vm} -r {rp} --storage-account {sa} --restore-mode OriginalLocation', checks=[
            self.check("properties.entityFriendlyName", '{vm}'),
            self.check("properties.operation", "Restore"),
            self.check("properties.status", "InProgress"),
            self.check("resourceGroup", '{rg}'),
            self.check("properties.extendedInfo.internalPropertyBag.restoreLocationType", "OriginalLocation")
        ]).get_output_in_json()
        self.kwargs['job3'] = trigger_restore_job3_json['name']
        self.cmd('backup job wait -g {rg} -v {vault} -n {job3}')
    
        self.cmd('backup job show -g {rg} -v {vault} -n {job3}', checks=[
            self.check("properties.entityFriendlyName", '{vm}'),
            self.check("properties.operation", "Restore"),
            self.check("properties.status", "Completed"),
            self.check("resourceGroup", '{rg}')
        ])
    
        # Trigger Alternate Location Restore
>       vnet_json = self.cmd('network vnet create -g {target_rg} -n {vnet_name} --subnet-name {subnet_name}',
                 checks=[
            self.check("newVNet.name", '{vnet_name}')
        ]).get_output_in_json()

src/azure-cli/azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:756: 
                                       _ 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
env/lib/python3.13/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1898: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self._namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1998: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2528: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:334: in check_value
    recommender.set_help_examples(self.get_examples(command_name_inferred))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:209: in get_examples
    return self.cli_help.get_examples(command,
src/azure-cli-core/azure/cli/core/help.py:251: in get_examples
    else self.group_help_cls(self, delimiters, parser)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/help.py:253: in init
    child.load(options)
src/azure-cli-core/azure/cli/core/help.py:533: in load
    loader.versioned_load(self, options)
src/azure-cli-core/azure/cli/core/help_loaders.py:154: in versioned_load
    super(CliHelpFile, help_obj).load(parser)  # pylint:disable=bad-super-call
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/help.py:198: in load
    description = getattr(options, 'description', None)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:241: in getattribute
    self.description = self.description() <br>                       ^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:132: in description_loader
    op = self.get_op_handler(self.op_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:59: in get_op_handler
    handler = import_module(mod_to_import)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/importlib/init.py:88: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1387: in gcd_import
    ???
<frozen importlib.bootstrap>:1360: in find_and_load
    ???
<frozen importlib.bootstrap>:1331: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:935: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:1023: in exec_module
    ???
<frozen importlib.bootstrap>:488: in call_with_frames_removed
    ???
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    
    # pylint: disable=no-self-use, no-member, too-many-lines, unused-argument
    # pylint: disable=protected-access, too-few-public-methods, line-too-long
    
    from collections import Counter, OrderedDict
    
    import socket
    from knack.log import get_logger
    from azure.mgmt.core.tools import parse_resource_id, is_valid_resource_id, resource_id
    
    from azure.cli.core.aaz import AAZClientConfiguration, has_value, register_client, AAZFileArgTextFormat
    from azure.cli.core.aaz._client import AAZMgmtClient
    from azure.cli.core.aaz.utils import assign_aaz_list_arg
    from azure.cli.core.commands.client_factory import get_subscription_id, get_mgmt_service_client
    
    from azure.cli.core.util import CLIError, sdk_no_wait
    from azure.cli.core.azclierror import InvalidArgumentValueError, ValidationError, <br>        UnrecognizedArgumentError, ResourceNotFoundError, ArgumentUsageError
    from azure.cli.core.profiles import ResourceType
    
    from azure.cli.command_modules.network.zone_file.parse_zone_file import parse_zone_file
    from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone_file
    
>   from .aaz.latest.network.application_gateway._update import Update as _ApplicationGatewayUpdate
E   ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._update'

src/azure-cli/azure/cli/command_modules/network/custom.py:28: ModuleNotFoundError
azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:666
❌batch
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_batch_privateendpoint_cmd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/batch/tests/latest/test_batch_mgmt_commands.py:114
❌3.13
Type Test Case Error Message Line
Failed test_batch_privateendpoint_cmd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/batch/tests/latest/test_batch_mgmt_commands.py:114
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
🔄billing
🔄latest
🔄3.12
🔄3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
🔄cdn
🔄latest
🔄3.12
🔄3.13
🔄cloud
🔄latest
🔄3.12
🔄3.13
🔄cognitiveservices
🔄latest
🔄3.12
🔄3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
🔄configure
🔄latest
🔄3.12
🔄3.13
🔄consumption
🔄latest
🔄3.12
🔄3.13
❌container
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_container_create_with_vnet The error message is too long, please check the pipeline log for details. azure/cli/command_modules/container/tests/latest/test_container_commands.py:479
❌3.13
Type Test Case Error Message Line
Failed test_container_create_with_vnet The error message is too long, please check the pipeline log for details. azure/cli/command_modules/container/tests/latest/test_container_commands.py:479
🔄containerapp
🔄latest
🔄3.12
🔄3.13
🔄core
🔄latest
🔄3.12
🔄3.13
🔄cosmosdb
🔄latest
🔄3.12
🔄3.13
🔄databoxedge
🔄latest
🔄3.12
🔄3.13
🔄dls
🔄latest
🔄3.12
🔄3.13
🔄dms
🔄latest
🔄3.12
🔄3.13
🔄eventgrid
🔄latest
🔄3.12
🔄3.13
🔄eventhubs
🔄latest
🔄3.12
🔄3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
🔄find
🔄latest
🔄3.12
🔄3.13
❌hdinsight
❌latest
🔄3.12
❌3.13
Type Test Case Error Message Line
Failed test_hdinsight_azure_monitor_agent The error message is too long, please check the pipeline log for details. azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py:579
🔄identity
🔄latest
🔄3.12
🔄3.13
🔄iot
🔄latest
🔄3.12
🔄3.13
❌keyvault
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_keyvault_private_endpoint_connection self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f186e433560>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f186ec0a420>
command = 'network vnet create -n cli-vnet-000003 -g cli_test_keyvault_pec000001 -l eastus2 --subnet-name cli-subnet-000004'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:141: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ModuleNotFoundError("No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway.update'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ModuleNotFoundError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.keyvault.tests.latest.test_keyvault_commands.KeyVaultPrivateEndpointConnectionScenarioTest testMethod=test_keyvault_private_endpoint_connection>
resource_group = 'cli_test_keyvault_pec000001'
key_vault = 'cli-test-kv-pec-000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_keyvault_pec')
    @KeyVaultPreparer(name_prefix='cli-test-kv-pec-', location='eastus2', additional_params='--enable-rbac-authorization false')
    def test_keyvault_private_endpoint_connection(self, resource_group, key_vault):
        self.kwargs.update({
            'loc': 'eastus2',
            'vnet': self.create_random_name('cli-vnet-', 24),
            'subnet': self.create_random_name('cli-subnet-', 24),
            'pe': self.create_random_name('cli-pe-', 24),
            'pe_connection': self.create_random_name('cli-pec-', 24)
        })
    
        # Prepare vault and network
        self.kwargs['kv_id'] = self.cmd('keyvault show -n {kv} -g {rg} --query "id" -otsv').output
>       self.cmd('network vnet create -n {vnet} -g {rg} -l {loc} --subnet-name {subnet}',
                 checks=self.check('length(newVNet.subnets)', 1))

src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:150: 
 
 
                                     _ 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1904: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self._namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2018: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1272: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2018: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1272: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2003: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2523: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:334: in check_value
    recommender.set_help_examples(self.get_examples(command_name_inferred))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:209: in get_examples
    return self.cli_help.get_examples(command,
src/azure-cli-core/azure/cli/core/help.py:251: in get_examples
    else self.group_help_cls(self, delimiters, parser)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/help.py:253: in init
    child.load(options)
src/azure-cli-core/azure/cli/core/help.py:533: in load
    loader.versioned_load(self, options)
src/azure-cli-core/azure/cli/core/help_loaders.py:154: in versioned_load
    super(CliHelpFile, help_obj).load(parser)  # pylint:disable=bad-super-call
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/help.py:198: in load
    description = getattr(options, 'description', None)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/parser.py:241: in getattribute
    self.description = self.description() <br>                       ^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:132: in description_loader
    op = self.get_op_handler(self.op_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:59: in get_op_handler
    handler = import_module(mod_to_import)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/importlib/init.py:90: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1387: in gcd_import
    ???
<frozen importlib.bootstrap>:1360: in find_and_load
    ???
<frozen importlib.bootstrap>:1331: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:935: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:999: in exec_module
    ???
<frozen importlib.bootstrap>:488: in call_with_frames_removed
    ???
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    
    # pylint: disable=no-self-use, no-member, too-many-lines, unused-argument
    # pylint: disable=protected-access, too-few-public-methods, line-too-long
    
    from collections import Counter, OrderedDict
    
    import socket
    from knack.log import get_logger
    from azure.mgmt.core.tools import parse_resource_id, is_valid_resource_id, resource_id
    
    from azure.cli.core.aaz import AAZClientConfiguration, has_value, register_client, AAZFileArgTextFormat
    from azure.cli.core.aaz._client import AAZMgmtClient
    from azure.cli.core.aaz.utils import assign_aaz_list_arg
    from azure.cli.core.commands.client_factory import get_subscription_id, get_mgmt_service_client
    
    from azure.cli.core.util import CLIError, sdk_no_wait
    from azure.cli.core.azclierror import InvalidArgumentValueError, ValidationError, <br>        UnrecognizedArgumentError, ResourceNotFoundError, ArgumentUsageError
    from azure.cli.core.profiles import ResourceType
    
    from azure.cli.command_modules.network.zone_file.parse_zone_file import parse_zone_file
    from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone_file
    
>   from .aaz.latest.network.application_gateway._update import Update as _ApplicationGatewayUpdate
E   ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._update'

src/azure-cli/azure/cli/command_modules/network/custom.py:28: ModuleNotFoundError
azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:135
Failed test_hsm_private_endpoint_connection self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f186e093740>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f186edf4170>
command = 'network vnet create -n cli-vnet-000003 -g cli_test_keyvault_pec000001 -l uksouth --subnet-name cli-subnet-000004'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:141: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ModuleNotFoundError("No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway.update'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ModuleNotFoundError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.keyvault.tests.latest.test_keyvault_commands.KeyVaultHSMPrivateEndpointConnectionScenarioTest testMethod=test_hsm_private_endpoint_connection>
resource_group = 'cli_test_keyvault_pec000001'
managed_hsm = 'cli-test-hsm-pec-000002'

    @serial_test()
    @ResourceGroupPreparer(name_prefix='cli_test_keyvault_pec')
    @ManagedHSMPreparer(name_prefix='cli-test-hsm-pec-', certs_path=CERTS_DIR)
    def test_hsm_private_endpoint_connection(self, resource_group, managed_hsm):
        self.kwargs.update({
            'hsm': managed_hsm,
            'hsm_id': f'/subscriptions/{self.get_subscription_id()}/resourceGroups/{resource_group}/providers/Microsoft.KeyVault/managedHSMs/{managed_hsm}',
            'loc': 'uksouth',
            'vnet': self.create_random_name('cli-vnet-', 24),
            'subnet': self.create_random_name('cli-subnet-', 24),
            'pe': self.create_random_name('cli-pe-', 24),
            'pe_connection': self.create_random_name('cli-pec-', 24)
        })
    
        # Prepare vault and network
>       self.cmd('network vnet create -n {vnet} -g {rg} -l {loc} --subnet-name {subnet}',
                 checks=self.check('length(newVNet.subnets)', 1))

src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:226: 
 
 
                                     _ 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1904: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self._namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2018: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1272: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2018: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1272: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2003: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2523: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:334: in check_value
    recommender.set_help_examples(self.get_examples(command_name_inferred))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:209: in get_examples
    return self.cli_help.get_examples(command,
src/azure-cli-core/azure/cli/core/help.py:251: in get_examples
    else self.group_help_cls(self, delimiters, parser)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/help.py:253: in init
    child.load(options)
src/azure-cli-core/azure/cli/core/help.py:533: in load
    loader.versioned_load(self, options)
src/azure-cli-core/azure/cli/core/help_loaders.py:154: in versioned_load
    super(CliHelpFile, help_obj).load(parser)  # pylint:disable=bad-super-call
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/help.py:198: in load
    description = getattr(options, 'description', None)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/parser.py:241: in getattribute
    self.description = self.description() <br>                       ^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:132: in description_loader
    op = self.get_op_handler(self.op_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:59: in get_op_handler
    handler = import_module(mod_to_import)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/importlib/init.py:90: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1387: in gcd_import
    ???
<frozen importlib.bootstrap>:1360: in find_and_load
    ???
<frozen importlib.bootstrap>:1331: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:935: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:999: in exec_module
    ???
<frozen importlib.bootstrap>:488: in call_with_frames_removed
    ???
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    
    # pylint: disable=no-self-use, no-member, too-many-lines, unused-argument
    # pylint: disable=protected-access, too-few-public-methods, line-too-long
    
    from collections import Counter, OrderedDict
    
    import socket
    from knack.log import get_logger
    from azure.mgmt.core.tools import parse_resource_id, is_valid_resource_id, resource_id
    
    from azure.cli.core.aaz import AAZClientConfiguration, has_value, register_client, AAZFileArgTextFormat
    from azure.cli.core.aaz._client import AAZMgmtClient
    from azure.cli.core.aaz.utils import assign_aaz_list_arg
    from azure.cli.core.commands.client_factory import get_subscription_id, get_mgmt_service_client
    
    from azure.cli.core.util import CLIError, sdk_no_wait
    from azure.cli.core.azclierror import InvalidArgumentValueError, ValidationError, <br>        UnrecognizedArgumentError, ResourceNotFoundError, ArgumentUsageError
    from azure.cli.core.profiles import ResourceType
    
    from azure.cli.command_modules.network.zone_file.parse_zone_file import parse_zone_file
    from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone_file
    
>   from .aaz.latest.network.application_gateway._update import Update as _ApplicationGatewayUpdate
E   ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._update'

src/azure-cli/azure/cli/command_modules/network/custom.py:28: ModuleNotFoundError
azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:210
Failed test_keyvault_network_rule The error message is too long, please check the pipeline log for details. azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:2472
❌3.13
Type Test Case Error Message Line
Failed test_keyvault_private_endpoint_connection self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f05f43fee90>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f05f5e34b90>
command = 'network vnet create -n cli-vnet-000003 -g cli_test_keyvault_pec000001 -l eastus2 --subnet-name cli-subnet-000004'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.13/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:141: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ModuleNotFoundError("No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway.update'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ModuleNotFoundError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.keyvault.tests.latest.test_keyvault_commands.KeyVaultPrivateEndpointConnectionScenarioTest testMethod=test_keyvault_private_endpoint_connection>
resource_group = 'cli_test_keyvault_pec000001'
key_vault = 'cli-test-kv-pec-000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_keyvault_pec')
    @KeyVaultPreparer(name_prefix='cli-test-kv-pec-', location='eastus2', additional_params='--enable-rbac-authorization false')
    def test_keyvault_private_endpoint_connection(self, resource_group, key_vault):
        self.kwargs.update({
            'loc': 'eastus2',
            'vnet': self.create_random_name('cli-vnet-', 24),
            'subnet': self.create_random_name('cli-subnet-', 24),
            'pe': self.create_random_name('cli-pe-', 24),
            'pe_connection': self.create_random_name('cli-pec-', 24)
        })
    
        # Prepare vault and network
        self.kwargs['kv_id'] = self.cmd('keyvault show -n {kv} -g {rg} --query "id" -otsv').output
>       self.cmd('network vnet create -n {vnet} -g {rg} -l {loc} --subnet-name {subnet}',
                 checks=self.check('length(newVNet.subnets)', 1))

src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:150: 
 
 
                                     _ 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
env/lib/python3.13/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1898: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self._namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1998: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2528: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:334: in check_value
    recommender.set_help_examples(self.get_examples(command_name_inferred))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:209: in get_examples
    return self.cli_help.get_examples(command,
src/azure-cli-core/azure/cli/core/help.py:251: in get_examples
    else self.group_help_cls(self, delimiters, parser)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/help.py:253: in init
    child.load(options)
src/azure-cli-core/azure/cli/core/help.py:533: in load
    loader.versioned_load(self, options)
src/azure-cli-core/azure/cli/core/help_loaders.py:154: in versioned_load
    super(CliHelpFile, help_obj).load(parser)  # pylint:disable=bad-super-call
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/help.py:198: in load
    description = getattr(options, 'description', None)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:241: in getattribute
    self.description = self.description() <br>                       ^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:132: in description_loader
    op = self.get_op_handler(self.op_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:59: in get_op_handler
    handler = import_module(mod_to_import)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/importlib/init.py:88: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1387: in gcd_import
    ???
<frozen importlib.bootstrap>:1360: in find_and_load
    ???
<frozen importlib.bootstrap>:1331: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:935: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:1023: in exec_module
    ???
<frozen importlib.bootstrap>:488: in call_with_frames_removed
    ???
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    
    # pylint: disable=no-self-use, no-member, too-many-lines, unused-argument
    # pylint: disable=protected-access, too-few-public-methods, line-too-long
    
    from collections import Counter, OrderedDict
    
    import socket
    from knack.log import get_logger
    from azure.mgmt.core.tools import parse_resource_id, is_valid_resource_id, resource_id
    
    from azure.cli.core.aaz import AAZClientConfiguration, has_value, register_client, AAZFileArgTextFormat
    from azure.cli.core.aaz._client import AAZMgmtClient
    from azure.cli.core.aaz.utils import assign_aaz_list_arg
    from azure.cli.core.commands.client_factory import get_subscription_id, get_mgmt_service_client
    
    from azure.cli.core.util import CLIError, sdk_no_wait
    from azure.cli.core.azclierror import InvalidArgumentValueError, ValidationError, <br>        UnrecognizedArgumentError, ResourceNotFoundError, ArgumentUsageError
    from azure.cli.core.profiles import ResourceType
    
    from azure.cli.command_modules.network.zone_file.parse_zone_file import parse_zone_file
    from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone_file
    
>   from .aaz.latest.network.application_gateway._update import Update as _ApplicationGatewayUpdate
E   ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._update'

src/azure-cli/azure/cli/command_modules/network/custom.py:28: ModuleNotFoundError
azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:135
Failed test_hsm_private_endpoint_connection self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f05f546acf0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f05f5e34690>
command = 'network vnet create -n cli-vnet-000003 -g cli_test_keyvault_pec000001 -l uksouth --subnet-name cli-subnet-000004'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.13/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:141: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ModuleNotFoundError("No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway.update'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ModuleNotFoundError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.keyvault.tests.latest.test_keyvault_commands.KeyVaultHSMPrivateEndpointConnectionScenarioTest testMethod=test_hsm_private_endpoint_connection>
resource_group = 'cli_test_keyvault_pec000001'
managed_hsm = 'cli-test-hsm-pec-000002'

    @serial_test()
    @ResourceGroupPreparer(name_prefix='cli_test_keyvault_pec')
    @ManagedHSMPreparer(name_prefix='cli-test-hsm-pec-', certs_path=CERTS_DIR)
    def test_hsm_private_endpoint_connection(self, resource_group, managed_hsm):
        self.kwargs.update({
            'hsm': managed_hsm,
            'hsm_id': f'/subscriptions/{self.get_subscription_id()}/resourceGroups/{resource_group}/providers/Microsoft.KeyVault/managedHSMs/{managed_hsm}',
            'loc': 'uksouth',
            'vnet': self.create_random_name('cli-vnet-', 24),
            'subnet': self.create_random_name('cli-subnet-', 24),
            'pe': self.create_random_name('cli-pe-', 24),
            'pe_connection': self.create_random_name('cli-pec-', 24)
        })
    
        # Prepare vault and network
>       self.cmd('network vnet create -n {vnet} -g {rg} -l {loc} --subnet-name {subnet}',
                 checks=self.check('length(newVNet.subnets)', 1))

src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:226: 
 
 
                                     _ 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
env/lib/python3.13/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1898: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self._namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1998: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2528: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:334: in check_value
    recommender.set_help_examples(self.get_examples(command_name_inferred))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:209: in get_examples
    return self.cli_help.get_examples(command,
src/azure-cli-core/azure/cli/core/help.py:251: in get_examples
    else self.group_help_cls(self, delimiters, parser)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/help.py:253: in init
    child.load(options)
src/azure-cli-core/azure/cli/core/help.py:533: in load
    loader.versioned_load(self, options)
src/azure-cli-core/azure/cli/core/help_loaders.py:154: in versioned_load
    super(CliHelpFile, help_obj).load(parser)  # pylint:disable=bad-super-call
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/help.py:198: in load
    description = getattr(options, 'description', None)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:241: in getattribute
    self.description = self.description() <br>                       ^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:132: in description_loader
    op = self.get_op_handler(self.op_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:59: in get_op_handler
    handler = import_module(mod_to_import)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/importlib/init.py:88: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1387: in gcd_import
    ???
<frozen importlib.bootstrap>:1360: in find_and_load
    ???
<frozen importlib.bootstrap>:1331: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:935: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:1023: in exec_module
    ???
<frozen importlib.bootstrap>:488: in call_with_frames_removed
    ???
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    
    # pylint: disable=no-self-use, no-member, too-many-lines, unused-argument
    # pylint: disable=protected-access, too-few-public-methods, line-too-long
    
    from collections import Counter, OrderedDict
    
    import socket
    from knack.log import get_logger
    from azure.mgmt.core.tools import parse_resource_id, is_valid_resource_id, resource_id
    
    from azure.cli.core.aaz import AAZClientConfiguration, has_value, register_client, AAZFileArgTextFormat
    from azure.cli.core.aaz._client import AAZMgmtClient
    from azure.cli.core.aaz.utils import assign_aaz_list_arg
    from azure.cli.core.commands.client_factory import get_subscription_id, get_mgmt_service_client
    
    from azure.cli.core.util import CLIError, sdk_no_wait
    from azure.cli.core.azclierror import InvalidArgumentValueError, ValidationError, <br>        UnrecognizedArgumentError, ResourceNotFoundError, ArgumentUsageError
    from azure.cli.core.profiles import ResourceType
    
    from azure.cli.command_modules.network.zone_file.parse_zone_file import parse_zone_file
    from azure.cli.command_modules.network.zone_file.make_zone_file import make_zone_file
    
>   from .aaz.latest.network.application_gateway._update import Update as _ApplicationGatewayUpdate
E   ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._update'

src/azure-cli/azure/cli/command_modules/network/custom.py:28: ModuleNotFoundError
azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:210
Failed test_keyvault_network_rule The error message is too long, please check the pipeline log for details. azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py:2472
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
🔄maps
🔄latest
🔄3.12
🔄3.13
🔄marketplaceordering
🔄latest
🔄3.12
🔄3.13
🔄monitor
🔄latest
🔄3.12
🔄3.13
❌mysql
❌latest
🔄3.12
❌3.13
Type Test Case Error Message Line
Failed test_mysql_flexible_server_georestore_mgmt The error message is too long, please check the pipeline log for details. azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py:112
Failed test_mysql_flexible_server_restore_mgmt The error message is too long, please check the pipeline log for details. azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py:107
Failed test_mysql_flexible_server_cross_region_replica_mgmt The error message is too long, please check the pipeline log for details. azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py:1282
Failed test_mysql_flexible_server_vnet_mgmt_supplied_subnet_id_in_different_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py:1473
Failed test_mysql_flexible_server_vnet_mgmt_supplied_subnetid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py:1462
Failed test_mysql_flexible_server_vnet_mgmt_supplied_vname_and_subnetname The error message is too long, please check the pipeline log for details. azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py:1468
Failed test_mysql_flexible_server_existing_private_dns_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py:1720
Failed test_mysql_flexible_server_new_private_dns_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py:1726
❌netappfiles
❌latest
🔄3.12
❌3.13
Type Test Case Error Message Line
Failed test_create_delete_backup The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_backup_commands.py:115
Failed test_disable_backup_for_volume The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_backup_commands.py:265
Failed test_get_backup_by_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_backup_commands.py:198
Failed test_get_backup_status The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_backup_commands.py:346
Failed test_list_backup The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_backup_commands.py:158
Failed test_restore_backup_to_new_volume The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_backup_commands.py:301
Failed test_update_backup The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_backup_commands.py:229
Failed test_assign_backup_policy_to_volume The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_backup_policy_commands.py:197
Failed test_check_file_path_availability The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_netAppResource_commands.py:26
Failed test_create_delete_snapshots The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py:50
Failed test_create_volume_from_snapshot The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py:76
Failed test_get_snapshot The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py:153
Failed test_list_snapshots The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py:132
Failed test_restore_file_returns_not_found The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py:176
Failed test_revert_volume_from_snapshot The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py:104
Failed test_assign_snapshot_policy_to_volume The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_policy_commands.py:324
Failed test_snapshot_policy_list_volumes The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_policy_commands.py:287
Failed test_subvolume_crud The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_subvolume_commands.py:25
Failed test_subvolume_get_metadata The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_subvolume_commands.py:122
Failed test_subvolume_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_subvolume_commands.py:68
Failed test_add_export_policy_with_invalid_rule_index The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:520
Failed test_add_export_policy_with_no_rule_index The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:498
Failed test_break_file_locks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:541
Failed test_change_pool The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:408
Failed test_create_delete_volumes The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:92
Failed test_create_volume_with_non_default_export_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:359
Failed test_create_volume_with_subnet_in_different_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:128
Failed test_exernal_migration_volume_fails The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:627
Failed test_export_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:284
Failed test_get_groupid_list_for_ldapuser The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:554
Failed test_get_volume_by_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:233
Failed test_list_volumes The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:215
Failed test_network_sibling_sets The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:571
Failed test_nfsv3_with_abn_export_policy_provided_is_successful The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:479
Failed test_nfsv3_with_no_export_policy_provided_is_successful The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:462
Failed test_non_default_export_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:332
Failed test_perform_replication The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:157
Failed test_split_clone_from_parent The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:685
Failed test_update_volume The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:259
Failed test_volume_parameters The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:430
Failed test_volume_size_8Tib The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_commands.py:594
Failed test_create_volume_quota_rule The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_quota_rule_commands.py:24
Failed test_volume_quota_rule_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/netappfiles/tests/latest/test_volume_quota_rule_commands.py:72
🔄network
🔄latest
🔄3.12
🔄3.13
🔄policyinsights
🔄latest
🔄3.12
🔄3.13
🔄postgresql
🔄latest
🔄3.12
🔄3.13
🔄privatedns
🔄latest
🔄3.12
🔄3.13
🔄profile
🔄latest
🔄3.12
🔄3.13
🔄rdbms
🔄latest
🔄3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
🔄relay
🔄latest
🔄3.12
️✔️3.13
🔄resource
🔄latest
🔄3.12
🔄3.13
❌role
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_role_assignment_scenario self = <azure.cli.command_modules.role.tests.latest.test_role.RoleAssignmentScenarioTest testMethod=test_role_assignment_scenario>
resource_group = 'cli_role_assign000001'

    @ResourceGroupPreparer(name_prefix='cli_role_assign')
    @AllowLargeResponse()
    def test_role_assignment_scenario(self, resource_group):
        if self.run_under_service_principal():
            return  # this test delete users which are beyond a SP's capacity, so quit...
    
        with mock.patch('azure.cli.command_modules.role.custom.gen_guid', side_effect=self.create_guid):
            user = self.create_random_name('testuser', 15)
            self.kwargs.update({
                'upn': user + TEST_TENANT_DOMAIN,
                'nsg': 'nsg1',
                'role': 'Reader',  # Use low-privileged role to make the test secure
                # https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
                'reader_guid': 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
            })
            self.prepare_scope_kwargs()
    
            # test create role assignment without --scope
            with self.assertRaisesRegex(SystemExit, '2'):
                self.cmd('role assignment create --assignee {upn} --role {role}')
    
            result = self.cmd('ad user create --display-name tester123 --password Test123456789'
                              ' --user-principal-name {upn}').get_output_in_json()
            self.kwargs.update({
                'user_id': result['id']})
    
            group = self.create_random_name('testgroup', 15)
            self.kwargs.update({
                'group': group})
    
            group_result = self.cmd(
                'ad group create --display-name group123 --mail-nickname {group}').get_output_in_json()
            self.kwargs.update({
                'group_id': group_result['id']})
            self.cmd(
                'ad group member add --group {group_id} --member-id {user_id}')
    
            time.sleep(15)  # By-design, it takes some time for RBAC system propagated with graph object change
    
            try:
>               self.cmd('network nsg create -n {nsg} -g {rg}')

src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role.py:363: 
 
                                       
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1904: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2018: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1272: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2018: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1272: in call
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1914: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:1943: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2165: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2141: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2003: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2523: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:348: in check_value
    self.exit(2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
               

self = AzCliCommandParser(prog='az network nsg', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2637: SystemExit
azure/cli/command_modules/role/tests/latest/test_role.py:322
❌3.13
Type Test Case Error Message Line
Failed test_role_assignment_scenario self = <azure.cli.command_modules.role.tests.latest.test_role.RoleAssignmentScenarioTest testMethod=test_role_assignment_scenario>
resource_group = 'cli_role_assign000001'

    @ResourceGroupPreparer(name_prefix='cli_role_assign')
    @AllowLargeResponse()
    def test_role_assignment_scenario(self, resource_group):
        if self.run_under_service_principal():
            return  # this test delete users which are beyond a SP's capacity, so quit...
    
        with mock.patch('azure.cli.command_modules.role.custom.gen_guid', side_effect=self.create_guid):
            user = self.create_random_name('testuser', 15)
            self.kwargs.update({
                'upn': user + TEST_TENANT_DOMAIN,
                'nsg': 'nsg1',
                'role': 'Reader',  # Use low-privileged role to make the test secure
                # https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
                'reader_guid': 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
            })
            self.prepare_scope_kwargs()
    
            # test create role assignment without --scope
            with self.assertRaisesRegex(SystemExit, '2'):
                self.cmd('role assignment create --assignee {upn} --role {role}')
    
            result = self.cmd('ad user create --display-name tester123 --password Test123456789'
                              ' --user-principal-name {upn}').get_output_in_json()
            self.kwargs.update({
                'user_id': result['id']})
    
            group = self.create_random_name('testgroup', 15)
            self.kwargs.update({
                'group': group})
    
            group_result = self.cmd(
                'ad group create --display-name group123 --mail-nickname {group}').get_output_in_json()
            self.kwargs.update({
                'group_id': group_result['id']})
            self.cmd(
                'ad group member add --group {group_id} --member-id {user_id}')
    
            time.sleep(15)  # By-design, it takes some time for RBAC system propagated with graph object change
    
            try:
>               self.cmd('network nsg create -n {nsg} -g {rg}')

src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role.py:363: 
 
                                       
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.13/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:606: in execute
    parsed_args = self.parser.parse_args(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/knack/parser.py:261: in parse_args
    return super().parse_args(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1898: in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2013: in take_action
    action(self, namespace, argument_values, option_string)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1258: in call
    subnamespace, arg_strings = subparser.parse_known_args(arg_strings, None)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:292: in parse_known_args
    self.namespace, self.raw_arguments = super().parse_known_args(args=args, namespace=namespace)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1908: in parse_known_args
    return self.parse_known_args2(args, namespace, intermixed=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1937: in parse_known_args2
    namespace, args = self.parse_known_args(args, namespace, intermixed)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2169: in parse_known_args
    positionals_end_index = consume_positionals(start_index)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2144: in consume_positionals
    take_action(action, args)
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:1998: in take_action
    argument_values = self.get_values(action, argument_strings)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/parser.py:283: in get_values
    value = super().get_values(action, arg_strings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2528: in get_values
    self.check_value(action, value[0])
src/azure-cli-core/azure/cli/core/parser.py:348: in check_value
    self.exit(2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
               

self = AzCliCommandParser(prog='az network nsg', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/argparse.py:2645: SystemExit
azure/cli/command_modules/role/tests/latest/test_role.py:322
🔄search
🔄latest
🔄3.12
🔄3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
❌servicebus
❌latest
🔄3.12
❌3.13
Type Test Case Error Message Line
Failed test_sb_privateendpoint The error message is too long, please check the pipeline log for details. azure/cli/command_modules/servicebus/tests/latest/test_servicebus_commands_privateendpoint_test.py:18
Failed test_sb_network The error message is too long, please check the pipeline log for details. azure/cli/command_modules/servicebus/tests/latest/test_servicebus_network_commands.py:18
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
🔄signalr
🔄latest
🔄3.12
🔄3.13
🔄sql
🔄latest
🔄3.12
🔄3.13
🔄sqlvm
🔄latest
🔄3.12
️✔️3.13
🔄storage
🔄latest
🔄3.12
🔄3.13
🔄synapse
🔄latest
🔄3.12
🔄3.13
🔄telemetry
🔄latest
🔄3.12
🔄3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
🔄vm
🔄latest
🔄3.12
🔄3.13

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Feb 24, 2026

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 24, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot do-not-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants