Skip to content

[Fanout] Gateway information for Fanout switches generated from is not correct. #573

@lvphuc133

Description

@lvphuc133

Description
Gateway information for Fanout switches generated from ansible/library/conn_graph_facts.py is not correct.

Steps to reproduce the issue:

  1. Source file ansible/library/conn_graph_facts.py
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions