Age | Commit message (Collapse) | Author |
|
All interface classes register themselves so that we can figure
out from an interface name what class is responsible for its
creation. In the case of Tunnel, it is not the case as multiple
different interfaces are sharing the same "tun" prefix.
Still many operations are the same and it should be done.
|
|
Interfaces enslaved to a bridge are not allowed to be deleted. If an interface
is deleted from the config but it is still enslaved to a bridge will cause a
configuration error on the subsequent boot.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
improves open and cmd adds a new help function run.
the extra optional arguments provide all the features of
subprocess used by every module of VyOS.
popen matches closely subprocess.Popen
cmd matches closely subprocess.check_output
run matches closely subprocess.call and os.system
popen returns the string and errord code
cmd returns the string and raise on error
(the class can be defined the default is OSError)
run returns the return code of the command
the options are:
shell=None, the code auto-detect is a shell is required
decode=None, use .decode() otherwise the encoding will be used
env=None, universal_newlines=None: as per subprocess.Popen
input=None, timeout=None, stdout=PIPE, stderr=STDOUT,
as per Popen.communicate
|
|
Commit b5310b0 ("ifconfig: l2tpv3: T1823: fix configuration build syntax") did
not cover all parts of the l2tpv3 config. Some parts when e.g. adjusting
l2tpv3 addresses after the tunnel was created did fail with the same error.
This has been fixed.
|
|
Now both files and directories are supported.
|
|
ifconfig: T2190: option to prevent Interface creation
|
|
ifconfig: T2205: silence ethtool harmless failures
|
|
a new option was added to the Interface class "create".
By default the value is set to True, and when an instance of the
class is created and the underlying interface does not exists, the
class will create it.
If the option "create" is set to False, the interface will not be
created and instead the class will raise an error when it is
instantiated.
|
|
Not all interface are capable of all features. Since commands are
now checked for valid completion, ethtool command failure must
be ignored.
|
|
|
|
|
|
|
|
Fixes reference to unspecified variable
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/interfaces-l2tpv3.py", line 245, in <module>
apply(c)
File "/usr/libexec/vyos/conf_mode/interfaces-l2tpv3.py", line 211, inapply
l = L2TPv3If(l2tpv3['intf'], **conf)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 185, in __init__
self._create()
File "/usr/lib/python3/dist-packages/vyos/ifconfig/l2tpv3.py", line 48, in _create
cmd = 'ip l2tp add tunnel tunnel_id {} '.format(config['tunnel_id'])
NameError: name 'config' is not defined
|
|
Commit 8a4dd6c2816 ("ifconfig: T2057: add class Register") added the interface
options but not all have been migrated. The forgotten ones have been
added by this commit (session_id & peer_session_id).
|
|
Import statement has been forgotton on the ifconfig file split.
|
|
The IPv6 address can be expressed in different ways:
(for example all these are valid loopback ::1, 0::1, 0:0::0:001)
The IPv6 need to be normalised when tested, and the best way to
do this is to test it on-wire representation, the same can be done
for IPv4.
Also The interface name which returned by netifaces.ifaddresses can
have a % in the 'addr' field, for example '::1%eth0', which would
also break the test in is_intf_addr_assigned.
|
|
This reverts commit e2f80e57d9895d207edf0ad92c299dc7862087d6.
Due to failing smoketests this commit is reverted.
|
|
validate: T2182: IPv6 are not normalised when compared
|
|
ifconfig: T2057: Move code from interface.py to wireguard.py
|
|
Some left over wireguard code was left in the interface.py
file. The code was moved into the wireguard.py file and
the now empty interface.py file removed as no longer holdin
any code.
|
|
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.
|
|
vyos.config: T2180: ignore CLI edit level in show_config
|
|
Adding an already existing IP address on an interface would cause
the 'ip addr add' command to fail. To prevent this, the code checks
if the IP already exists on the interface.
The code was not normalising the different ways of
representing the IPv6 address (trailing 0, ::, etc.).
|
|
|
|
|
|
|
|
Update syntax of component version string, before passing config file to
configtree in migration scripts.
|
|
The VirtualMigrator updates the syntax of the component version string.
Remove the default target, allowing downgrade to old syntax.
|
|
|
|
Commit 627d1c704c83 ("ifconfig: T2057: explicity name state functions")
introduced a new API naming, unfortunately this was nod added for wireless
interfaces.
|
|
|
|
OpenVPN, WIFI, SSTP all had the same boiler plate copied about checking if a
process associated with a pidfile is running or not. This has been migrated to
the common library function vyos.util.process_running().
|
|
when ifconfig.py was broken down in multiple files an import
was missed. This fixes this import
|
|
|
|
|
|
Instead of including all functions/classes from a file, only include the
ones we really need.
|
|
Autoconfigure addresses using Prefix Information in Router Advertisements.
|
|
|
|
... to new XML and Python based frontend/backend.
|
|
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: T2167: get_mac was not returning
|
|
|