Age | Commit message (Collapse) | Author |
|
Also adds check for the charon socket instead of an arbitrary sleep()
|
|
vyos.util method `dict_search_args` to allow for dot characters in keys.
|
|
Keep the vyos.util function clean and not pull in the rest of the world
when importing it.
|
|
|
|
Remove python3-crypto dependency.
|
|
The IPSec ceritifcate handling is now done by storing the CA key inside the
running configuration.
|
|
* 'pki_ipsec' of https://github.com/sarthurdev/vyos-1x:
pki: ipsec: T3642: Update migration script to account for file permission issues
pki: ipsec: T3642: Migrate IPSec to use PKI configuration
pki: T3642: New PKI config and management
|
|
Commit 5303ec39 ("vyos.util: add new helper copy_file()") added a new helper
function to copy a file from A -> B and create the destination directory if
required. It did also throw an excpetion if the destination file already
existed and consisted of the same file - this is now ignored and we always
copy the source to the destination.
|
|
|
|
Copy a file from A -> B but also support adjusting Bs file permissions
and creation of Bs base directory if required.
|
|
|
|
|
|
Implementing a wrapper which will - based on the command - add a sudo prefix
to the execution string seemed to be a nice idea but unfortunately it did not
only not get momentum but also the codebase somethis added an implicit "sudo"
call a second time.
This resulted in a call: "sudo sudo systemctl"
The entire functionality was removed again and if an op-mode script requires
root priviledges it must be explicitly called with them - no black magic.
|
|
|
|
|
|
|
|
The helper will return a dict in form:
{'red': {'table': 1000}, 'blue': {'table': 2000}}
|
|
There had been four implementations of "ip -d -j link show interface" scattered
accross the codebase. Those implementations have now been combined into a new
helper:
vyos.util.get_json_iface_options()
|
|
|
|
|
|
|
|
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
|