Age | Commit message (Collapse) | Author |
|
Backport "dict_search_recursive" from vyos.util 1.4 to 1.3
data = {
'interfaces': {'dummy': {'dum0': {'address': ['192.0.2.17/29']}},
'ethernet': {'eth0': {'address': ['2001:db8::1/64', '192.0.2.1/29'],
'description': 'Test123',
'duplex': 'auto',
'hw_id': '00:00:00:00:00:01',
'speed': 'auto'},
'eth1': {'address': ['192.0.2.9/29'],
'description': 'Test456',
'duplex': 'auto',
'hw_id': '00:00:00:00:00:02',
'speed': 'auto'}}}
}
dict_search_recursive(data, 'hw_id') will yield both '00:00:00:00:00:01' and
'00:00:00:00:00:02' as generator object.
|
|
|
|
(cherry picked from commit df0fbfeedce0f163e9d10be21d58ad4dc797a28a)
|
|
(cherry picked from commit 99b1d9ee28d11d43840f9e2c1c9e8bda1176d866)
|
|
(cherry picked from commit bddeae3755c8d83f4c47bc3b3798858a95427530)
|
|
In addition to commit cf1156a60e ("ethernet: T3163: probe driver for maximum
rx/tx ring-buffer size") this extends the logic in a way as not every driver
supports setting the buffers at all so it will properly error out.
When invoking "ethtool -g" both stdout and stderr are captured and no exception
is raised if it's an unsupported driver feature. The verify() section will
inform the user about the illegal operation.
(cherry picked from commit 159899ed9ba5661e4bdcfdadf1292e237f117063)
|
|
|
|
reconfiguration"
This reverts commit d247736f67cc056062b75a4215a031bebcfee2ee.
We need to clean link-local IPv6 addresses on link reconfiguration to also drop
no longer existing link-local addresse son MAC address change.
|
|
|
|
|
|
We had two places were the is_ip, is_ipv4 and is_ipv6 helpers had been defined.
All places now have been converged into vyos.template as they are used both
in the Jinja2 templates and also in our scripts.
|
|
Re-organize the template code and add addtitional Jinja2 filters for processing
the ifconfig-pool statement. This reverts the changes from commit 7e546be9
("openvpn: T2994: temporary revert to 1.2 crux behavior for client pools").
|
|
Test additional network combinations of address and prefixes.
|
|
Remove workaround which split (local|remote)_address and also subnet keys into
individual keys for the assigned IP address family (4/6).
During template rendering check IP version by introducing new ipv4 and ipv6
Jinja2 filters {% if foo | ipv4 %} or {% if bar | ipv6 %} options.
|
|
After renaming the function in commit 25551c5a ("vyos.util: T2995: rename
vyos_dict_search() -> dict_search()"), the test case should be renamed, too.
|
|
|
|
|
|
|
|
Renamed using snippet below:
----------------------------
for file in $(find . -name "*.py")
do
sed -i "s/vyos_dict_search/dict_search/" $file
done
|
|
|
|
|
|
This reverts commit 9939139ba4ad18dc4b62a827d8ab7b74d0c28124.
Unfortunately this test does not work within the CI system. It fails with:
17:21:35 ======================================================================
17:21:35 FAIL: test_process_named_running (test_util.TestVyOSUtil)
17:21:35 ----------------------------------------------------------------------
17:21:35 Traceback (most recent call last):
17:21:35 File "/var/lib/jenkins/jenkins_slave/workspace/vyos-1x_current/build/src/tests/test_util.py", line 34, in test_process_named_running
17:21:35 self.assertTrue(isinstance(pid, int))
17:21:35 AssertionError: False is not true
As process_named_running() returns None on non existing bash process
|
|
|
|
|
|
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 reverts commit 4b2c57f4ba08409b4b6ba459fa8a3d23c5f6990c.
|
|
|
|
|
|
|
|
|
|
Commit 3d3eccd687 ("T1174: migrate local hostname/DNS handling to vyos-1x")
changed a lot of the internal data handling for setting the systems host
and domain name information.
|
|
Also improve sanity checks in the rename function and add unit tests
for copy and rename.
|
|
|
|
|
|
This reverts commit 0d80b06ccd33fc2a0001b8641ce45070f0e8726d.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with VyOS paths.
|
|
|