Age | Commit message (Collapse) | Author |
|
Previously, set_vrf was always called, which uses the same master and nomaster
commands as bridge, so it removed the interface from the bridge.
- add checks to make VRF and bridge membership mutually exclusive
- always re-add the interface back to any bridge it is part of in
case it is deleted and recreated
|
|
- use is_member function instead of checking config directly
- make error output more user friendly
- replace .format with f-strings
- split into lines less than ~80 characters long
|
|
Bridge members should not have addresses assigned.
|
|
|
|
|
|
|
|
Bridge members should not have addresses assigned.
|
|
Bridge members should not have addresses assigned.
|
|
Previously, set_vrf was always called, which uses the same master and nomaster
commands as bridge, so it removed the interface from the bridge.
- add checks to make VRF and bridge membership mutually exclusive
- always re-add the interface back to any bridge it is part of in
case it is deleted and recreated (e.g. changing egress/ingress-qos)
|
|
Will be called by all interface scripts to re-add themselves to a bridge
after deleting and recreating themselves.
|
|
Was previously moved out of this script.
|
|
Function that parses the config of a bridge member into a dict that is
needed to apply all port config when adding a port to a bridge.
Needed because other interfaces will be adding themselves to the bridge
outside of the bridge conf_mode script and they need a common place to
get their config.
Can't be put as method of BridgeIf as we can't invoke it without it
creating the bridge (create=False raises an exception), we need to
get the configuration before we create the interface.
|
|
|
|
|
|
|
|
- rewrite the function to support both bridge and bonding interface types,
if the type is passed it searches only that type, otherwise it searches
both
- move is_member check out of the deleted condition
- move is_member check to intf_from_dict for interfaces that use it
|
|
This is needed as later functions depend on it
|
|
|
|
Remove one unnecessary call to conf.get_level()
|
|
ipoe: T2294: Fix nodes path
|
|
|
|
interface: T2367: optimize flow and detriplicate add/del_addr functions
|
|
- detriplicate list appending
- detriplicate returns
- use if-elif-else
- move check if address is already added to beginning
- move caching in variable to after address assignment so a failed
assignment won't cache the address
|
|
[T2311] name servers via cmdline can't take effect
|
|
interface: T2367: code clarity
|
|
|
|
|
|
T2367: flush addresses when adding bond/bridge members
|
|
Any remaining addresses of an interface (e.g. IPv6 link-local) will be flushed
when adding a member.
A direct call to ip is necessary for interfaces not under the Interface class
(e.g. vlan vif*)
|
|
Any remaining addresses of an interface (e.g. IPv6 link-local) will be flushed
when adding a member.
A direct call to ip is necessary for interfaces not under the Interface class
(e.g. vlan vif*)
|
|
Add function that flushes all addresses from an interface.
|
|
Correctly track addresses in cache _addr variable
|
|
dictconfig: T2372: fix interfaces disable bug
|
|
off-by one line where the IP were added to the add list
and not the remove list
|
|
disable :T2372: disable sub-interface if parent is
|
|
use intf_to_dict and add_to_dict to correctly implement disable.
keeping all interface code with VLAN the same.
|
|
use intf_to_dict and add_to_dict to correctly implement disable.
keeping all interface code with VLAN the same.
|
|
use intf_to_dict and add_to_dict to correctly implement disable.
|
|
implement disable_state which looks if the current node, or some
designated parent node are set are 'disable' and thefore should
be ignored.
break down the function vlan_to_dict in it multiple components
add_to_dict which can parse vif, vif-s, or vif-c and add them
to the configuration dictionary
intf_to_dict which setup a base configuration dictionary from the
interface Config() with addresses, arp, disable, ...
it is used by vlan_to_dict but can and will be used by other interfaces
|
|
validators: numeric: T2414: improve runtime performance
|
|
$ time for i in {1..1000}; do /usr/libexec/vyos/validators/numeric --range 1-9999 666; done
real 0m56.933s
user 0m48.045s
sys 0m9.064s
$ time for i in {1..1000}; do /usr/libexec/vyos/validators/numeric--range 1-9999 666; done
real 0m44.552s
user 0m37.760s
sys 0m6.989s
This is a performance improvement of 21%, running in an ESXi VM with Quad
Intel(R) Xeon(R) CPU E5-2630L v3 @ 1.80GHz.
|
|
|
|
|
|
|
|
|
|
... no need to reinvent the wheel in our Python code.
|
|
The subnet specific nodes sip-server-address & sip-server-name do the same for
the user - specify a SIP server. Only the backend is rendered in a different
way, as ISC DHCPv6 expects different options. There is absolutely no need for
the user to distinguish between both two nodes.
|
|
|
|
Commit 2bf12b579e0 ("template: T2388: move mkdir/chmod/chown within render()")
passed an unexpected keyword to the render() function, it was simply
wrongly spelled.
|
|
tolls intact
|