Age | Commit message (Collapse) | Author |
|
(cherry picked from commit 364009e4317fb5c6732635726b511613aa2ed519)
|
|
(cherry picked from commit 52cb6185a4a51ffa92f10e0ded55a943bc21bc60)
|
|
(cherry picked from commit c3661c8d5d7e8f5c1d040cadf134e87f0d77e28e)
|
|
(cherry picked from commit b40315b3c5051888f499961e63410e14c5d1bad7)
|
|
|
|
|
|
interfaces
|
|
Required by the vyos.ifconfig library - backported from 1.4 (current)
|
|
implementations
(cherry picked from commit 9d0c37fbbc91acc9f2c0f2abaab360479e451f0f)
|
|
commit_in_progress()
(cherry picked from commit a74e67a778a6c698e44cbc6c5d184d03c9c12396)
|
|
|
|
|
|
|
|
Keep the vyos.util function clean and not pull in the rest of the world
when importing it.
|
|
When waiting for processes that don't take long,
we need add an inotify watcher _before_ starting that process.
The pre-hook arguments allows the user to pass a () -> () anonymous function
to be called before adding a watch.
|
|
|
|
|
|
Replace function get_interface_config to
function get_interface_config, as we have
in 1.4 branch.
It need after this cherry-picked commit edcdea8
|
|
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.
(cherry picked from commit b76931e6d3a4bd0cdb74ca447a746ab6855fcf55)
|
|
(cherry picked from commit e96932cbd99f508f9f5c24b207b5650aa8817e45)
|
|
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()
(cherry picked from commit f13cc56d665a91ff3fac47df260301afefb1a3a5)
|
|
(cherry picked from commit 55c5d662290aea9f2c3abe911bd9920f4f9d7d9a)
|
|
|
|
|
|
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.
|