Skip to content

{Network} az network route-table route: Add support for VirtualApplianceEcmp next hop type - #33493

Draft
Jian Hui (huiii99) wants to merge 1 commit into
Azure:devfrom
huiii99:feat/network-route-table-route-support-ecmp
Draft

{Network} az network route-table route: Add support for VirtualApplianceEcmp next hop type#33493
Jian Hui (huiii99) wants to merge 1 commit into
Azure:devfrom
huiii99:feat/network-route-table-route-support-ecmp

feat: upgrade network route-table route api version to 2025-07-01

a5e1868
Select commit
Loading
Failed to load commit list.
Azure Pipelines / Azure.azure-cli Full Test failed Jun 4, 2026 in 27m 52s

Build #20260604.7 had test failures

Details

Tests

  • Failed: 4 (0.04%)
  • Passed: 9,414 (85.35%)
  • Other: 1,612 (14.61%)
  • Total: 11,030

Annotations

Check failure on line 1342 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

Build log #L1342

Bash exited with code '1'.

Check failure on line 1342 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

Build log #L1342

Bash exited with code '1'.

Check failure on line 1 in test_network_route_table_ecmp_route

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

test_network_route_table_ecmp_route

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fe3574e1940>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fe35b8c6350>
command = 'network route-table route create --address-prefix 10.1.0.0/16 -n ecmp-route -g cli_test_route_table_ecmp000001 --next-hop-type VirtualApplianceEcmp --route-table-name cli-test-rt-ecmp --next-hop next-hop-ip-addresses="[10.0.0.1,10.0.0.2]"'
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ex = HttpResponseError('(RegionNotEnabledForFeature) Region eastus2 is not enabled for EcmpNextHop feature.\nCode: RegionNotEnabledForFeature\nMessage: Region eastus2 is not enabled for EcmpNextHop feature.')
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 HttpResponseError 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.NetworkRouteTableOperationScenarioTest testMethod=test_network_route_table_ecmp_route>
resource_group = 'cli_test_route_table_ecmp000001'

    @ResourceGroupPreparer(name_prefix='cli_test_route_table_ecmp', location='eastus2')
    def test_network_route_table_ecmp_route(self, resource_group):
        self.kwargs.update({
            'table': 'cli-test-rt-ecmp',
            'route': 'ecmp-route',
            'ip1': '10.0.0.1',
            'ip2': '10.0.0.2',
            'ip3': '10.0.0.3',
            'prefix': '10.1.0.0/16'
        })
    
        # create route table
        self.cmd('network route-table create -n {table} -g {rg}')
    
        # create route with VirtualApplianceEcmp next hop type and ECMP IP addresses
>       self.cmd('network route-table route create --address-prefix {prefix} -n {route} -g {rg} '
                 '--next-hop-type VirtualApplianceEcmp --route-table-name {table} '
                 '--next-hop next-hop-ip-addresses="[{ip1},{ip2}]"',
                 checks=[
                     self.check('nextHopType', 'VirtualApplianceEcmp'),
                     self.check('nextHop.nextHopIpAddresses[0]', '{ip1}'),
                     self.check('nextHop.nextHopIpAddresses[1]', '{ip2}'),
                     self.check('length(nextHop.nextHopIpAddresses)', 2)
                 ])

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:5489: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Raw output
self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fe3574e1940>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fe35b8c6350>
command = 'network route-table route create --address-prefix 10.1.0.0/16 -n ecmp-route -g cli_test_route_table_ecmp000001 --next-hop-type VirtualApplianceEcmp --route-table-name cli-test-rt-ecmp --next-hop next-hop-ip-addresses="[10.0.0.1,10.0.0.2]"'
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ex = HttpResponseError('(RegionNotEnabledForFeature) Region eastus2 is not enabled for EcmpNextHop feature.\nCode: RegionNotEnabledForFeature\nMessage: Region eastus2 is not enabled for EcmpNextHop feature.')
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 HttpResponseError 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.NetworkRouteTableOperationScenarioTest testMethod=test_network_route_table_ecmp_route>
resource_group = 'cli_test_route_table_ecmp000001'

    @ResourceGroupPreparer(name_prefix='cli_test_route_table_ecmp', location='eastus2')
    def test_network_route_table_ecmp_route(self, resource_group):
        self.kwargs.update({
            'table': 'cli-test-rt-ecmp',
            'route': 'ecmp-route',
            'ip1': '10.0.0.1',
            'ip2': '10.0.0.2',
            'ip3': '10.0.0.3',
            'prefix': '10.1.0.0/16'
        })
    
        # create route table
        self.cmd('network route-table create -n {table} -g {rg}')
    
        # create route with VirtualApplianceEcmp next hop type and ECMP IP addresses
>       self.cmd('network route-table route create --address-prefix {prefix} -n {route} -g {rg} '
                 '--next-hop-type VirtualApplianceEcmp --route-table-name {table} '
                 '--next-hop next-hop-ip-addresses="[{ip1},{ip2}]"',
                 checks=[
                     self.check('nextHopType', 'VirtualApplianceEcmp'),
                     self.check('nextHop.nextHopIpAddresses[0]', '{ip1}'),
                     self.check('nextHop.nextHopIpAddresses[1]', '{ip2}'),
                     self.check('length(nextHop.nextHopIpAddre
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_network_route_table_operation

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

test_network_route_table_operation

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fe3561f4180>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fe35b8c6c10>
command = 'network route-table route create --address-prefix 10.0.5.0/24 -n my-route -g cli_test_route_table000001 --next-hop-type None --route-table-name cli-test-route-table'
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in _handle_main_exception
    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:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/__init__.py:820: in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/__init__.py:800: 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:1168: 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/route_table/route/__cmds.py:635: in _execute_operations
    yield self.RoutesCreateOrUpdate(ctx=self.ctx)()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/route_table/route/__cmds.py:655: in __call__
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/_client.py:107: in send_request
    session = self._pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/azure/core/pipeline/_base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/azure/core/pipeline/_base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/azure/core/pipeline/_base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^
Raw output
self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fe3561f4180>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fe35b8c6c10>
command = 'network route-table route create --address-prefix 10.0.5.0/24 -n my-route -g cli_test_route_table000001 --next-hop-type None --route-table-name cli-test-route-table'
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in _handle_main_exception
    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:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/__init__.py:820: in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/__init__.py:800: 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:1168: 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/route_table/route/__cmds.py:635: in _execute_operations
    yield self.RoutesCreateOrUpdate(ctx=self.ctx)()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/route_table/route/__cmds.py:655: in __call__
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/_client.py:107: in send_request
    session = self._pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/azure/core/pipeline/_base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.13/site-packages/azure/core/pipeline/_base.py:98: in send
    response = self.next.send(request)
        
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_network_route_table_operation

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

test_network_route_table_operation

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f08fc80b020>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0901f7ce30>
command = 'network route-table route create --address-prefix 10.0.5.0/24 -n my-route -g cli_test_route_table000001 --next-hop-type None --route-table-name cli-test-route-table'
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in _handle_main_exception
    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:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/__init__.py:820: in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/__init__.py:800: 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:1168: 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/route_table/route/__cmds.py:111: in _execute_operations
    yield self.RoutesCreateOrUpdate(ctx=self.ctx)()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/route_table/route/__cmds.py:131: in __call__
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/_client.py:107: in send_request
    session = self._pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^
Raw output
self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f08fc80b020>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0901f7ce30>
command = 'network route-table route create --address-prefix 10.0.5.0/24 -n my-route -g cli_test_route_table000001 --next-hop-type None --route-table-name cli-test-route-table'
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in _handle_main_exception
    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:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/__init__.py:820: in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/__init__.py:800: 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:1168: 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/route_table/route/__cmds.py:111: in _execute_operations
    yield self.RoutesCreateOrUpdate(ctx=self.ctx)()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/route_table/route/__cmds.py:131: in __call__
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/_client.py:107: in send_request
    session = self._pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:98: in send
    response = self.next.send(request)
        
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_network_route_table_ecmp_route

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

test_network_route_table_ecmp_route

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f08fd983800>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0901f619a0>
command = 'network route-table route create --address-prefix 10.1.0.0/16 -n ecmp-route -g cli_test_route_table_ecmp000001 --next-hop-type VirtualApplianceEcmp --route-table-name cli-test-rt-ecmp --next-hop next-hop-ip-addresses="[10.0.0.1,10.0.0.2]"'
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ex = HttpResponseError('(RegionNotEnabledForFeature) Region eastus2 is not enabled for EcmpNextHop feature.\nCode: RegionNotEnabledForFeature\nMessage: Region eastus2 is not enabled for EcmpNextHop feature.')
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 HttpResponseError 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.NetworkRouteTableOperationScenarioTest testMethod=test_network_route_table_ecmp_route>
resource_group = 'cli_test_route_table_ecmp000001'

    @ResourceGroupPreparer(name_prefix='cli_test_route_table_ecmp', location='eastus2')
    def test_network_route_table_ecmp_route(self, resource_group):
        self.kwargs.update({
            'table': 'cli-test-rt-ecmp',
            'route': 'ecmp-route',
            'ip1': '10.0.0.1',
            'ip2': '10.0.0.2',
            'ip3': '10.0.0.3',
            'prefix': '10.1.0.0/16'
        })
    
        # create route table
        self.cmd('network route-table create -n {table} -g {rg}')
    
        # create route with VirtualApplianceEcmp next hop type and ECMP IP addresses
>       self.cmd('network route-table route create --address-prefix {prefix} -n {route} -g {rg} '
                 '--next-hop-type VirtualApplianceEcmp --route-table-name {table} '
                 '--next-hop next-hop-ip-addresses="[{ip1},{ip2}]"',
                 checks=[
                     self.check('nextHopType', 'VirtualApplianceEcmp'),
                     self.check('nextHop.nextHopIpAddresses[0]', '{ip1}'),
                     self.check('nextHop.nextHopIpAddresses[1]', '{ip2}'),
                     self.check('length(nextHop.nextHopIpAddresses)', 2)
                 ])

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:5489: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Raw output
self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f08fd983800>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0901f619a0>
command = 'network route-table route create --address-prefix 10.1.0.0/16 -n ecmp-route -g cli_test_route_table_ecmp000001 --next-hop-type VirtualApplianceEcmp --route-table-name cli-test-rt-ecmp --next-hop next-hop-ip-addresses="[10.0.0.1,10.0.0.2]"'
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ex = HttpResponseError('(RegionNotEnabledForFeature) Region eastus2 is not enabled for EcmpNextHop feature.\nCode: RegionNotEnabledForFeature\nMessage: Region eastus2 is not enabled for EcmpNextHop feature.')
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 HttpResponseError 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.NetworkRouteTableOperationScenarioTest testMethod=test_network_route_table_ecmp_route>
resource_group = 'cli_test_route_table_ecmp000001'

    @ResourceGroupPreparer(name_prefix='cli_test_route_table_ecmp', location='eastus2')
    def test_network_route_table_ecmp_route(self, resource_group):
        self.kwargs.update({
            'table': 'cli-test-rt-ecmp',
            'route': 'ecmp-route',
            'ip1': '10.0.0.1',
            'ip2': '10.0.0.2',
            'ip3': '10.0.0.3',
            'prefix': '10.1.0.0/16'
        })
    
        # create route table
        self.cmd('network route-table create -n {table} -g {rg}')
    
        # create route with VirtualApplianceEcmp next hop type and ECMP IP addresses
>       self.cmd('network route-table route create --address-prefix {prefix} -n {route} -g {rg} '
                 '--next-hop-type VirtualApplianceEcmp --route-table-name {table} '
                 '--next-hop next-hop-ip-addresses="[{ip1},{ip2}]"',
                 checks=[
                     self.check('nextHopType', 'VirtualApplianceEcmp'),
                     self.check('nextHop.nextHopIpAddresses[0]', '{ip1}'),
                     self.check('nextHop.nextHopIpAddresses[1]', '{ip2}'),
                     self.check('length(nextHop.nextHopIpAddre
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]