Description
Gateway information for Fanout switches generated from ansible/library/conn_graph_facts.py is not correct.
Steps to reproduce the issue:
- Source file ansible/library/conn_graph_facts.py
- In function parse_graph()
...
management_ip = l3info.find('ManagementIPInterface').attrib['Prefix']
deviceinfo[hostname]['ManagementIp'] = management_ip
mgmtip = ipaddress.IPNetwork(management_ip)
deviceinfo[hostname]['mgmtip'] = str(mgmtip.ip)
management_gw = str(mgmtip.network+1)
deviceinfo[hostname]['ManagementGw'] = management_gw
Describe the results you received:
The management_gw shoud is calculated as network + 1 which is not correct for all Lab. environment. In my case the gateway IP is network + 254.
Describe the results you expected:
The management_gw shoud be retrieved from the XML file rather than network + 1.
Description
Gateway information for Fanout switches generated from ansible/library/conn_graph_facts.py is not correct.
Steps to reproduce the issue:
...
management_ip = l3info.find('ManagementIPInterface').attrib['Prefix']
deviceinfo[hostname]['ManagementIp'] = management_ip
mgmtip = ipaddress.IPNetwork(management_ip)
deviceinfo[hostname]['mgmtip'] = str(mgmtip.ip)
management_gw = str(mgmtip.network+1)
deviceinfo[hostname]['ManagementGw'] = management_gw
Describe the results you received:
The management_gw shoud is calculated as network + 1 which is not correct for all Lab. environment. In my case the gateway IP is network + 254.
Describe the results you expected:
The management_gw shoud be retrieved from the XML file rather than network + 1.