2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-03-29 05:33:33 +00:00

Fix nodeconfig and nodefirmware to IPMI targets

This commit is contained in:
Jarrod Johnson
2026-03-24 16:23:48 -04:00
parent f18cc981e2
commit cd68225672
3 changed files with 5 additions and 7 deletions

View File

@@ -242,17 +242,17 @@ async def main():
session = client.Command()
rcode = 0
if options.restoredefault:
session.stop_if_noderange_over(noderange, options.maxnodes)
await session.stop_if_noderange_over(noderange, options.maxnodes)
if options.restoredefault.lower() in (
'sys', 'system', 'uefi', 'bios'):
for fr in session.update(
async for fr in session.update(
'/noderange/{0}/configuration/system/clear'.format(noderange),
{'clear': True}):
rcode |= client.printerror(fr)
sys.exit(rcode)
elif options.restoredefault.lower() in (
'bmc', 'imm', 'xcc'):
for fr in session.update(
async for fr in session.update(
'/noderange/{0}/configuration/management_controller/clear'.format(noderange),
{'clear': True}):
rcode |= client.printerror(fr)

View File

@@ -662,9 +662,7 @@ class NodeHandler(immhandler.NodeHandler):
for currkey in list(statargs):
statargs[currkey + attribsuffix] = statargs[currkey]
del statargs[currkey]
print(repr(statargs))
netset, status = await wc.grab_json_response_with_status('/api/dataset', statargs)
print(repr(netset))
elif myipaddr.startswith('fe80::'):
await self.configmanager.set_node_attributes(

View File

@@ -972,7 +972,7 @@ class IpmiHandler:
async def list_firmware(self):
await self.output.put(msg.ChildCollection('all'))
for id, data in self.ipmicmd.get_firmware():
async for id, data in self.ipmicmd.get_firmware():
await self.output.put(msg.ChildCollection(simplify_name(id)))
async def read_firmware(self, component, category):
@@ -980,7 +980,7 @@ class IpmiHandler:
errorneeded = False
try:
complist = () if component == 'all' else (component,)
for id, data in self.ipmicmd.get_firmware(complist, category):
async for id, data in self.ipmicmd.get_firmware(complist, category):
if (component in ('core', 'all') or
component == simplify_name(id) or
match_aliases(component, simplify_name(id))):