diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-02-21 18:25:05 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-02-21 18:25:05 +0100 |
commit | c3661c8d5d7e8f5c1d040cadf134e87f0d77e28e (patch) | |
tree | 90dcdf81a6bd67cdc1dd778f346561d9039bcb0e /python/vyos | |
parent | 3a605ad020d8d20b08a72cb1284f6e590d1fd7b5 (diff) | |
download | vyos-1x-c3661c8d5d7e8f5c1d040cadf134e87f0d77e28e.tar.gz vyos-1x-c3661c8d5d7e8f5c1d040cadf134e87f0d77e28e.zip |
smoketest: vxlan: T4120: verify support for multiple remote addresses
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/util.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py index 1767ff9d3..4526375df 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -774,6 +774,14 @@ def dict_search_recursive(dict_object, key): for x in dict_search_recursive(j, key): yield x +def get_bridge_fdb(interface): + """ Returns the forwarding database entries for a given interface """ + if not os.path.exists(f'/sys/class/net/{interface}'): + return None + from json import loads + tmp = loads(cmd(f'bridge -j fdb show dev {interface}')) + return tmp + def get_interface_config(interface): """ Returns the used encapsulation protocol for given interface. If interface does not exist, None is returned. |