mirror of
https://github.com/xcat2/confluent.git
synced 2026-10-20 14:45:45 +00:00
Name the node when an inventory component is missing
ConfluentTargetNotFound takes the node as its first argument, and every other caller passes it. The two inventory plugins constructed it with no arguments at all, so asking for a component that is not in the inventory map raised TypeError instead of returning the 404 the path was written to return. Both now follow the pattern used a few lines further down for volumes and name the component that was not found.
This commit is contained in:
@@ -1053,7 +1053,9 @@ class IpmiHandler:
|
||||
await self.make_inventory_map()
|
||||
compname = self.invmap.get(component, None)
|
||||
if compname is None:
|
||||
await self.output.put(msg.ConfluentTargetNotFound())
|
||||
await self.output.put(msg.ConfluentTargetNotFound(
|
||||
self.node,
|
||||
"No component named '{0}' found".format(component)))
|
||||
return
|
||||
invdata = await self.ipmicmd.get_inventory_of_component(compname)
|
||||
if invdata is None:
|
||||
|
||||
@@ -975,7 +975,9 @@ class IpmiHandler:
|
||||
await self.make_inventory_map()
|
||||
compname = self.invmap.get(component, None)
|
||||
if compname is None:
|
||||
await self.output.put(msg.ConfluentTargetNotFound())
|
||||
await self.output.put(msg.ConfluentTargetNotFound(
|
||||
self.node,
|
||||
"No component named '{0}' found".format(component)))
|
||||
return
|
||||
invdata = await self.ipmicmd.get_inventory_of_component(compname)
|
||||
if invdata is None:
|
||||
|
||||
Reference in New Issue
Block a user