Ensure lanplus is unset when using redfish

This avoids the additional burden of having to explicitly add
'--ipmi-no-lanplus' to the generate fencing command.

Change-Id: I1eab370213ce8d1f71f70016b481128254cec046
(cherry picked from commit b440733f43)
This commit is contained in:
Luca Miccini 2020-06-18 10:42:31 +02:00
parent eff7e961ab
commit 10bcbc4195
2 changed files with 2 additions and 4 deletions

View File

@ -598,7 +598,6 @@ class StackParametersTest(base.TestCase):
"delay": 28,
"ipaddr": "172.16.0.1:8000",
"ipport": "8000",
"lanplus": True,
"privlvl": 5,
"login": "root",
"passwd": "calvin",

View File

@ -170,12 +170,13 @@ def generate_fencing_parameters(ironic, compute, nodes_json, delay,
if driver_proto in {'ipmi', 'ipmitool', 'drac', 'idrac', 'ilo',
'redfish'}:
# IPMI fencing driver
if driver_proto == "redfish":
node_data["agent"] = "fence_redfish"
params["systems_uri"] = node["pm_system_id"]
else:
node_data["agent"] = "fence_ipmilan"
if ipmi_lanplus:
params["lanplus"] = ipmi_lanplus
params["ipaddr"] = node["pm_addr"]
params["passwd"] = node["pm_password"]
params["login"] = node["pm_user"]
@ -189,8 +190,6 @@ def generate_fencing_parameters(ironic, compute, nodes_json, delay,
params["ssl_insecure"] = "true"
else:
params["ssl_insecure"] = "false"
if ipmi_lanplus:
params["lanplus"] = ipmi_lanplus
if delay:
params["delay"] = delay
if ipmi_cipher: