Right now the lldp facts has {'eno1': {'vlan': 'vlan-1001', 'neighbor': 'asw2-a-eqiad', 'port': 'ge-4/0/22'}}
Or
{'ens3f1np1': {'vlan': 'vlan-1106', 'neighbor': 'cloudsw1-c8-eqiad.mgmt.eqiad.wmnet', 'port': 'xe-0/0/47'}, 'ens3f0np0': {'vlan': 'vlan-1118', 'neighbor': 'cloudsw1-c8-eqiad.mgmt.eqiad.wmnet', 'port': 'xe-0/0/27'}}
While lldpcli also show:
$ /usr/sbin/lldpctl -f xml [...] <descr label="PortDescr">lvs1016:enp4s0f0 {#4061}</descr>
This would be useful to get the cable ID {#xxxx} of a given switch<->host cable for T262899
One open question is: should we directly expose the cable ID as well as fact, or only the PortDescr?
Additionally, the MTU is exposed like:
<mfs label="MFS">9192</mfs>
Which is needed as well.
Last, Facter only supports single vlans, for example if the device receives:
$ /usr/sbin/lldpctl -f xml [...] <vlan label="VLAN" vlan-id="1004">vlan-1004</vlan> <vlan label="VLAN" vlan-id="1020" pvid="yes">vlan-1020</vlan>
It means:
vlans 1004 and 1020 are trunked, and 1020 is a native vlan (or access).
But Facter only reports:
'enp4s0f0': {'vlan': 'vlan-1020', 'neighbor': 'asw2-d-eqiad', 'port': 'xe-7/0/15'},
Ideally it would report something like (in yaml only for the clarity of the example):
vlans: 1020: mode: access 1004: mode: trunked
Or maybe simpler:
vlans: 1020: access 1004: trunked