mirror of
https://github.com/xcat2/confluent.git
synced 2025-08-21 18:50:30 +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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user