summaryrefslogtreecommitdiffstats
path: root/deploy/dha_adapters
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/dha_adapters')
-rw-r--r--deploy/dha_adapters/ipmi_adapter.py22
-rw-r--r--deploy/dha_adapters/zte_adapter.py7
2 files changed, 19 insertions, 10 deletions
diff --git a/deploy/dha_adapters/ipmi_adapter.py b/deploy/dha_adapters/ipmi_adapter.py
index a4ad1af2c..7cc930554 100644
--- a/deploy/dha_adapters/ipmi_adapter.py
+++ b/deploy/dha_adapters/ipmi_adapter.py
@@ -49,7 +49,8 @@ class IpmiAdapter(HardwareAdapter):
def node_get_state(self, node_id):
state = exec_cmd('%s chassis power status' % self.ipmi_cmd(node_id),
attempts=self.attempts, delay=self.delay,
- verbose=True)
+ verbose=True,
+ mask_args=[8,10])
return state
def _node_power_cmd(self, node_id, cmd):
@@ -59,7 +60,8 @@ class IpmiAdapter(HardwareAdapter):
pow_cmd = '%s chassis power %s' % (self.ipmi_cmd(node_id), cmd)
exec_cmd(pow_cmd, attempts=self.attempts, delay=self.delay,
- verbose=True)
+ verbose=True,
+ mask_args=[8,10])
attempts = self.attempts
while attempts:
@@ -71,7 +73,7 @@ class IpmiAdapter(HardwareAdapter):
elif attempts != 0:
# reinforce our will, but allow the command to fail,
# we know our message got across once already...
- exec_cmd(pow_cmd, check=False)
+ exec_cmd(pow_cmd, check=False, mask_args=[8,10])
err('Could not set chassis %s for node %s' % (cmd, node_id))
@@ -86,7 +88,9 @@ class IpmiAdapter(HardwareAdapter):
def node_reset(self, node_id):
log('RESET Node %s' % node_id)
cmd = '%s chassis power reset' % self.ipmi_cmd(node_id)
- exec_cmd(cmd, attempts=self.attempts, delay=self.delay, verbose=True)
+ exec_cmd(cmd, attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
def node_set_boot_order(self, node_id, boot_order_list):
log('Set boot order %s on Node %s' % (boot_order_list, node_id))
@@ -96,11 +100,15 @@ class IpmiAdapter(HardwareAdapter):
if dev == 'pxe':
exec_cmd('%s chassis bootdev pxe options=persistent'
% cmd_prefix, attempts=self.attempts, delay=self.delay,
- verbose=True)
+ verbose=True,
+ mask_args=[8,10])
elif dev == 'iso':
exec_cmd('%s chassis bootdev cdrom' % cmd_prefix,
- attempts=self.attempts, delay=self.delay, verbose=True)
+ attempts=self.attempts, delay=self.delay,
+ verbose=True,
+ mask_args=[8,10])
elif dev == 'disk':
exec_cmd('%s chassis bootdev disk options=persistent'
% cmd_prefix, attempts=self.attempts, delay=self.delay,
- verbose=True)
+ verbose=True,
+ mask_args=[8,10])
diff --git a/deploy/dha_adapters/zte_adapter.py b/deploy/dha_adapters/zte_adapter.py
index f6279fbf0..1e610ca41 100644
--- a/deploy/dha_adapters/zte_adapter.py
+++ b/deploy/dha_adapters/zte_adapter.py
@@ -27,14 +27,15 @@ class ZteAdapter(IpmiAdapter):
WAIT_LOOP = 600
log('RESET Node %s' % node_id)
cmd_prefix = self.ipmi_cmd(node_id)
- state = exec_cmd('%s chassis power status' % cmd_prefix)
+ state = exec_cmd('%s chassis power status' % cmd_prefix, mask_args=[8,10])
if state == 'Chassis Power is on':
was_shut_off = False
done = False
- exec_cmd('%s chassis power cycle' % cmd_prefix)
+ exec_cmd('%s chassis power cycle' % cmd_prefix, mask_args=[8,10])
for i in range(WAIT_LOOP):
state, _ = exec_cmd('%s chassis power status' % cmd_prefix,
- False)
+ check=False,
+ mask_args=[8,10])
if state == 'Chassis Power is off':
was_shut_off = True
elif state == 'Chassis Power is on' and was_shut_off: