mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Add ability to register remote systems in discovery
To start with, support Lenovo XCC systems
This commit is contained in:
parent
ed94804b90
commit
c6079a1ee6
@ -475,7 +475,17 @@ def handle_api_request(configmanager, inputdata, operation, pathcomponents):
|
||||
return (msg.KeyValueData({'status': 'unsubscribed'}),)
|
||||
elif operation in ('update', 'create'):
|
||||
if pathcomponents == ['discovery', 'register']:
|
||||
return
|
||||
if 'address' not in inputdata:
|
||||
raise exc.InvalidArgumentException('Missing address in input')
|
||||
nd = {
|
||||
'addresses': [(inputdata['address'], 443)]
|
||||
}
|
||||
sd = ssdp.check_fish(('/DeviceDescription.json', nd))
|
||||
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'])
|
||||
if 'node' not in inputdata:
|
||||
raise exc.InvalidArgumentException('Missing node name in input')
|
||||
mac = _get_mac_from_query(pathcomponents)
|
||||
|
Loading…
Reference in New Issue
Block a user