diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-02-12 18:30:23 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-02-12 18:30:23 +0000 |
commit | a55bbcc8ec25a3616b7f6396ee14168a707f18eb (patch) | |
tree | 99703870bbcb6ef37902c5905a7f52f17891129e /src/validators/range | |
parent | c99c1127d3bc49b67e472e03fcd7f9930407f20d (diff) | |
download | vyos-1x-a55bbcc8ec25a3616b7f6396ee14168a707f18eb.tar.gz vyos-1x-a55bbcc8ec25a3616b7f6396ee14168a707f18eb.zip |
T4999: Backport vyos util dict_search_recursive
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.
Diffstat (limited to 'src/validators/range')
0 files changed, 0 insertions, 0 deletions