Page MenuHomeVyOS Platform

Rewrite the LLDP op mode in the new format
Closed, ResolvedPublic

Description

Should be a straightforward refactoring.

[email protected]:~$ /usr/libexec/vyos/op_mode/lldp.py show_neighbors --raw
{
    "lldp": {
        "interface": [
            {
                "eth1": {
                    "via": "LLDP",
                    "rid": "1",
                    "age": "0 day, 04:32:53",
                    "chassis": {
                        "vyos": {
                            "id": {
                                "type": "mac",
                                "value": "50:00:00:02:00:00"
                            },
                            "descr": "VyOS 1.3.2",
                            "mgmt_ip": "fe80::200:ff:fe00:0",
                            "mgmt_iface": "1",
                            "capability": [
                                {
                                    "type": "Bridge",
                                    "enabled": false
                                },
                                {
                                    "type": "Router",
                                    "enabled": true
                                },
                                {
                                    "type": "Wlan",
                                    "enabled": false
                                },
                                {
                                    "type": "Station",
                                    "enabled": false
                                }
                            ]
                        }
                    },
                    "port": {
                        "id": {
                            "type": "mac",
                            "value": "50:00:00:02:00:01"
                        },
                        "descr": "eth1",
                        "ttl": "120",
                        "auto_negotiation": {
                            "supported": true,
                            "enabled": true,
                            "advertised": [
                                {
                                    "type": "10Base-T",
                                    "hd": true,
                                    "fd": true
                                },
                                {
                                    "type": "100Base-TX",
                                    "hd": true,
                                    "fd": true
                                },
                                {
                                    "type": "1000Base-T",
                                    "hd": false,
                                    "fd": true
                                }
                            ],
                            "current": "1000BaseTFD - Four-pair Category 5 UTP, full duplex mode"
                        }
                    },
                    "lldp_med": {
                        "device_type": "Network Connectivity Device",
                        "capability": [
                            {
                                "type": "Capabilities",
                                "available": true
                            },
                            {
                                "type": "Policy",
                                "available": true
                            },
                            {
                                "type": "Location",
                                "available": true
                            },
                            {
                                "type": "MDI/PSE",
                                "available": true
                            },
                            {
                                "type": "MDI/PD",
                                "available": true
                            },
                            {
                                "type": "Inventory",
                                "available": true
                            }
                        ],
                        "inventory": {
                            "hardware": "pc-i440fx-2.12",
                            "software": "5.4.210-amd64-vyos",
                            "firmware": "rel-1.11.1-0-g0551a4be2c-prebuil",
                            "manufacturer": "QEMU",
                            "model": "Standard PC (i440FX + PIIX, 1996"
                        }
                    }
                }
            },
            {
                "eth2": {
                    "via": "LLDP",
                    "rid": "2",
                    "age": "0 day, 04:23:22",
                    "chassis": {
                        "sw1_wue5": {
                            "id": {
                                "type": "mac",
                                "value": "50:00:00:d5:5d:c0"
                            },
                            "descr": "Arista Networks EOS version 4.28.5M running on an Arista vEOS-lab",
                            "capability": [
                                {
                                    "type": "Bridge",
                                    "enabled": true
                                },
                                {
                                    "type": "Router",
                                    "enabled": false
                                }
                            ]
                        }
                    },
                    "port": {
                        "id": {
                            "type": "ifname",
                            "value": "Ethernet1"
                        },
                        "ttl": "120",
                        "mfs": "9236"
                    },
                    "vlan": {
                        "vlan_id": "1",
                        "pvid": true
                    },
                    "lldp_med": {
                        "device_type": "Network Connectivity Device",
                        "capability": {
                            "type": "Capabilities",
                            "available": true
                        }
                    }
                }
            }
        ]
    }
}

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Related Objects