Merge "Make fencing action parameter optional." into stable/ocata

This commit is contained in:
Jenkins 2017-03-29 19:58:16 +00:00 committed by Gerrit Code Review
commit 04a2928699

View File

@ -264,6 +264,7 @@ class GenerateFencingParametersAction(base.TripleOAction):
if node["pm_type"] == "pxe_ssh":
# Ironic fencing driver
node_data["agent"] = "fence_ironic"
if self.fence_action:
params["action"] = self.fence_action
params["auth_url"] = self.os_auth["auth_url"]
params["login"] = self.os_auth["login"]
@ -277,6 +278,7 @@ class GenerateFencingParametersAction(base.TripleOAction):
elif node["pm_type"].split('_')[1] in ("ipmitool", "ilo", "drac"):
# IPMI fencing driver
node_data["agent"] = "fence_ipmilan"
if self.fence_action:
params["action"] = self.fence_action
params["ipaddr"] = node["pm_addr"]
params["passwd"] = node["pm_password"]