mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-25 12:41:39 +00:00
Have confluent2lxca use current config for address
In a confluent2lxca scenario, it is highly probably that confluent's attribute is not viable for LXCA usage (link local address). Give the current configuration the opportunity to replace the confluent reference with the current IPv4 of the host.
This commit is contained in:
parent
82a7012527
commit
1a10b5d747
@ -52,6 +52,15 @@ def main():
|
||||
if node not in databynode:
|
||||
databynode[node] = {}
|
||||
databynode[node].update(res['databynode'][node])
|
||||
for res in sess.read(
|
||||
'/noderange/{0}/configuration/management_controller/net_interfaces/management'.format(
|
||||
noderange)):
|
||||
for node in res.get('databynode', {}):
|
||||
currip = res['databynode'][node].get('ipv4_address', {}).get(
|
||||
'value', '')
|
||||
if currip:
|
||||
databynode[node]['hardwaremanagement.manager'] = {
|
||||
'value': currip.split('/', 1)[0]}
|
||||
with open(options.output, 'w') as importfile:
|
||||
bulkimport = csv.writer(importfile)
|
||||
bulkimport.writerow(headers)
|
||||
|
Loading…
Reference in New Issue
Block a user