mirror of
https://opendev.org/x/pyghmi
synced 2025-07-20 19:21:11 +00:00
Fix raw handling by ipmictl.py
The test harness was incorrectly throwing string values at the library. Correct that by explicitly converting from hex string to int. Additionally, command.py was failing to pass data through. Change-Id: Iceda4c3b4a382992d445f90dfbc19f6c75b528df
This commit is contained in:
@@ -58,8 +58,9 @@ def docommand(result, ipmisession):
|
||||
else:
|
||||
print ipmisession.get_bootdev()
|
||||
elif cmmand == 'raw':
|
||||
print ipmisession.raw_command(netfn=args[0],
|
||||
command=args[1], data=args[2:])
|
||||
print ipmisession.raw_command(netfn=int(args[0]),
|
||||
command=int(args[1]),
|
||||
data=map(lambda x: int(x, 16), args[2:]))
|
||||
|
||||
bmcs = string.split(bmc, ",")
|
||||
for bmc in bmcs:
|
||||
|
@@ -256,7 +256,8 @@ class Command(object):
|
||||
:param data: Command data as a tuple or list
|
||||
:returns: dict -- The response from IPMI device
|
||||
"""
|
||||
return self.ipmi_session.raw_command(netfn=netfn, command=command)
|
||||
return self.ipmi_session.raw_command(netfn=netfn, command=command,
|
||||
data=data)
|
||||
|
||||
def get_power(self):
|
||||
"""Get current power state of the managed system
|
||||
|
Reference in New Issue
Block a user