Age | Commit message (Collapse) | Author |
|
https://github.com/sever-sever/vyos-1x into netns
* 'T5241-control-edition' of https://github.com/sever-sever/vyos-1x:
T5241: Support netns for veth and dummy interfaces
|
|
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process
* T5195: use read_file and write_file implementation from vyos.utils.file
Changed code automatically using:
find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} +
find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} +
* T5195: move chmod* helpers to vyos.utils.permission
* T5195: use colon_separated_to_dict from vyos.utils.dict
* T5195: move is_systemd_service_* to vyos.utils.process
* T5195: fix boot issues with missing imports
* T5195: move dict_search_* helpers to vyos.utils.dict
* T5195: move network helpers to vyos.utils.network
* T5195: move commit_* helpers to vyos.utils.commit
* T5195: move user I/O helpers to vyos.utils.io
|
|
Add netns configuration for dummy and virtual-ethernet interfaces
Change Interface class to get/set data to netns
|
|
When IPv6 is disbaled on an interface also the sysfs files related to IPv6 for
this interface vanish. We need to check if the file exists before we read it.
|
|
Interface.get_config() was always a pure helper which exposed a "per interface
type" dictionary which was then fed by the caller to create interfaces by
iproute2 which required additional options during creation time.
Such interfaces had been:
* tunnel
* vxlan
* geneve
* macsec
* wifi
* macvlan / pseudo-ethernet
The code was always duplicated to convert from the VyOS CLI based get_config_dict()
to a dict which can be used to feed iproute2.
This path has been removed and we now always feed in the entire dictionary
retrieved by get_config_dict() or in the interfaces case, it's high-level wrapper
get_interface_dict() to the interface we wan't to create.
This also adds the - personally long awaited - possibility to get rid of the
derived tunnel classes for e.g. GRE, IPIP, IPIP6 and so on.
|
|
Instead of using an Adapter pattern to make interfaces VLAN-aware, create a
derived class named VLANIf to represent a VLAN. This change was necessary to
eliminate mixed code in Interfaces class which was VLAN - free, but recently
gained some VLAN specific code for set_admin_state().
In addition this "autoresolves" the issue in T2894 as a bond vlan interface
will no longer change the lower interface.
|
|
|
|
|
|
allow to setup the debugging from environment variables.
allow to set the name of the file used for logging
change the name of the debug options to be:
- developer: enable pdb of raise
- log: all logging messages are logged to a file
- ifconfig: show on screen action peformed to change intefaces
- command: print all the result of command to screen
also provide a way to setup the debugging using environment
variables.
|
|
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
|
|
Not all interface are capable of all features. Since commands are
now checked for valid completion, ethtool command failure must
be ignored.
|
|
In order to be able to use the interface class
with operational mode, these commands must not log as
it would otherwise mess with the output on the screen.
|
|
ifconfig: T2057: explicity name state functions
|
|
The Interface get_state/set_state were not clear about
if they edited the admin or operational state.
functions are now using admin_state and oper_state
for clarity.
|
|
ifconfig: T2057: option forcing
|
|
The code was trying to not perform change when not necessary
however it prevent zero value to be set
|
|
the result of the commands used to setup the interface is now checked.
flowcontrol can not always be set on all interfaces, and when/if it
fails, it prevents the interace to come up. This is problematic as it
may prevent the router to come up. Therefore flowcontrol must be
allowed to fail gracefully/silently.
|
|
|
|
|
|
|
|
|
|
|