diff --git a/src/index.json b/src/index.json index bbe1d7caa48..d2e6a6afccc 100644 --- a/src/index.json +++ b/src/index.json @@ -1431,7 +1431,7 @@ "summary": "Provides a preview for upcoming Azure NetApp Files (ANF) features.", "version": "0.2.0" }, - "sha256Digest": "9b3fdfc6ada7ba058585b9edeb0fb51b23e22cd73f8771f2f25d9b1fda751525" + "sha256Digest": "f0078a9f03416066abc21d6103bb9ddb9cbfb5a994054e1b2280ab89a61116a0" } ], "privatedns": [ diff --git a/src/netappfiles-preview/azext_netappfiles_preview/_exception_handler.py b/src/netappfiles-preview/azext_netappfiles_preview/_exception_handler.py index baccf050380..d955a43ba8e 100644 --- a/src/netappfiles-preview/azext_netappfiles_preview/_exception_handler.py +++ b/src/netappfiles-preview/azext_netappfiles_preview/_exception_handler.py @@ -6,6 +6,7 @@ from knack.util import CLIError from msrest.exceptions import ValidationError # pylint: disable=import-error + def netapp_exception_handler(ex): from azext_netappfiles_preview.vendored_sdks.models import ErrorException diff --git a/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_account_commands_ext.py b/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_account_commands_ext.py index 85e91c9bac9..c1ab52a9860 100644 --- a/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_account_commands_ext.py +++ b/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_account_commands_ext.py @@ -7,22 +7,24 @@ # No tidy up of tests required. The resource group is automatically removed + class AzureNetAppFilesExtAccountServiceScenarioTest(ScenarioTest): @ResourceGroupPreparer(name_prefix='cli_tests_rg_') def test_ext_create_delete_account(self): account_name = self.create_random_name(prefix='cli', length=24) tags = 'Tag1=Value1 Tag2=Value2' - active_directories = '[{"username": "aduser", "password": "aduser", "smbservername": "SMBSERVER", "dns": "1.2.3.4", "domain": "westcentralus"}]' + # active_directories = '[{"username": "aduser", "password": "aduser", "smbservername": "SMBSERVER", "dns": "1.2.3.4", "domain": "westcentralus"}]' # create and check - #account = self.cmd("az netappfiles account create --resource-group {rg} --account-name '%s' -l 'westus2' --tags '%s' --active-directories %s" % (account_name, tags, active_directories)).get_output_in_json() + # account = self.cmd("az netappfiles account create --resource-group {rg} --account-name '%s' -l 'westus2' --tags '%s' --active-directories %s" % (account_name, tags, active_directories)).get_output_in_json() + account = self.cmd("az netappfiles account create --resource-group {rg} --account-name '%s' -l 'westus2' --tags '%s'" % (account_name, tags)).get_output_in_json() assert account['name'] == account_name assert account['tags']['Tag1'] == 'Value1' assert account['tags']['Tag2'] == 'Value2' # not provided in call - interpreted as kwargs. Tested at command line instead. - #assert account['active_directories'][0]['username'] == 'aduser' - #assert account['active_directories'][0]['smbservername'] == 'SMBSERVER' + # assert account['active_directories'][0]['username'] == 'aduser' + # assert account['active_directories'][0]['smbservername'] == 'SMBSERVER' account_list = self.cmd("netappfiles account list --resource-group {rg}").get_output_in_json() assert len(account_list) > 0 @@ -36,7 +38,8 @@ def test_ext_create_delete_account(self): account = self.cmd("az netappfiles account create -g {rg} -a %s -l westus2 --tags '%s'" % (account_name, tags)).get_output_in_json() assert account['name'] == account_name # note: key case must match - assert account['activeDirectories'] == None + assert account['activeDirectories'] is None + account_list = self.cmd("netappfiles account list --resource-group {rg}").get_output_in_json() assert len(account_list) > 0 @@ -79,7 +82,7 @@ def test_ext_set_account_ext(self): account = self.cmd("az netappfiles account set --resource-group {rg} -a %s -l 'westus2' --tags %s" % (account_name, tag)).get_output_in_json() assert account['name'] == account_name assert account['tags']['Tag1'] == 'Value1' - assert account['activeDirectories'] == None + assert account['activeDirectories'] is None @ResourceGroupPreparer(name_prefix='cli_tests_rg_') def test_ext_update_account_ext(self): @@ -91,4 +94,4 @@ def test_ext_update_account_ext(self): account = self.cmd("az netappfiles account update --resource-group {rg} -a %s --tags %s -l westus2" % (account_name, tag)).get_output_in_json() assert account['name'] == account_name assert account['tags']['Tag1'] == 'Value1' - assert account['activeDirectories'] == None + assert account['activeDirectories'] is None diff --git a/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_volume_commands_ext.py b/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_volume_commands_ext.py index 8bde1c39860..59f4cc7e34f 100644 --- a/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_volume_commands_ext.py +++ b/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_volume_commands_ext.py @@ -55,7 +55,7 @@ def test_ext_create_delete_volumes(self): assert volume['tags']['Tag2'] == 'Value2' # default export policy still present assert volume['exportPolicy']['rules'][0]['allowedClients'] == '0.0.0.0/0' - assert volume['exportPolicy']['rules'][0]['cifs'] == False + assert not volume['exportPolicy']['rules'][0]['cifs'] assert volume['exportPolicy']['rules'][0]['ruleIndex'] == 1 volume_list = self.cmd("netappfiles volume list --resource-group {rg} --account-name %s --pool-name %s" % (account_name, pool_name)).get_output_in_json() @@ -113,5 +113,5 @@ def test_ext_update_volume(self): assert volume['tags']['Tag1'] == 'Value2' # default export policy still present assert volume['exportPolicy']['rules'][0]['allowedClients'] == '0.0.0.0/0' - assert volume['exportPolicy']['rules'][0]['cifs'] == False + assert not volume['exportPolicy']['rules'][0]['cifs'] assert volume['exportPolicy']['rules'][0]['ruleIndex'] == 1