mirror of
https://opendev.org/x/pyghmi
synced 2025-02-05 13:32:48 +00:00
Add smm_ip setting to XCC devices under IPMI
This will give read-only view to the SMM ip address when asking the XCC for an smm_ip setting Change-Id: I40a14d6f27943fc8b18fa18b800e3f8679083f57
This commit is contained in:
parent
3c1c6edf39
commit
ff67fc30b6
@ -332,6 +332,8 @@ class IMMClient(object):
|
||||
if not isinstance(ret, str):
|
||||
ret = ret.decode('utf-8')
|
||||
return ret
|
||||
if propdata[0] == 0x44: # dword
|
||||
return propdata[1:5]
|
||||
else:
|
||||
raise Exception('Unknown format for property: ' + repr(propdata))
|
||||
|
||||
@ -892,6 +894,13 @@ class XCCClient(IMMClient):
|
||||
settings['smm']['value'] = 'Enable'
|
||||
else:
|
||||
settings['smm']['value'] = None
|
||||
smmip = self.get_property('/v2/ibmc/smm/smm_ip')
|
||||
if smmip:
|
||||
smmip = socket.inet_ntoa(smmip[-1::-1])
|
||||
settings['smm_ip'] = {
|
||||
'help': 'Current IPv4 address as reported by SMM, read-only',
|
||||
'value': smmip,
|
||||
}
|
||||
return settings
|
||||
|
||||
rulemap = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user