Age | Commit message (Collapse) | Author |
|
|
|
|
|
Renamed using snippet below:
----------------------------
for file in $(find . -name "*.py")
do
sed -i "s/vyos_dict_search/dict_search/" $file
done
|
|
|
|
|
|
The current wversion unfortunately will raise a KeyError:
>>> data = {}
>>> vyos_dict_search('foo', data)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/vyos/util.py", line 685, in vyos_dict_search
return dict[path]
KeyError: 'foo'
|
|
|
|
|
|
This is faster implementation then using jmespath.search('foo.bar', dict).
|
|
vyos.template: T2720: Rework vyos.template Python library
|
|
* set system lcd device <device>
* set system lcd model <modeml>
Both device and model have completion helpers for supported interfaces and LCD
displays.
|
|
The current VyOS CLI parser code written in Python contains a ton of duplicates
which I can also hold myself accountable for - or maybe mainly me - depends on
the angle of judge.
While providing a new update() method in vyos.ifconfig.interfaces() this is
extended for bridge interfaces in the derived bridge class.
Signed-off-by: Christian Poessinger <christian@poessinger.com>
|
|
l2tpv3, wireguard, wirelessmodem, nat all require additional Kernel modules
to be present on the system. Each and every interface implemented their own
way of loading a module - by copying code.
Use a generic function, vyos.util.check_kmod() to load any arbitrary kernel
module passed as string or list.
|
|
Extended the chmod() and chown() functions in vyos.util to also operate
on open file descriptors in addition to paths. This allows code that
creates files to quickly change mode and owner even before anything
has actually been written to the file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
template: T2388: move mkdir/chmod/chown within render()
|
|
|
|
debug.noteworthy can be used to record noteworhy event during
the lifetime of the program. Should anything then cause the
program to fail and cause an airbag report to the user,
then this information will also be included.
|
|
add an option to cmd() allowing to define a list of error codes
which are expected when runnin the command. the default is only
to expect zero (no error).
|
|
Do not agreggate stderr with stdout. So if a command reports
a message on stderr but does not report an error, it will
not be send to the user to confuse him.
Explicitely set encoding to utf-8, which does not change
the code behaviour but simplify the code.
|
|
airbag: T2186: generic syslog and better text
|
|
|
|
|
|
|
|
implementations
|
|
|
|
After migrating PowerDNS to systemd and also its configuration files to a
volatile directory in commit 77d725f ("dns-forwarding: T2185: move configuration
files to volatile /run directory") the path for the control file has not
been altered and pushed to the client rec_control binary"
|
|
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.
|
|
|
|
|
|
|
|
Change the code to let stderr passthrough to the screen
as it is the behaviout of os.system and subprocess.call/check_out
The input feature was not working and was fixed
Also always convert '\r\n' to '\n'
|
|
os.system does print the ouput of the command, run() does not.
A new function called call() does the printing and return the error code.
|
|
|
|
airbag: T2186: report friendly user message and log to syslog
|
|
|
|
... to make it clear also directories can be chown(-ed)
|
|
All messages sent to stderr are now logged to syslog.
Also should a raise statement not be handled by the program,
a friendlier message is sent to the user (with the trace to
syslog)
It provide a new debug option: /tmp/vyos.developer.debug
when the file exists and the code raise without being caught up
the program will automatically fall into pdb port-morterm mode
allowing to investigate the reason for the failure
|
|
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.
|
|
|