diff --git a/src/azure-cli/azure/cli/command_modules/netappfiles/custom.py b/src/azure-cli/azure/cli/command_modules/netappfiles/custom.py index d9f0f7323ab..19f29a6c380 100644 --- a/src/azure-cli/azure/cli/command_modules/netappfiles/custom.py +++ b/src/azure-cli/azure/cli/command_modules/netappfiles/custom.py @@ -417,7 +417,7 @@ def snapshot_restore_files(client, resource_group_name, account_name, pool_name, file_paths=file_paths, destination_path=destination_path ) - client.begin_restore_files(resource_group_name, account_name, pool_name, volume_name, snapshot_name, body) + return client.begin_restore_files(resource_group_name, account_name, pool_name, volume_name, snapshot_name, body) # ---- SNAPSHOT POLICIES ---- diff --git a/src/azure-cli/azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py b/src/azure-cli/azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py index fdbd8d15a68..b5f610a39b6 100644 --- a/src/azure-cli/azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py +++ b/src/azure-cli/azure/cli/command_modules/netappfiles/tests/latest/test_snapshot_commands.py @@ -2,6 +2,9 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- + +import unittest + from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer from azure.cli.testsdk.decorators import serial_test @@ -176,6 +179,7 @@ def test_get_snapshot(self): snapshot_from_id = self.cmd("az netappfiles snapshot show --ids %s" % snapshot['id']).get_output_in_json() assert snapshot_from_id['name'] == account_name + '/' + pool_name + '/' + volume_name + '/' + snapshot_name + @unittest.skip('This test requires southcentralusstage and cannot be run with public cloud.') @ResourceGroupPreparer(name_prefix='cli_netappfiles_test_snapshot_', additional_tags={'owner': 'cli_test'}) def test_restore_file(self): # create volume