From 6d074d8a9488dffd33719e30a631362de709e1c9 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 2 Aug 2019 09:06:18 +0200 Subject: [PATCH] Move ome_* and idrac_* modules one level up (#59698) * Move ome_* and idrac_* modules one level up. * Fix paths. * Fix package name. * Oranize in different directories. * Update BOTMETA. * Update new ignore entries. * Revert "Update BOTMETA." Revert "Oranize in different directories." Adjust ignores.txt. --- .../remote_management/dellemc/idrac/__init__.py | 0 .../dellemc/{idrac => }/idrac_firmware.py | 0 .../{idrac => }/idrac_server_config_profile.py | 0 .../remote_management/dellemc/ome/__init__.py | 0 .../dellemc/{ome => }/ome_device_info.py | 0 test/sanity/ignore.txt | 8 ++++---- .../remote_management/dellemc/ome/__init__.py | 0 .../dellemc/{ome => }/test_ome_device_info.py | 14 +++++++------- 8 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 lib/ansible/modules/remote_management/dellemc/idrac/__init__.py rename lib/ansible/modules/remote_management/dellemc/{idrac => }/idrac_firmware.py (100%) rename lib/ansible/modules/remote_management/dellemc/{idrac => }/idrac_server_config_profile.py (100%) delete mode 100644 lib/ansible/modules/remote_management/dellemc/ome/__init__.py rename lib/ansible/modules/remote_management/dellemc/{ome => }/ome_device_info.py (100%) delete mode 100644 test/units/modules/remote_management/dellemc/ome/__init__.py rename test/units/modules/remote_management/dellemc/{ome => }/test_ome_device_info.py (94%) diff --git a/lib/ansible/modules/remote_management/dellemc/idrac/__init__.py b/lib/ansible/modules/remote_management/dellemc/idrac/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/lib/ansible/modules/remote_management/dellemc/idrac/idrac_firmware.py b/lib/ansible/modules/remote_management/dellemc/idrac_firmware.py similarity index 100% rename from lib/ansible/modules/remote_management/dellemc/idrac/idrac_firmware.py rename to lib/ansible/modules/remote_management/dellemc/idrac_firmware.py diff --git a/lib/ansible/modules/remote_management/dellemc/idrac/idrac_server_config_profile.py b/lib/ansible/modules/remote_management/dellemc/idrac_server_config_profile.py similarity index 100% rename from lib/ansible/modules/remote_management/dellemc/idrac/idrac_server_config_profile.py rename to lib/ansible/modules/remote_management/dellemc/idrac_server_config_profile.py diff --git a/lib/ansible/modules/remote_management/dellemc/ome/__init__.py b/lib/ansible/modules/remote_management/dellemc/ome/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/lib/ansible/modules/remote_management/dellemc/ome/ome_device_info.py b/lib/ansible/modules/remote_management/dellemc/ome_device_info.py similarity index 100% rename from lib/ansible/modules/remote_management/dellemc/ome/ome_device_info.py rename to lib/ansible/modules/remote_management/dellemc/ome_device_info.py diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index 58dfa8fb16b..0b3110cf1cf 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -6051,8 +6051,8 @@ lib/ansible/modules/remote_management/cpm/cpm_serial_port_config.py validate-mod lib/ansible/modules/remote_management/cpm/cpm_serial_port_info.py validate-modules:E337 lib/ansible/modules/remote_management/cpm/cpm_user.py validate-modules:E337 lib/ansible/modules/remote_management/cpm/cpm_user.py validate-modules:E338 -lib/ansible/modules/remote_management/dellemc/idrac/idrac_server_config_profile.py validate-modules:E337 -lib/ansible/modules/remote_management/dellemc/idrac/idrac_server_config_profile.py validate-modules:E338 +lib/ansible/modules/remote_management/dellemc/idrac_server_config_profile.py validate-modules:E337 +lib/ansible/modules/remote_management/dellemc/idrac_server_config_profile.py validate-modules:E338 lib/ansible/modules/remote_management/foreman/_foreman.py validate-modules:E337 lib/ansible/modules/remote_management/foreman/_katello.py validate-modules:E337 lib/ansible/modules/remote_management/hpilo/hpilo_boot.py validate-modules:E326 @@ -7716,8 +7716,8 @@ test/units/modules/packaging/os/test_rhn_register.py future-import-boilerplate test/units/modules/packaging/os/test_rhn_register.py metaclass-boilerplate test/units/modules/packaging/os/test_yum.py future-import-boilerplate test/units/modules/packaging/os/test_yum.py metaclass-boilerplate -test/units/modules/remote_management/dellemc/ome/test_ome_device_info.py future-import-boilerplate -test/units/modules/remote_management/dellemc/ome/test_ome_device_info.py metaclass-boilerplate +test/units/modules/remote_management/dellemc/test_ome_device_info.py future-import-boilerplate +test/units/modules/remote_management/dellemc/test_ome_device_info.py metaclass-boilerplate test/units/modules/remote_management/lxca/test_lxca_cmms.py future-import-boilerplate test/units/modules/remote_management/lxca/test_lxca_cmms.py metaclass-boilerplate test/units/modules/remote_management/lxca/test_lxca_nodes.py future-import-boilerplate diff --git a/test/units/modules/remote_management/dellemc/ome/__init__.py b/test/units/modules/remote_management/dellemc/ome/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/test/units/modules/remote_management/dellemc/ome/test_ome_device_info.py b/test/units/modules/remote_management/dellemc/test_ome_device_info.py similarity index 94% rename from test/units/modules/remote_management/dellemc/ome/test_ome_device_info.py rename to test/units/modules/remote_management/dellemc/test_ome_device_info.py index ab435b382db..a0b470bce3b 100644 --- a/test/units/modules/remote_management/dellemc/ome/test_ome_device_info.py +++ b/test/units/modules/remote_management/dellemc/test_ome_device_info.py @@ -16,7 +16,7 @@ import pytest from units.modules.utils import set_module_args, exit_json, \ fail_json, AnsibleFailJson, AnsibleExitJson from ansible.module_utils import basic -from ansible.modules.remote_management.dellemc.ome import ome_device_info +from ansible.modules.remote_management.dellemc import ome_device_info from ansible.module_utils.six.moves.urllib.error import HTTPError default_args = {'hostname': '192.168.0.1', 'username': 'username', 'password': 'password'} @@ -34,7 +34,7 @@ class TestOmeDeviceInfo(object): @pytest.fixture def connection_mock(self, mocker): - connection_class_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome.ome_device_info.RestOME') + connection_class_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome_device_info.RestOME') return connection_class_mock.return_value @pytest.fixture @@ -44,18 +44,18 @@ class TestOmeDeviceInfo(object): @pytest.fixture def validate_inputs_mock(self, mocker): - response_class_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome.ome_device_info._validate_inputs') + response_class_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome_device_info._validate_inputs') response_class_mock.return_value = None @pytest.fixture def get_device_identifier_map_mock(self, mocker): - response_class_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome.ome_device_info._get_device_identifier_map') + response_class_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome_device_info._get_device_identifier_map') response_class_mock.return_value = resource_detailed_inventory return response_class_mock.return_value @pytest.fixture def get_resource_parameters_mock(self, mocker): - response_class_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome.ome_device_info._get_resource_parameters') + response_class_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome_device_info._get_resource_parameters') return response_class_mock def test_main_basic_inventory_success_case(self, module_mock, validate_inputs_mock, connection_mock, get_resource_parameters_mock, response_mock): @@ -103,7 +103,7 @@ class TestOmeDeviceInfo(object): def test_validate_inputs(self, fact_subset, mutually_exclusive_call, mocker): module_params = {"fact_subset": fact_subset} check_mutually_inclusive_arguments_mock = mocker.patch( - 'ansible.modules.remote_management.dellemc.ome.ome_device_info._check_mutually_inclusive_arguments') + 'ansible.modules.remote_management.dellemc.ome_device_info._check_mutually_inclusive_arguments') check_mutually_inclusive_arguments_mock.return_value = None self.module._validate_inputs(module_params) if mutually_exclusive_call: @@ -143,7 +143,7 @@ class TestOmeDeviceInfo(object): @pytest.mark.parametrize("module_params", params) def test_get_device_identifier_map(self, module_params, connection_mock, mocker): - get_device_id_from_service_tags_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome.ome_device_info._get_device_id_from_service_tags') + get_device_id_from_service_tags_mock = mocker.patch('ansible.modules.remote_management.dellemc.ome_device_info._get_device_id_from_service_tags') get_device_id_from_service_tags_mock.return_value = None res = self.module._get_device_identifier_map(module_params, connection_mock) assert isinstance(res, dict)