mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Return '' for identify state on read ipmi
For exploring the api, a write-only attribute presents difficulty. Address this by allowing plugins to return a '' value and have ipmi plugin return that value to enable things like the web api explorer.
This commit is contained in:
parent
a645e256eb
commit
f9b27eb426
@ -452,6 +452,7 @@ class InputBootDevice(BootDevice):
|
||||
|
||||
class IdentifyState(ConfluentChoiceMessage):
|
||||
valid_values = set([
|
||||
'', # allowed for output to indicate write-only support
|
||||
'on',
|
||||
'off',
|
||||
])
|
||||
|
@ -341,6 +341,10 @@ class IpmiHandler(object):
|
||||
self.ipmicmd.set_identify(on=identifystate)
|
||||
return msg.IdentifyState(
|
||||
node=self.node, state=self.inputdata.inputbynode[self.node])
|
||||
elif 'read' == self.op:
|
||||
# ipmi has identify as read-only for now
|
||||
return msg.IdentifyState(node=self.node, state='')
|
||||
|
||||
def power(self):
|
||||
if 'read' == self.op:
|
||||
power = self.ipmicmd.get_power()
|
||||
|
Loading…
Reference in New Issue
Block a user