2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-28 20:07:48 +00:00

Pull the typical XCC scanning to remote registration path

This commit is contained in:
Jarrod Johnson 2022-11-11 14:33:54 -05:00
parent c6079a1ee6
commit 9fa8a7124e

View File

@ -484,8 +484,10 @@ def handle_api_request(configmanager, inputdata, operation, pathcomponents):
sd['hwaddr'] = sd['attributes']['mac-address']
if not sd:
raise exc.Unsupported('Target address is not a supported device for remote discovery registration')
detected(sd)
return msg.CreatedResource(inputdata['address'])
nh = xcc.NodeHandler(sd, configmanager)
nh.scan()
detected(nh.info)
return [msg.CreatedResource(inputdata['address'])]
if 'node' not in inputdata:
raise exc.InvalidArgumentException('Missing node name in input')
mac = _get_mac_from_query(pathcomponents)