diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-06 12:09:57 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-06 12:09:57 +0200 |
commit | acc6e461a92b14091fef9f49514f26364579391d (patch) | |
tree | 51ce0e7efd5c3e202157f3373cda50051508aa2e /smoketest/scripts/cli/test_service_dns_dynamic.py | |
parent | 9d0c37fbbc91acc9f2c0f2abaab360479e451f0f (diff) | |
download | vyos-1x-acc6e461a92b14091fef9f49514f26364579391d.tar.gz vyos-1x-acc6e461a92b14091fef9f49514f26364579391d.zip |
vyos.util: add function to search a key recursively in a dictionary
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 'smoketest/scripts/cli/test_service_dns_dynamic.py')
0 files changed, 0 insertions, 0 deletions