Skip to content

{Network} Optimize import logic in network module#32838

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

{Network} Optimize import logic in network module#32838
ReaNAiveD wants to merge 11 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

⚠️WARNING: Current Azure CLI builds with AAZ Compact enabled. The refactor should be merged along with a build pipeline update!

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
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️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
️✔️3.13
️✔️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
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️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
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
❌network
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_network_express_route self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f57397b7ce0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f573ba736b0>
command = 'network express-route create -g cli_test_express_route000001 -n circuit1 --bandwidth 50 --provider "Ibiza Test Provider" --peering-location Area51 --sku-tier Premium --tags foo=doo'
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 = NameError("name 'InvalidArgumentValueError' is not defined"), 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 NameError 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.network.tests.latest.test_network_commands.NetworkExpressRouteScenarioTest testMethod=test_network_express_route>
resource_group = 'cli_test_express_route000001'

    @record_only()  # record_only as the express route is extremely expensive, contact service team for an available ER
    @ResourceGroupPreparer(name_prefix='cli_test_express_route')
    def test_network_express_route(self, resource_group):
    
        self.kwargs = {
            'rg': resource_group,
            'er': 'circuit1',
            'rt': 'Microsoft.Network/expressRouteCircuits'
        }
    
        self.cmd('network express-route list-service-providers', checks=[
            self.check('type(@)', 'array'),
            self.check("length([?type == 'Microsoft.Network/expressRouteServiceProviders']) == length(@)", True)
        ])
    
        # Premium SKU required to create MicrosoftPeering settings
>       self.cmd('network express-route create -g {rg} -n {er} --bandwidth 50 --provider "Ibiza Test Provider" --peering-location Area51 --sku-tier Premium --tags foo=doo')

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3559: 
 
                                       
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:682: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:792: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:1150: in call
    result = poller.result()
             ^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:105: in result
    self.wait(timeout)
env/lib/python3.12/site-packages/azure/core/tracing/decorator.py:119: in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:127: in wait
    raise self.exception
src/azure-cli-core/azure/cli/core/aaz/poller.py:80: in start
    for polling_method in self.polling_generator:
                          ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/express_route/create.py:191: in execute_operations
    self.pre_operations()
src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/create.py:62: in pre_operations
    converted_bandwidth = validate_bandwidth(args.bandwidth)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

bandwidth = <azure.cli.core.aaz._field_value.AAZList object at 0x7f5738301940>
mbps = True

    def _validate_bandwidth(bandwidth, mbps=True):
        unit = 'mbps' if mbps else 'gbps'
        if bandwidth is None:
            return
        if len(bandwidth) == 1:
            bandwidth_comps = bandwidth[0].to_serialized_data().split(' ')
        else:
            bandwidth_comps = bandwidth.to_serialized_data()
    
>       usage_error = InvalidArgumentValueError('--bandwidth INT {Mbps,Gbps}')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
E       NameError: name 'InvalidArgumentValueError' is not defined

src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/_create.py:21: NameError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3542
Failed test_network_express_route_port self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f5731dac830>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f573bcd90a0>
command = 'network express-route port create -g cli_test_express_route_port000001 -n expressRouteTest --location eastus --peering-location Equinix-Ashburn-DC2 --encapsulation QinQ --bandwidth 10 Gbps'
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 = NameError("name 'InvalidArgumentValueError' is not defined"), 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 NameError 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.network.tests.latest.test_network_commands.NetworkExpressRoutePortScenarioTest testMethod=test_network_express_route_port>
resource_group = 'cli_test_express_route_port000001'
key_vault = 'test-er-port-kv000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_express_route_port', location='eastus')
    @KeyVaultPreparer(name_prefix='test-er-port-kv', location='eastus', additional_params='--enable-rbac-authorization false')
    def test_network_express_route_port(self, resource_group, key_vault):
        self.kwargs.update({
            'rg': resource_group,
            'location': 'eastus',
            'name': 'expressRouteTest',
            'peeringRG': 'Equinix-Ashburn-DC2',
            'encapsulation': 'QinQ',
            'bandwidth': '10 Gbps',
            'cipher': 'GcmAes128',
            'kv': key_vault,
            'CAK_name': 'CAK',
            'CAK_value': 'b4355b9ccaf727d2ba7744ee991ce00e',
            'CKN_name': 'CKN',
            'CKN_value': '93e9ce8469eff0536784fc4ad253b5a6',
        })
        self.kwargs['CAK_id'] = self.cmd('keyvault secret set --name {CAK_name} --vault-name {kv} --value {CAK_value}').get_output_in_json()['id']
        self.kwargs['CKN_id'] = self.cmd('keyvault secret set --name {CKN_name} --vault-name {kv} --value {CKN_value}').get_output_in_json()['id']
        identity = self.cmd('identity create -g {rg} -n {name}').get_output_in_json()
        self.cmd('keyvault set-policy -n {kv} -g {rg} --secret-permissions get --object-id ' + identity['principalId'])
    
        self.cmd('network express-route port location list')
    
        self.cmd('network express-route port location show -l {peeringRG}', checks=[
            self.check('name', self.kwargs['peeringRG'])
        ])
    
>       self.cmd('network express-route port create -g {rg} -n {name} --location {location} --peering-location {peeringRG} --encapsulation {encapsulation} --bandwidth {bandwidth}', checks=[
            self.check('name', self.kwargs['name']),
            self.check('length(links)', 2),
        ])

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3731: 
 
                                       
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:682: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:792: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:1150: in call
    result = poller.result()
             ^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:105: in result
    self.wait(timeout)
env/lib/python3.12/site-packages/azure/core/tracing/decorator.py:119: in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:127: in wait
    raise self.exception
src/azure-cli-core/azure/cli/core/aaz/poller.py:80: in start
    for polling_method in self.polling_generator:
                          ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/express_route/port/create.py:97: in execute_operations
    self.pre_operations()
src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/port/create.py:57: in pre_operations
    converted_bandwidth = validate_bandwidth(args.bandwidth, mbps=False)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

bandwidth = <azure.cli.core.aaz._field_value.AAZList object at 0x7f5731c1acf0>
mbps = False

    def _validate_bandwidth(bandwidth, mbps=True):
        unit = 'mbps' if mbps else 'gbps'
        if bandwidth is None:
            return
        if len(bandwidth) == 1:
            bandwidth_comps = bandwidth[0].to_serialized_data().split(' ')
        else:
            bandwidth_comps = bandwidth.to_serialized_data()
    
>       usage_error = InvalidArgumentValueError('--bandwidth INT {Mbps,Gbps}')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
E       NameError: name 'InvalidArgumentValueError' is not defined

src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/port/_create.py:21: NameError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3701
Failed test_network_express_route_ipv6_peering self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f5739873dd0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f573bab9040>
command = 'network express-route create -g cli_test_express_route_ipv6_peering000001 -n circuit1 --bandwidth 50 --provider "Ibiza Test Provider" --peering-location Area51 --sku-tier Premium'
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 = NameError("name 'InvalidArgumentValueError' is not defined"), 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 NameError 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.network.tests.latest.test_network_commands.NetworkExpressRouteIPv6PeeringScenarioTest testMethod=test_network_express_route_ipv6_peering>
resource_group = 'cli_test_express_route_ipv6_peering000001'

    @record_only()  # record_only as the express route is extremely expensive, contact service team for an available ER
    @ResourceGroupPreparer(name_prefix='cli_test_express_route_ipv6_peering')
    def test_network_express_route_ipv6_peering(self, resource_group):
    
        self.kwargs['er'] = 'circuit1'
    
        # Premium SKU required to create MicrosoftPeering settings
>       self.cmd('network express-route create -g {rg} -n {er} --bandwidth 50 --provider "Ibiza Test Provider" --peering-location Area51 --sku-tier Premium')

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3772: 
 
                                       
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:682: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:792: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:1150: in call
    result = poller.result()
             ^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:105: in result
    self.wait(timeout)
env/lib/python3.12/site-packages/azure/core/tracing/decorator.py:119: in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:127: in wait
    raise self.exception
src/azure-cli-core/azure/cli/core/aaz/poller.py:80: in start
    for polling_method in self.polling_generator:
                          ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/express_route/create.py:191: in execute_operations
    self.pre_operations()
src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/create.py:62: in pre_operations
    converted_bandwidth = validate_bandwidth(args.bandwidth)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

bandwidth = <azure.cli.core.aaz._field_value.AAZList object at 0x7f573846e0f0>
mbps = True

    def _validate_bandwidth(bandwidth, mbps=True):
        unit = 'mbps' if mbps else 'gbps'
        if bandwidth is None:
            return
        if len(bandwidth) == 1:
            bandwidth_comps = bandwidth[0].to_serialized_data().split(' ')
        else:
            bandwidth_comps = bandwidth.to_serialized_data()
    
>       usage_error = InvalidArgumentValueError('--bandwidth INT {Mbps,Gbps}')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
E       NameError: name 'InvalidArgumentValueError' is not defined

src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/_create.py:21: NameError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3764
Failed test_network_express_route_ipv6_peering2 The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3786
Failed test_network_express_route_global_reach The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3802
Failed test_network_express_route_global_reach_config The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3846
Failed test_network_express_route_peer_connection The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3825
Failed test_network_lb_probes The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:4495
Failed test_network_vnet_peering_sync The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:5557
❌3.13
Type Test Case Error Message Line
Failed test_network_express_route self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2ff02afd90>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f2ff3986990>
command = 'network express-route create -g cli_test_express_route000001 -n circuit1 --bandwidth 50 --provider "Ibiza Test Provider" --peering-location Area51 --sku-tier Premium --tags foo=doo'
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 = NameError("name 'InvalidArgumentValueError' is not defined"), 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 NameError 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.network.tests.latest.test_network_commands.NetworkExpressRouteScenarioTest testMethod=test_network_express_route>
resource_group = 'cli_test_express_route000001'

    @record_only()  # record_only as the express route is extremely expensive, contact service team for an available ER
    @ResourceGroupPreparer(name_prefix='cli_test_express_route')
    def test_network_express_route(self, resource_group):
    
        self.kwargs = {
            'rg': resource_group,
            'er': 'circuit1',
            'rt': 'Microsoft.Network/expressRouteCircuits'
        }
    
        self.cmd('network express-route list-service-providers', checks=[
            self.check('type(@)', 'array'),
            self.check("length([?type == 'Microsoft.Network/expressRouteServiceProviders']) == length(@)", True)
        ])
    
        # Premium SKU required to create MicrosoftPeering settings
>       self.cmd('network express-route create -g {rg} -n {er} --bandwidth 50 --provider "Ibiza Test Provider" --peering-location Area51 --sku-tier Premium --tags foo=doo')

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3559: 
 
                                       
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:682: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:792: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:1150: in call
    result = poller.result()
             ^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:105: in result
    self.wait(timeout)
env/lib/python3.13/site-packages/azure/core/tracing/decorator.py:119: in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:127: in wait
    raise self.exception
src/azure-cli-core/azure/cli/core/aaz/poller.py:80: in start
    for polling_method in self.polling_generator:
                          ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/express_route/create.py:191: in execute_operations
    self.pre_operations()
src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/create.py:62: in pre_operations
    converted_bandwidth = validate_bandwidth(args.bandwidth)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

bandwidth = <azure.cli.core.aaz._field_value.AAZList object at 0x7f2ff00cbb60>
mbps = True

    def _validate_bandwidth(bandwidth, mbps=True):
        unit = 'mbps' if mbps else 'gbps'
        if bandwidth is None:
            return
        if len(bandwidth) == 1:
            bandwidth_comps = bandwidth[0].to_serialized_data().split(' ')
        else:
            bandwidth_comps = bandwidth.to_serialized_data()
    
>       usage_error = InvalidArgumentValueError('--bandwidth INT {Mbps,Gbps}')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
E       NameError: name 'InvalidArgumentValueError' is not defined

src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/_create.py:21: NameError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3542
Failed test_network_express_route_port self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2fe9b8e140>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f2ff3986c10>
command = 'network express-route port create -g cli_test_express_route_port000001 -n expressRouteTest --location eastus --peering-location Equinix-Ashburn-DC2 --encapsulation QinQ --bandwidth 10 Gbps'
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 = NameError("name 'InvalidArgumentValueError' is not defined"), 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 NameError 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.network.tests.latest.test_network_commands.NetworkExpressRoutePortScenarioTest testMethod=test_network_express_route_port>
resource_group = 'cli_test_express_route_port000001'
key_vault = 'test-er-port-kv000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_express_route_port', location='eastus')
    @KeyVaultPreparer(name_prefix='test-er-port-kv', location='eastus', additional_params='--enable-rbac-authorization false')
    def test_network_express_route_port(self, resource_group, key_vault):
        self.kwargs.update({
            'rg': resource_group,
            'location': 'eastus',
            'name': 'expressRouteTest',
            'peeringRG': 'Equinix-Ashburn-DC2',
            'encapsulation': 'QinQ',
            'bandwidth': '10 Gbps',
            'cipher': 'GcmAes128',
            'kv': key_vault,
            'CAK_name': 'CAK',
            'CAK_value': 'b4355b9ccaf727d2ba7744ee991ce00e',
            'CKN_name': 'CKN',
            'CKN_value': '93e9ce8469eff0536784fc4ad253b5a6',
        })
        self.kwargs['CAK_id'] = self.cmd('keyvault secret set --name {CAK_name} --vault-name {kv} --value {CAK_value}').get_output_in_json()['id']
        self.kwargs['CKN_id'] = self.cmd('keyvault secret set --name {CKN_name} --vault-name {kv} --value {CKN_value}').get_output_in_json()['id']
        identity = self.cmd('identity create -g {rg} -n {name}').get_output_in_json()
        self.cmd('keyvault set-policy -n {kv} -g {rg} --secret-permissions get --object-id ' + identity['principalId'])
    
        self.cmd('network express-route port location list')
    
        self.cmd('network express-route port location show -l {peeringRG}', checks=[
            self.check('name', self.kwargs['peeringRG'])
        ])
    
>       self.cmd('network express-route port create -g {rg} -n {name} --location {location} --peering-location {peeringRG} --encapsulation {encapsulation} --bandwidth {bandwidth}', checks=[
            self.check('name', self.kwargs['name']),
            self.check('length(links)', 2),
        ])

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3731: 
 
                                       
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:682: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:792: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:1150: in call
    result = poller.result()
             ^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:105: in result
    self.wait(timeout)
env/lib/python3.13/site-packages/azure/core/tracing/decorator.py:119: in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:127: in wait
    raise self.exception
src/azure-cli-core/azure/cli/core/aaz/poller.py:80: in start
    for polling_method in self.polling_generator:
                          ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/express_route/port/create.py:97: in execute_operations
    self.pre_operations()
src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/port/create.py:57: in pre_operations
    converted_bandwidth = validate_bandwidth(args.bandwidth, mbps=False)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

bandwidth = <azure.cli.core.aaz._field_value.AAZList object at 0x7f2fe9d4ba80>
mbps = False

    def _validate_bandwidth(bandwidth, mbps=True):
        unit = 'mbps' if mbps else 'gbps'
        if bandwidth is None:
            return
        if len(bandwidth) == 1:
            bandwidth_comps = bandwidth[0].to_serialized_data().split(' ')
        else:
            bandwidth_comps = bandwidth.to_serialized_data()
    
>       usage_error = InvalidArgumentValueError('--bandwidth INT {Mbps,Gbps}')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
E       NameError: name 'InvalidArgumentValueError' is not defined

src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/port/_create.py:21: NameError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3701
Failed test_network_express_route_ipv6_peering self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2ff17f1fd0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f2ff3a34910>
command = 'network express-route create -g cli_test_express_route_ipv6_peering000001 -n circuit1 --bandwidth 50 --provider "Ibiza Test Provider" --peering-location Area51 --sku-tier Premium'
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 = NameError("name 'InvalidArgumentValueError' is not defined"), 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 NameError 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.network.tests.latest.test_network_commands.NetworkExpressRouteIPv6PeeringScenarioTest testMethod=test_network_express_route_ipv6_peering>
resource_group = 'cli_test_express_route_ipv6_peering000001'

    @record_only()  # record_only as the express route is extremely expensive, contact service team for an available ER
    @ResourceGroupPreparer(name_prefix='cli_test_express_route_ipv6_peering')
    def test_network_express_route_ipv6_peering(self, resource_group):
    
        self.kwargs['er'] = 'circuit1'
    
        # Premium SKU required to create MicrosoftPeering settings
>       self.cmd('network express-route create -g {rg} -n {er} --bandwidth 50 --provider "Ibiza Test Provider" --peering-location Area51 --sku-tier Premium')

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3772: 
 
                                       
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:682: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:792: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:1150: in call
    result = poller.result()
             ^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:105: in result
    self.wait(timeout)
env/lib/python3.13/site-packages/azure/core/tracing/decorator.py:119: in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/poller.py:127: in wait
    raise self.exception
src/azure-cli-core/azure/cli/core/aaz/poller.py:80: in start
    for polling_method in self.polling_generator:
                          ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/express_route/create.py:191: in execute_operations
    self.pre_operations()
src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/create.py:62: in pre_operations
    converted_bandwidth = validate_bandwidth(args.bandwidth)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

bandwidth = <azure.cli.core.aaz._field_value.AAZList object at 0x7f2ff03809d0>
mbps = True

    def _validate_bandwidth(bandwidth, mbps=True):
        unit = 'mbps' if mbps else 'gbps'
        if bandwidth is None:
            return
        if len(bandwidth) == 1:
            bandwidth_comps = bandwidth[0].to_serialized_data().split(' ')
        else:
            bandwidth_comps = bandwidth.to_serialized_data()
    
>       usage_error = InvalidArgumentValueError('--bandwidth INT {Mbps,Gbps}')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
E       NameError: name 'InvalidArgumentValueError' is not defined

src/azure-cli/azure/cli/command_modules/network/operations/latest/network/express_route/_create.py:21: NameError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3764
Failed test_network_express_route_ipv6_peering2 The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3786
Failed test_network_express_route_global_reach The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3802
Failed test_network_express_route_global_reach_config The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3846
Failed test_network_express_route_peer_connection The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:3825
Failed test_network_lb_probes The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:4495
Failed test_network_vnet_peering_sync The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:5557
️✔️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
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants