Skip to content

[Backup] az backup restore files mount-rp: fetch ILR mount scripts via dedicated list action - #34073

Open
Himanshu Agarwal (hiaga) wants to merge 2 commits into
Azure:devfrom
hiaga:users/hiaga/ilr-mountscript-listapi
Open

Himanshu Agarwal (hiaga) wants to merge 2 commits into
Azure:devfrom
hiaga:users/hiaga/ilr-mountscript-listapi

Conversation

@hiaga

@hiaga Himanshu Agarwal (hiaga) commented Sep 14, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests
️✔️ None ❌ 128/130
❌AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
❌backup
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_afs_backup_protection_undelete self = <azure.cli.testsdk.base.ExecutionResult object at 0x7ffb05783c20>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7ffb0a2d1670>
command = 'backup container list --backup-management-type AzureIaasVM -v clitest-vault000002 -g AzureBackupRG_clitest_000001 --query [].properties.friendlyName'
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 = ModuleNotFoundError("No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'")
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:
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/decorators.py:40: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:53: in preparer_wrapper
    self.remove_resource_with_record_override(resource_name, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:94: in remove_resource_with_record_override
    self.remove_resource(name, **kwargs)
src/azure-cli/azure/cli/command_modules/backup/tests/latest/preparers.py:146: in remove_resource
    self.cleanup(name, self.resource_group)
src/azure-cli/azure/cli/command_modules/backup/tests/latest/preparers.py:168: in cleanup
    containers = execute(self.cli_ctx, 'az backup container list --backup-management-type AzureIaasVM -v {} -g {} --query [].properties.friendlyName'
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:567: in execute
    self.commands_loader.load_arguments(command)
src/azure-cli-core/azure/cli/core/init.py:657: in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:320: in load_arguments
    super().load_arguments()
env/lib/python3.12/site-packages/knack/commands.py:104: in load_arguments
    cmd_args = self.arguments_loader()
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:124: in arguments_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)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/backup/custom_base.py:7: in 
    from azure.cli.command_modules.backup import custom_afs
 
 
 
 
 
 
 
 
 
 
                             _ 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    from datetime import datetime, timedelta, timezone
    import azure.cli.command_modules.backup.custom_help as helper
    import azure.cli.command_modules.backup.custom as custom_module
    # pylint: disable=too-many-locals
    # pylint: disable=import-error
    # pylint: disable=unused-argument
    
    import azure.cli.command_modules.backup.custom_common as common
    
    from azure.mgmt.recoveryservicesbackup.models import ProtectedItemResource, <br>        RestoreRequestResource, BackupRequestResource, RestoreFileSpecs, <br>        AzureFileShareBackupRequest, AzureFileshareProtectedItem, AzureFileShareRestoreRequest, <br>        TargetAFSRestoreInfo, ProtectionState, ProtectionContainerResource, AzureStorageContainer
    
    from azure.cli.core.util import CLIError
    from azure.cli.command_modules.backup._client_factory import protection_containers_cf, protectable_containers_cf, <br>        protection_policies_cf, backup_protection_containers_cf, backup_protectable_items_cf, <br>        resources_cf, backup_protected_items_cf, protected_items_cf, <br>        recovery_points_crr_cf, recovery_points_passive_cf, aad_properties_cf, cross_region_restore_cf, vaults_cf, <br>        file_shares_cf
    from azure.cli.core.azclierror import ArgumentUsageError, ValidationError, InvalidArgumentValueError
    from azure.core.exceptions import ResourceNotFoundError
    
>   from azure.mgmt.recoveryservicesbackup.passivestamp.models import CrossRegionRestoreRequest
E   ModuleNotFoundError: No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'

src/azure-cli/azure/cli/command_modules/backup/custom_afs.py:28: ModuleNotFoundError
azure/cli/command_modules/backup/tests/latest/test_afs_commands.py:68
Failed test_afs_cross_region_restore self = <azure.cli.testsdk.base.ExecutionResult object at 0x7ffb06a619a0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7ffb0a0bdeb0>
command = 'backup item list --subscription 00000000-0000-0000-0000-000000000000 -g afsbvtlonghaulrgne -v afsbvtcrrlonghaulvaultne --backup-management-type AzureStorage --workload-type AzureFileShare --use-secondary-region'
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 = ModuleNotFoundError("No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'")
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_afs_commands.BackupTests testMethod=test_afs_cross_region_restore>

    @AllowLargeResponse()
    @record_only()
    def test_afs_cross_region_restore(self):
        self.kwargs.update({
            'sub': ('14d16a2a-56f6-4c75-b091-084df9640297'
                    if self.is_live else self.get_subscription_id()),
            'rg': 'afsbvtlonghaulrgne',
            'vault': 'afsbvtcrrlonghaulvaultne',
            'container': 'StorageContainer;Storage;afsbvtlonghaulrgne;afsbvtlonghaulcrrsane',
            'item': 'AzureFileShare;DCAEC29D689395B269170A2156B6771285091236BA6D65E2A8FAD70B90587754',
            'friendly_item': 'afs1hrtestfs',
            'target_sa': 'afsbvttargetsacrrne',
            'target_share': 'afsfilesharetarget1hr'
        })
    
>       self.cmd(
            'backup item list --subscription {sub} -g {rg} -v {vault} '
            '--backup-management-type AzureStorage --workload-type AzureFileShare '
            '--use-secondary-region',
            checks=[
                self.check("length([?name == '{item}'])", 1),
                self.check(
                    "[?name == '{item}'] 
 [0].properties.friendlyName",
                    '{friendly_item}'
                )
            ]
        )

src/azure-cli/azure/cli/command_modules/backup/tests/latest/test_afs_commands.py:295: 
                                        
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:567: in execute
    self.commands_loader.load_arguments(command)
src/azure-cli-core/azure/cli/core/init.py:657: in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:320: in load_arguments
    super().load_arguments()
env/lib/python3.12/site-packages/knack/commands.py:104: in load_arguments
    cmd_args = self.arguments_loader()
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:124: in arguments_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
    ???
src/azure-cli/azure/cli/command_modules/backup/custom_base.py:7: in 
    from azure.cli.command_modules.backup import custom_afs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    from datetime import datetime, timedelta, timezone
    import azure.cli.command_modules.backup.custom_help as helper
    import azure.cli.command_modules.backup.custom as custom_module
    # pylint: disable=too-many-locals
    # pylint: disable=import-error
    # pylint: disable=unused-argument
    
    import azure.cli.command_modules.backup.custom_common as common
    
    from azure.mgmt.recoveryservicesbackup.models import ProtectedItemResource, <br>        RestoreRequestResource, BackupRequestResource, RestoreFileSpecs, <br>        AzureFileShareBackupRequest, AzureFileshareProtectedItem, AzureFileShareRestoreRequest, <br>        TargetAFSRestoreInfo, ProtectionState, ProtectionContainerResource, AzureStorageContainer
    
    from azure.cli.core.util import CLIError
    from azure.cli.command_modules.backup._client_factory import protection_containers_cf, protectable_containers_cf, <br>        protection_policies_cf, backup_protection_containers_cf, backup_protectable_items_cf, <br>        resources_cf, backup_protected_items_cf, protected_items_cf, <br>        recovery_points_crr_cf, recovery_points_passive_cf, aad_properties_cf, cross_region_restore_cf, vaults_cf, <br>        file_shares_cf
    from azure.cli.core.azclierror import ArgumentUsageError, ValidationError, InvalidArgumentValueError
    from azure.core.exceptions import ResourceNotFoundError
    
>   from azure.mgmt.recoveryservicesbackup.passivestamp.models import CrossRegionRestoreRequest
E   ModuleNotFoundError: No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'

src/azure-cli/azure/cli/command_modules/backup/custom_afs.py:28: ModuleNotFoundError
Failed test_backup_wl_ase_container_policy_operations self = <azure.cli.testsdk.base.ExecutionResult object at 0x7ffb0ad9e720>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7ffb0abbff80>
command = 'backup container show -n VMAppContainer;Compute;ase-rg-ccy;ase-ccy-vm5 -v ase-rsv-grs -g ase-rg-ccy --backup-management-type AzureWorkload'
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 = ModuleNotFoundError("No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'")
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_ase_commands.ASEBackupTests testMethod=test_backup_wl_ase_container_policy_operations>

    def test_backup_wl_ase_container_policy_operations(self):
        self.kwargs.update({
            'vault': vault_ase_restore,
            'vm_full_name': res_vm_name_ase,
            'vm_friendly_name': res_vm_friendly_name,
            'rg': rg_ase,
            'backup_item_friendly_name': item_friendly_name,
            'backup_item_protection_state': 'Protected',
            'backup_policy': policy_operations_bkp_policy,
            'policy_new': self.create_random_name('clitest-policy', 24),
            'reg_vm_id': reg_vm_id,
        })
    
        # az backup container show -n VMAppContainer;Compute;ase-rg-ccy;ase-ccy-vm5 -v ase-rsv-grs -g ase-rg-ccy --backup-management-type AzureWorkload
>       self.kwargs['container'] = self.cmd('backup container show -n {vm_full_name} -v {vault} -g {rg} --backup-management-type AzureWorkload', checks = [
            self.check('name', '{vm_full_name}'),
            self.check('properties.friendlyName', '{vm_friendly_name}')
        ]).get_output_in_json()

src/azure-cli/azure/cli/command_modules/backup/tests/latest/test_ase_commands.py:53: 
 
                                       
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:567: in execute
    self.commands_loader.load_arguments(command)
src/azure-cli-core/azure/cli/core/init.py:657: in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:320: in load_arguments
    super().load_arguments()
env/lib/python3.12/site-packages/knack/commands.py:104: in load_arguments
    cmd_args = self.arguments_loader()
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:366: in arguments_loader
    cmd_args = self.load_getter_op_arguments(self.op_path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:70: in load_getter_op_arguments
    op = self.get_op_handler(getter_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
    ???
src/azure-cli/azure/cli/command_modules/backup/custom_base.py:7: in 
    from azure.cli.command_modules.backup import custom_afs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    from datetime import datetime, timedelta, timezone
    import azure.cli.command_modules.backup.custom_help as helper
    import azure.cli.command_modules.backup.custom as custom_module
    # pylint: disable=too-many-locals
    # pylint: disable=import-error
    # pylint: disable=unused-argument
    
    import azure.cli.command_modules.backup.custom_common as common
    
    from azure.mgmt.recoveryservicesbackup.models import ProtectedItemResource, <br>        RestoreRequestResource, BackupRequestResource, RestoreFileSpecs, <br>        AzureFileShareBackupRequest, AzureFileshareProtectedItem, AzureFileShareRestoreRequest, <br>        TargetAFSRestoreInfo, ProtectionState, ProtectionContainerResource, AzureStorageContainer
    
    from azure.cli.core.util import CLIError
    from azure.cli.command_modules.backup._client_factory import protection_containers_cf, protectable_containers_cf, <br>        protection_policies_cf, backup_protection_containers_cf, backup_protectable_items_cf, <br>        resources_cf, backup_protected_items_cf, protected_items_cf, <br>        recovery_points_crr_cf, recovery_points_passive_cf, aad_properties_cf, cross_region_restore_cf, vaults_cf, <br>        file_shares_cf
    from azure.cli.core.azclierror import ArgumentUsageError, ValidationError, InvalidArgumentValueError
    from azure.core.exceptions import ResourceNotFoundError
    
>   from azure.mgmt.recoveryservicesbackup.passivestamp.models import CrossRegionRestoreRequest
E   ModuleNotFoundError: No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'

src/azure-cli/azure/cli/command_modules/backup/custom_afs.py:28: ModuleNotFoundError
azure/cli/command_modules/backup/tests/latest/test_ase_commands.py:38
Failed test_bkp_res_ase The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_ase_commands.py:92
Failed test_backup_CrossZonalRestore The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1011
Failed test_backup_container The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:230
Failed test_backup_disk_exclusion The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1281
Failed test_backup_encryption The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1530
Failed test_backup_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1419
Failed test_backup_item The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:380
Failed test_backup_job The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1197
Failed test_backup_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:265
Failed test_backup_protection The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:496
Failed test_backup_restore The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:898
Failed test_backup_restore_when_storage_in_different_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1052
Failed test_backup_rg_mapping The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1688
Failed test_backup_rp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:471
Failed test_backup_scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:48
Failed test_backup_softdelete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1237
Failed test_backup_vault The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:95
Failed test_vault_soft_delete_with_items The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1823
Failed test_backup_wl_hana_snapshot The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_hana_commands.py:101
Failed test_backup_wl_reconfigure The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:790
Failed test_backup_wl_sql_archive The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:726
Failed test_backup_wl_sql_container The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:88
Failed test_backup_wl_sql_crr The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:664
Failed test_backup_wl_sql_item The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:330
Failed test_backup_wl_sql_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:139
Failed test_backup_wl_sql_protectable_item The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:202
Failed test_backup_wl_sql_protection The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:421
Failed test_backup_wl_sql_restore The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:494
Failed test_backup_wl_sql_restore_as_files The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:588
Failed test_backup_wl_sql_rp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:246
❌3.14
Type Test Case Error Message Line
Failed test_afs_backup_protection_undelete self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f893120c180>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f893627f9d0>
command = 'backup container list --backup-management-type AzureIaasVM -v clitest-vault000002 -g AzureBackupRG_clitest_000001 --query [].properties.friendlyName'
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.14/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 = ModuleNotFoundError("No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'")
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:
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/decorators.py:40: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:53: in preparer_wrapper
    self.remove_resource_with_record_override(resource_name, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:94: in remove_resource_with_record_override
    self.remove_resource(name, **kwargs)
src/azure-cli/azure/cli/command_modules/backup/tests/latest/preparers.py:146: in remove_resource
    self.cleanup(name, self.resource_group)
src/azure-cli/azure/cli/command_modules/backup/tests/latest/preparers.py:168: in cleanup
    containers = execute(self.cli_ctx, 'az backup container list --backup-management-type AzureIaasVM -v {} -g {} --query [].properties.friendlyName'
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.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:567: in execute
    self.commands_loader.load_arguments(command)
src/azure-cli-core/azure/cli/core/init.py:657: in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:320: in load_arguments
    super().load_arguments()
env/lib/python3.14/site-packages/knack/commands.py:104: in load_arguments
    cmd_args = self.arguments_loader()
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:124: in arguments_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.14.2/x64/lib/python3.14/importlib/init.py:88: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/backup/custom_base.py:7: in 
    from azure.cli.command_modules.backup import custom_afs
 
 
 
 
 
 
 
 
 
 
                             _ 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    from datetime import datetime, timedelta, timezone
    import azure.cli.command_modules.backup.custom_help as helper
    import azure.cli.command_modules.backup.custom as custom_module
    # pylint: disable=too-many-locals
    # pylint: disable=import-error
    # pylint: disable=unused-argument
    
    import azure.cli.command_modules.backup.custom_common as common
    
    from azure.mgmt.recoveryservicesbackup.models import ProtectedItemResource, <br>        RestoreRequestResource, BackupRequestResource, RestoreFileSpecs, <br>        AzureFileShareBackupRequest, AzureFileshareProtectedItem, AzureFileShareRestoreRequest, <br>        TargetAFSRestoreInfo, ProtectionState, ProtectionContainerResource, AzureStorageContainer
    
    from azure.cli.core.util import CLIError
    from azure.cli.command_modules.backup._client_factory import protection_containers_cf, protectable_containers_cf, <br>        protection_policies_cf, backup_protection_containers_cf, backup_protectable_items_cf, <br>        resources_cf, backup_protected_items_cf, protected_items_cf, <br>        recovery_points_crr_cf, recovery_points_passive_cf, aad_properties_cf, cross_region_restore_cf, vaults_cf, <br>        file_shares_cf
    from azure.cli.core.azclierror import ArgumentUsageError, ValidationError, InvalidArgumentValueError
    from azure.core.exceptions import ResourceNotFoundError
    
>   from azure.mgmt.recoveryservicesbackup.passivestamp.models import CrossRegionRestoreRequest
E   ModuleNotFoundError: No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'

src/azure-cli/azure/cli/command_modules/backup/custom_afs.py:28: ModuleNotFoundError
azure/cli/command_modules/backup/tests/latest/test_afs_commands.py:68
Failed test_afs_cross_region_restore self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f8932eccad0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f8935b051d0>
command = 'backup item list --subscription 00000000-0000-0000-0000-000000000000 -g afsbvtlonghaulrgne -v afsbvtcrrlonghaulvaultne --backup-management-type AzureStorage --workload-type AzureFileShare --use-secondary-region'
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.14/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 = ModuleNotFoundError("No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'")
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_afs_commands.BackupTests testMethod=test_afs_cross_region_restore>

    @AllowLargeResponse()
    @record_only()
    def test_afs_cross_region_restore(self):
        self.kwargs.update({
            'sub': ('14d16a2a-56f6-4c75-b091-084df9640297'
                    if self.is_live else self.get_subscription_id()),
            'rg': 'afsbvtlonghaulrgne',
            'vault': 'afsbvtcrrlonghaulvaultne',
            'container': 'StorageContainer;Storage;afsbvtlonghaulrgne;afsbvtlonghaulcrrsane',
            'item': 'AzureFileShare;DCAEC29D689395B269170A2156B6771285091236BA6D65E2A8FAD70B90587754',
            'friendly_item': 'afs1hrtestfs',
            'target_sa': 'afsbvttargetsacrrne',
            'target_share': 'afsfilesharetarget1hr'
        })
    
>       self.cmd(
            'backup item list --subscription {sub} -g {rg} -v {vault} '
            '--backup-management-type AzureStorage --workload-type AzureFileShare '
            '--use-secondary-region',
            checks=[
                self.check("length([?name == '{item}'])", 1),
                self.check(
                    "[?name == '{item}'] 
 [0].properties.friendlyName",
                    '{friendly_item}'
                )
            ]
        )

src/azure-cli/azure/cli/command_modules/backup/tests/latest/test_afs_commands.py:295: 
                                        
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.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:567: in execute
    self.commands_loader.load_arguments(command)
src/azure-cli-core/azure/cli/core/init.py:657: in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:320: in load_arguments
    super().load_arguments()
env/lib/python3.14/site-packages/knack/commands.py:104: in load_arguments
    cmd_args = self.arguments_loader()
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:124: in arguments_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.14.2/x64/lib/python3.14/importlib/init.py:88: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1398: in gcd_import
    ???
<frozen importlib.bootstrap>:1371: in find_and_load
    ???
<frozen importlib.bootstrap>:1342: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:938: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:759: in exec_module
    ???
<frozen importlib.bootstrap>:491: in call_with_frames_removed
    ???
src/azure-cli/azure/cli/command_modules/backup/custom_base.py:7: in 
    from azure.cli.command_modules.backup import custom_afs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    from datetime import datetime, timedelta, timezone
    import azure.cli.command_modules.backup.custom_help as helper
    import azure.cli.command_modules.backup.custom as custom_module
    # pylint: disable=too-many-locals
    # pylint: disable=import-error
    # pylint: disable=unused-argument
    
    import azure.cli.command_modules.backup.custom_common as common
    
    from azure.mgmt.recoveryservicesbackup.models import ProtectedItemResource, <br>        RestoreRequestResource, BackupRequestResource, RestoreFileSpecs, <br>        AzureFileShareBackupRequest, AzureFileshareProtectedItem, AzureFileShareRestoreRequest, <br>        TargetAFSRestoreInfo, ProtectionState, ProtectionContainerResource, AzureStorageContainer
    
    from azure.cli.core.util import CLIError
    from azure.cli.command_modules.backup._client_factory import protection_containers_cf, protectable_containers_cf, <br>        protection_policies_cf, backup_protection_containers_cf, backup_protectable_items_cf, <br>        resources_cf, backup_protected_items_cf, protected_items_cf, <br>        recovery_points_crr_cf, recovery_points_passive_cf, aad_properties_cf, cross_region_restore_cf, vaults_cf, <br>        file_shares_cf
    from azure.cli.core.azclierror import ArgumentUsageError, ValidationError, InvalidArgumentValueError
    from azure.core.exceptions import ResourceNotFoundError
    
>   from azure.mgmt.recoveryservicesbackup.passivestamp.models import CrossRegionRestoreRequest
E   ModuleNotFoundError: No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'

src/azure-cli/azure/cli/command_modules/backup/custom_afs.py:28: ModuleNotFoundError
Failed test_backup_wl_ase_container_policy_operations self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f8932ecc980>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f8935bbc050>
command = 'backup container show -n VMAppContainer;Compute;ase-rg-ccy;ase-ccy-vm5 -v ase-rsv-grs -g ase-rg-ccy --backup-management-type AzureWorkload'
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.14/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 = ModuleNotFoundError("No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'")
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_ase_commands.ASEBackupTests testMethod=test_backup_wl_ase_container_policy_operations>

    def test_backup_wl_ase_container_policy_operations(self):
        self.kwargs.update({
            'vault': vault_ase_restore,
            'vm_full_name': res_vm_name_ase,
            'vm_friendly_name': res_vm_friendly_name,
            'rg': rg_ase,
            'backup_item_friendly_name': item_friendly_name,
            'backup_item_protection_state': 'Protected',
            'backup_policy': policy_operations_bkp_policy,
            'policy_new': self.create_random_name('clitest-policy', 24),
            'reg_vm_id': reg_vm_id,
        })
    
        # az backup container show -n VMAppContainer;Compute;ase-rg-ccy;ase-ccy-vm5 -v ase-rsv-grs -g ase-rg-ccy --backup-management-type AzureWorkload
>       self.kwargs['container'] = self.cmd('backup container show -n {vm_full_name} -v {vault} -g {rg} --backup-management-type AzureWorkload', checks = [
            self.check('name', '{vm_full_name}'),
            self.check('properties.friendlyName', '{vm_friendly_name}')
        ]).get_output_in_json()

src/azure-cli/azure/cli/command_modules/backup/tests/latest/test_ase_commands.py:53: 
 
                                       
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.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:567: in execute
    self.commands_loader.load_arguments(command)
src/azure-cli-core/azure/cli/core/init.py:657: in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:320: in load_arguments
    super().load_arguments()
env/lib/python3.14/site-packages/knack/commands.py:104: in load_arguments
    cmd_args = self.arguments_loader()
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:366: in arguments_loader
    cmd_args = self.load_getter_op_arguments(self.op_path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:70: in load_getter_op_arguments
    op = self.get_op_handler(getter_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.14.2/x64/lib/python3.14/importlib/init.py:88: in import_module
    return bootstrap.gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib.bootstrap>:1398: in gcd_import
    ???
<frozen importlib.bootstrap>:1371: in find_and_load
    ???
<frozen importlib.bootstrap>:1342: in find_and_load_unlocked
    ???
<frozen importlib.bootstrap>:938: in load_unlocked
    ???
<frozen importlib.bootstrap_external>:759: in exec_module
    ???
<frozen importlib.bootstrap>:491: in call_with_frames_removed
    ???
src/azure-cli/azure/cli/command_modules/backup/custom_base.py:7: in 
    from azure.cli.command_modules.backup import custom_afs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         _ 

    # --------------------------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for license information.
    # --------------------------------------------------------------------------------------------
    from datetime import datetime, timedelta, timezone
    import azure.cli.command_modules.backup.custom_help as helper
    import azure.cli.command_modules.backup.custom as custom_module
    # pylint: disable=too-many-locals
    # pylint: disable=import-error
    # pylint: disable=unused-argument
    
    import azure.cli.command_modules.backup.custom_common as common
    
    from azure.mgmt.recoveryservicesbackup.models import ProtectedItemResource, <br>        RestoreRequestResource, BackupRequestResource, RestoreFileSpecs, <br>        AzureFileShareBackupRequest, AzureFileshareProtectedItem, AzureFileShareRestoreRequest, <br>        TargetAFSRestoreInfo, ProtectionState, ProtectionContainerResource, AzureStorageContainer
    
    from azure.cli.core.util import CLIError
    from azure.cli.command_modules.backup._client_factory import protection_containers_cf, protectable_containers_cf, <br>        protection_policies_cf, backup_protection_containers_cf, backup_protectable_items_cf, <br>        resources_cf, backup_protected_items_cf, protected_items_cf, <br>        recovery_points_crr_cf, recovery_points_passive_cf, aad_properties_cf, cross_region_restore_cf, vaults_cf, <br>        file_shares_cf
    from azure.cli.core.azclierror import ArgumentUsageError, ValidationError, InvalidArgumentValueError
    from azure.core.exceptions import ResourceNotFoundError
    
>   from azure.mgmt.recoveryservicesbackup.passivestamp.models import CrossRegionRestoreRequest
E   ModuleNotFoundError: No module named 'azure.mgmt.recoveryservicesbackup.passivestamp'

src/azure-cli/azure/cli/command_modules/backup/custom_afs.py:28: ModuleNotFoundError
azure/cli/command_modules/backup/tests/latest/test_ase_commands.py:38
Failed test_bkp_res_ase The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_ase_commands.py:92
Failed test_backup_CrossZonalRestore The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1011
Failed test_backup_container The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:230
Failed test_backup_disk_exclusion The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1281
Failed test_backup_encryption The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1530
Failed test_backup_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1419
Failed test_backup_item The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:380
Failed test_backup_job The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1197
Failed test_backup_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:265
Failed test_backup_protection The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:496
Failed test_backup_restore The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:898
Failed test_backup_restore_when_storage_in_different_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1052
Failed test_backup_rg_mapping The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1688
Failed test_backup_rp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:471
Failed test_backup_scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:48
Failed test_backup_softdelete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1237
Failed test_backup_vault The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:95
Failed test_vault_soft_delete_with_items The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1823
Failed test_backup_wl_hana_snapshot The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_hana_commands.py:101
Failed test_backup_wl_reconfigure The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:790
Failed test_backup_wl_sql_archive The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:726
Failed test_backup_wl_sql_container The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:88
Failed test_backup_wl_sql_crr The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:664
Failed test_backup_wl_sql_item The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:330
Failed test_backup_wl_sql_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:139
Failed test_backup_wl_sql_protectable_item The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:202
Failed test_backup_wl_sql_protection The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:421
Failed test_backup_wl_sql_restore The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:494
Failed test_backup_wl_sql_restore_as_files The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:588
Failed test_backup_wl_sql_rp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_sql_commands.py:246
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.14
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
️✔️network
️✔️latest
️✔️3.12
️✔️3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
️✔️storage
️✔️latest
️✔️3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

Related command

az backup restore files mount-rp

Description

Retrieve Instant Item Recovery (ILR) mount scripts through the dedicated ListInstantItemRecoveryOperationResult action instead of reading them from the provision operation-status response. This aligns the CLI with the service change that redacts iSCSI CHAP connection details from the broad ILR operation-status payload, so the mount credentials are only returned by the dedicated action.

This bumps azure-mgmt-recoveryservicesbackup from ~=9.2.0 to ~=11.1.0. That SDK unifies the previously split activestamp/passivestamp client namespaces into a single azure.mgmt.recoveryservicesbackup client and switches enum members to upper-case, so the backup module imports and enum references were migrated accordingly. Cross Region Restore models that are not present in the new package are guarded so the module continues to import.

Note: the new list_instant_item_recovery_operation_result operation takes resource_group_name before vault_name (new ARM ordering), whereas the existing provision/revoke operations keep vault_name first. The call uses keyword arguments to make this explicit, and a unit test binds the call against the installed SDK signature to guard against future parameter reordering.

Testing

Added unit tests covering the provision -> list flow, the active-session renewal path, and a signature-binding guard against the installed SDK.

History Notes

[Backup] az backup restore files mount-rp: Fetch ILR mount scripts through the dedicated list action for CHAP credential redaction.

…a dedicated list action

Retrieve Instant Item Recovery (ILR) mount scripts through the dedicated
ListInstantItemRecoveryOperationResult action instead of reading them from the
provision operation-status response, so iSCSI CHAP connection details are no
longer exposed in the broad ILR status payload.

Bump the azure-mgmt-recoveryservicesbackup dependency from ~=9.2.0 to ~=11.1.0
and migrate the backup module to the unified client namespace (the
activestamp/passivestamp split was removed) and the uppercase enum members.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6d420238-f921-4e0f-ac6d-9acd4ed164b8
Copilot AI lite review requested due to automatic review settings September 14, 2026 03:08
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@yonzhan

Copy link
Copy Markdown
Collaborator

Backup

setup.py now requires ~=11.1.0 for the ILR list-action flow, but the frozen
requirements.py3.*.txt files still pinned ==9.2.0, causing ResolutionImpossible
in azdev CI. Align all three platform requirement files with setup.py.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6d420238-f921-4e0f-ac6d-9acd4ed164b8

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Packaged CLI requirement files still pin SDK 9.2.0 and must be updated to 11.1.0.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates az backup restore files mount-rp to retrieve ILR mount scripts through the dedicated action and migrates Azure Backup to SDK 11.1.0.

Changes:

  • Migrates Backup SDK clients, imports, models, and enums.
  • Adds dedicated ILR script retrieval and renewal-flow tests.
  • Updates dependency metadata and release history.
File summaries
File Summary
src/azure-cli/setup.py Updates the SDK dependency; platform requirement files still pin 9.2.0 (critical finding, 3 votes).
src/azure-cli/HISTORY.rst Documents the ILR change.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/test_backup_commands.py Adds ILR flow and SDK signature tests.
src/azure-cli/azure/cli/command_modules/backup/custom.py Retrieves scripts through the dedicated list action.
src/azure-cli/azure/cli/command_modules/backup/custom_wl.py Migrates workload backup SDK usage.
src/azure-cli/azure/cli/command_modules/backup/custom_help.py Updates ILR status and operation handling.
src/azure-cli/azure/cli/command_modules/backup/custom_common.py Migrates shared SDK usage.
src/azure-cli/azure/cli/command_modules/backup/custom_base.py Migrates client and enum references.
src/azure-cli/azure/cli/command_modules/backup/custom_afs.py Migrates Azure Files SDK usage.
src/azure-cli/azure/cli/command_modules/backup/_validators.py Migrates storage enum usage.
src/azure-cli/azure/cli/command_modules/backup/_client_factory.py Uses the unified Backup SDK client.
Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/azure-cli/setup.py
'azure-mgmt-rdbms==10.2.0b17',
'azure-mgmt-mysqlflexibleservers==1.1.0b3',
'azure-mgmt-recoveryservicesbackup~=9.2.0',
'azure-mgmt-recoveryservicesbackup~=11.1.0',
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

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.

5 participants