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.
This commit is contained in:
Felix Fontein 2019-08-02 09:06:18 +02:00 committed by GitHub
parent 2be2ae366e
commit 6d074d8a94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 11 deletions

View file

@ -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_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:E337
lib/ansible/modules/remote_management/cpm/cpm_user.py validate-modules:E338 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_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:E338
lib/ansible/modules/remote_management/foreman/_foreman.py validate-modules:E337 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/foreman/_katello.py validate-modules:E337
lib/ansible/modules/remote_management/hpilo/hpilo_boot.py validate-modules:E326 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_rhn_register.py metaclass-boilerplate
test/units/modules/packaging/os/test_yum.py future-import-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/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/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 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 future-import-boilerplate
test/units/modules/remote_management/lxca/test_lxca_cmms.py metaclass-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 test/units/modules/remote_management/lxca/test_lxca_nodes.py future-import-boilerplate

View file

@ -16,7 +16,7 @@ import pytest
from units.modules.utils import set_module_args, exit_json, \ from units.modules.utils import set_module_args, exit_json, \
fail_json, AnsibleFailJson, AnsibleExitJson fail_json, AnsibleFailJson, AnsibleExitJson
from ansible.module_utils import basic 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 from ansible.module_utils.six.moves.urllib.error import HTTPError
default_args = {'hostname': '192.168.0.1', 'username': 'username', 'password': 'password'} default_args = {'hostname': '192.168.0.1', 'username': 'username', 'password': 'password'}
@ -34,7 +34,7 @@ class TestOmeDeviceInfo(object):
@pytest.fixture @pytest.fixture
def connection_mock(self, mocker): 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 return connection_class_mock.return_value
@pytest.fixture @pytest.fixture
@ -44,18 +44,18 @@ class TestOmeDeviceInfo(object):
@pytest.fixture @pytest.fixture
def validate_inputs_mock(self, mocker): 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 response_class_mock.return_value = None
@pytest.fixture @pytest.fixture
def get_device_identifier_map_mock(self, mocker): 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 response_class_mock.return_value = resource_detailed_inventory
return response_class_mock.return_value return response_class_mock.return_value
@pytest.fixture @pytest.fixture
def get_resource_parameters_mock(self, mocker): 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 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): 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): def test_validate_inputs(self, fact_subset, mutually_exclusive_call, mocker):
module_params = {"fact_subset": fact_subset} module_params = {"fact_subset": fact_subset}
check_mutually_inclusive_arguments_mock = mocker.patch( 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 check_mutually_inclusive_arguments_mock.return_value = None
self.module._validate_inputs(module_params) self.module._validate_inputs(module_params)
if mutually_exclusive_call: if mutually_exclusive_call:
@ -143,7 +143,7 @@ class TestOmeDeviceInfo(object):
@pytest.mark.parametrize("module_params", params) @pytest.mark.parametrize("module_params", params)
def test_get_device_identifier_map(self, module_params, connection_mock, mocker): 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 get_device_id_from_service_tags_mock.return_value = None
res = self.module._get_device_identifier_map(module_params, connection_mock) res = self.module._get_device_identifier_map(module_params, connection_mock)
assert isinstance(res, dict) assert isinstance(res, dict)