From 6bae34cc745ec38ecb8eeda0f1285bcf8795766b Mon Sep 17 00:00:00 2001 From: Jennifer-John Date: Tue, 10 Oct 2023 03:29:39 +0530 Subject: [PATCH] changes --- plugins/modules/idrac_server_config_profile.py | 14 +++++++------- .../modules/test_idrac_server_config_profile.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/modules/idrac_server_config_profile.py b/plugins/modules/idrac_server_config_profile.py index a5b84987e..b6a5ddf83 100644 --- a/plugins/modules/idrac_server_config_profile.py +++ b/plugins/modules/idrac_server_config_profile.py @@ -823,14 +823,14 @@ def idrac_import_scp_share(module, idrac, job_params): def validate_input(module, scp_components): - if len(scp_components) != 1 and "ALL" in scp_components: + if len(scp_components) != 1 and "ALL" in scp_components: module.fail_json(msg=SCP_ALL_ERR_MSG) - if module.params["command"] in ["import", "preview"]: - if module.params.get("import_buffer") is not None: - if module.params.get("scp_file") is not None: - module.fail_json(msg=MUTUALLY_EXCLUSIVE.format("scp_file")) - if module.params.get("share_name") is not None: - module.fail_json(msg=MUTUALLY_EXCLUSIVE.format("share_name")) + if module.params["command"] in ["import", "preview"]: + if module.params.get("import_buffer") is not None: + if module.params.get("scp_file") is not None: + module.fail_json(msg=MUTUALLY_EXCLUSIVE.format("scp_file")) + if module.params.get("share_name") is not None: + module.fail_json(msg=MUTUALLY_EXCLUSIVE.format("share_name")) class ImportCommand(): diff --git a/tests/unit/plugins/modules/test_idrac_server_config_profile.py b/tests/unit/plugins/modules/test_idrac_server_config_profile.py index e7eba8608..0e28f9cec 100644 --- a/tests/unit/plugins/modules/test_idrac_server_config_profile.py +++ b/tests/unit/plugins/modules/test_idrac_server_config_profile.py @@ -41,7 +41,7 @@ def idrac_scp_redfish_mock(self, mocker, idrac_server_configure_profile_mock): @pytest.mark.parametrize("params", [ {"message": SUCCESS_MSG.format("export"), - "mparams": {"share_name": "\\192.168.0.1\\share", "job_wait": True, + "mparams": {"share_name": "\\192.168.0.1\\share", "job_wait": True, "scp_components": "IDRAC", "scp_file": "scp_file.xml", "proxy_port": 80, "export_format": "XML"}}, {"message": SUCCESS_MSG.format("export"),