STORDIS / orca_nw_lib

gNMI python package for SONiC switch discovery and management.
Other
2 stars 3 forks source link

Additional Interface parameters display. #41

Closed kamalkrbh closed 1 month ago

kamalkrbh commented 4 months ago

From gnmi path -> sonic-port:sonic-port/PORT/PORT_LIST[name={interface_name}] get following parameters store them in DB and display in UI as well-

A gnmi equivalent Restconf path for interface of switch can be used to see the output json - Restconf equivalent path - https://{device_ip_list[0]}/restconf/data/sonic-port:sonic-port/PORT/PORT_LIST={interface_name} Sample JSON output -

{
    "sonic-port:PORT_LIST": [
        {
            "admin_status": "up",
            "adv_speeds": "all",
            "alias": "Eth1/1",
            "autoneg": "off",
            "fec": "none",
            "ifname": "Ethernet0",
            "index": 1,
            "lanes": "49",
            "link_training": "off",
            "mtu": 9100,
            "speed": "10000",
            "unreliable_los": "auto",
            "valid_speeds": "10000,1000"
        }
    ]
}