summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_dns_dynamic.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-06 12:09:57 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-06 12:09:57 +0200
commitacc6e461a92b14091fef9f49514f26364579391d (patch)
tree51ce0e7efd5c3e202157f3373cda50051508aa2e /smoketest/scripts/cli/test_service_dns_dynamic.py
parent9d0c37fbbc91acc9f2c0f2abaab360479e451f0f (diff)
downloadvyos-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