From fe39c4c9f3ccd22f3ee3b155328ed6467584a0fb Mon Sep 17 00:00:00 2001 From: Luca Miccini Date: Wed, 10 Mar 2021 10:07:51 +0100 Subject: [PATCH] Do not use ironic/nova for generate_fencing This commit cleans up and simplifies the way fencing parameters are generated. We don't try to map baremetal nodes to instances anymore and we simply generate fencing agents definitions for each node. Change-Id: I362870cd1f0a78049268e5910ffef4dc9424f668 --- tripleoclient/tests/v1/test_overcloud_parameters.py | 1 - tripleoclient/tests/workflows/test_parameters.py | 1 - tripleoclient/v1/overcloud_parameters.py | 1 - tripleoclient/workflows/parameters.py | 7 +------ 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/tripleoclient/tests/v1/test_overcloud_parameters.py b/tripleoclient/tests/v1/test_overcloud_parameters.py index 23bc95f6f..8754cc05a 100644 --- a/tripleoclient/tests/v1/test_overcloud_parameters.py +++ b/tripleoclient/tests/v1/test_overcloud_parameters.py @@ -68,7 +68,6 @@ class TestGenerateFencingParameters(utils.TestCommand): self.cmd.take_action(parsed_args) mock_gen_fence.assert_called_once_with( - self.app.client_manager, **{ 'nodes_json': [ { diff --git a/tripleoclient/tests/workflows/test_parameters.py b/tripleoclient/tests/workflows/test_parameters.py index 7a44e6405..63523e20e 100644 --- a/tripleoclient/tests/workflows/test_parameters.py +++ b/tripleoclient/tests/workflows/test_parameters.py @@ -154,7 +154,6 @@ class TestParameterWorkflows(utils.TestCommand): 'ipmi_lanplus': True } params = parameters.generate_fencing_parameters( - self.app.client_manager, **workflow_input ) self.assertEqual(params, {"parameter_defaults": {}}) diff --git a/tripleoclient/v1/overcloud_parameters.py b/tripleoclient/v1/overcloud_parameters.py index 1f3e8119f..8418cd99b 100644 --- a/tripleoclient/v1/overcloud_parameters.py +++ b/tripleoclient/v1/overcloud_parameters.py @@ -58,7 +58,6 @@ class GenerateFencingParameters(command.Command): nodes_config = utils.parse_env_file(parsed_args.instackenv) parsed_args.instackenv.close() result = parameters.generate_fencing_parameters( - clients=self.app.client_manager, nodes_json=nodes_config, delay=parsed_args.delay, ipmi_level=parsed_args.ipmi_level, diff --git a/tripleoclient/workflows/parameters.py b/tripleoclient/workflows/parameters.py index 0723e9282..98ee2faf8 100644 --- a/tripleoclient/workflows/parameters.py +++ b/tripleoclient/workflows/parameters.py @@ -231,13 +231,10 @@ def check_deprecated_parameters(clients, stack_name, tht_root, template, ) -def generate_fencing_parameters(clients, nodes_json, delay, ipmi_level, +def generate_fencing_parameters(nodes_json, delay, ipmi_level, ipmi_cipher, ipmi_lanplus): """Generate and return fencing parameters. - :param clients: application client object. - :type clients: Object - :param nodes_json: list of nodes & attributes in json format :type nodes_json: List @@ -256,8 +253,6 @@ def generate_fencing_parameters(clients, nodes_json, delay, ipmi_level, :returns: Dictionary """ return stk_parameters.generate_fencing_parameters( - clients.baremetal, - clients.compute, nodes_json=nodes_json, delay=delay, ipmi_level=ipmi_level,