summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/section.py
AgeCommit message (Collapse)Author
2024-04-11T6222: VRRP show prefix for long rfc3768-compatibility interfacesViacheslav Hletenko
If we use rfc3768-compatibility with long interface names like eth1.100.200 it converts the VRRP interface name name to `<interface>v<VRID><IP version>` For example `eth2.100.200v10v4` The limit for interface name is 15 symbols and it causes that interface name is ignoring by keepalived VMAC interface name 'eth2.100.200v10v4' too long or invalid characters - ignoring And it uses the default prefix `vrrp` for such cases. It works fine, but such interfaces are not displayed in the op-mode Allow prefix `vrrp` for the op-mode for `show interfaces` (cherry picked from commit 29a20ce9f9792e23137be57358ca52ddee7ac54b)
2022-08-25ifconfig: T2223: add vlan switch for Section.interfaces()Christian Poessinger
Sometimes we are only interested in the parent interfaces without any VLAN subinterfaces. Extend the API with a vlan argument that defaults to True to keep the current behavior in place.
2021-12-03T4035: correct the interface basename extraction logicDaniil Baturin
to avoid confusing 'v' in GENEVE interface prefix ('gnv') with a "vXXX" part of a VRRP interface
2021-08-24vyos.ifconfig: T3772: bugfix missing VRRP interfacesChristian Poessinger
When the interface name was stripped down from "eth0.201" to "eth" to determine the appropriate interface section, VRRP interfaces got left out on the call to rstrip(). VRRP interfaces now show up in "show interfaces" as they did in VyOS 1.2. vyos@vyos:~$ show interfaces Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down Interface IP Address S/L Description --------- ---------- --- ----------- dum0 172.18.254.201/32 u/u eth0 - u/u eth0.10 172.16.33.8/24 u/u eth0.201 172.18.201.10/24 u/u eth1 10.1.1.2/24 u/u eth1v10 10.1.1.1/24 u/u eth2 - u/u lo 127.0.0.1/8 u/u ::1/128
2020-06-15ifconfig: T2599: fix regex for search, smaller numbersThomas Mangin
2020-06-15ifconfig: T2599: sort interface by natural orderThomas Mangin
2020-05-04ifconfig: section: T2241: add get_config_path functionJernej Jakob
Add a function that converts an interface name to its config path. For example: 'eth0.1.2' -> 'ethernet eth0 vif-s 1 vif-c 2'
2020-05-04ifconfig: T2241: fix section _basename vlan strippingJernej Jakob
Previously the function returned the correct basename only for vif interfaces as it stopped at the 2nd dot. If we had a vif-s vif-c interface 'eth0.1.2' it would return 'eth0.'. It is now fixed to strip both vif-s and vif-c if 'vlan=True' (default).
2020-04-14ifconfig: T2223: group all operational commandsThomas Mangin
All operational command are moved within an Operational class and an inherited on for wireguard.
2020-04-12ifconfig: T31: add skeleton VTI and input classesThomas Mangin
also add a function to Section which provides a list of reserved names
2020-04-11completion: T2238: use interface dataThomas Mangin
Use the data in the default dict of the interface to generate the output of list interface.
2020-04-11ifconfig: T2223: rename Section.listing to interfacesThomas Mangin
update all code using the API. Interface.interfaces() could be used but the code was change to use Section.interfaces() which make more sense when reading it.
2020-04-11ifconfig: T2223: rename Register to SectionThomas Mangin
While the class does indeed all the registration, it work is really to map classes to interface section. ie: interface ethernet -> EthernetIf Therefore it can also list which interface are from which type, therefore the name change. Other function name will also be renamed as a consequence