summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/ipmitool.py
diff options
context:
space:
mode:
authorLucas Alvares Gomes <lucasagomes@gmail.com>2016-04-22 15:08:25 +0100
committerLucas Alvares Gomes <lucasagomes@gmail.com>2016-04-22 15:13:39 +0100
commit63475ca723aae93d4419a0d1632bc6dba6ca8de0 (patch)
treeeaebeffdc32b13e8c3f5fc7cabdb23ab2f128298 /ironic/drivers/modules/ipmitool.py
parent0efe6a32485e8a8d23e4da1006d2ebc6a5dbe87b (diff)
downloadironic-63475ca723aae93d4419a0d1632bc6dba6ca8de0.tar.gz
FIX: IPMI bmc_reset() always executed as "warm"
When the invoked via the CLI/API the bmc_reset() "warm" parameter will receive a string, prior to this patch the string would be seem as True (since the parameter was expecting a boolen) causing the driver to always reset the BMC in "warm" mode. This patch fixes the problem by converting the string passed to boolean inside the method. Change-Id: I052ef1ee911703c9b7316362aced17b6303b991d Closes-Bug: #1573614
Diffstat (limited to 'ironic/drivers/modules/ipmitool.py')
-rw-r--r--ironic/drivers/modules/ipmitool.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ironic/drivers/modules/ipmitool.py b/ironic/drivers/modules/ipmitool.py
index 2fb9f84ad..cef19d25b 100644
--- a/ironic/drivers/modules/ipmitool.py
+++ b/ironic/drivers/modules/ipmitool.py
@@ -42,6 +42,7 @@ from oslo_config import cfg
from oslo_log import log as logging
from oslo_service import loopingcall
from oslo_utils import excutils
+from oslo_utils import strutils
import six
from ironic.common import boot_devices
@@ -1038,6 +1039,7 @@ class VendorPassthru(base.VendorInterface):
"""
node_uuid = task.node.uuid
+ warm = strutils.bool_from_string(warm)
if warm:
warm_param = 'warm'
else: