diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-02-21 18:25:05 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-02-21 19:25:01 +0100 |
commit | f1bb5f2f8e1fdb2aad996126f28bc09a4899fb11 (patch) | |
tree | 527f75cae8a8c726f1a440bbcad2547d4521dc5f /python | |
parent | 928071d90091511baf49874e6003ceef30bb829b (diff) | |
download | vyos-1x-f1bb5f2f8e1fdb2aad996126f28bc09a4899fb11.tar.gz vyos-1x-f1bb5f2f8e1fdb2aad996126f28bc09a4899fb11.zip |
smoketest: vxlan: T4120: verify support for multiple remote addresses
(cherry picked from commit c3661c8d5d7e8f5c1d040cadf134e87f0d77e28e)
Diffstat (limited to 'python')
-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 149deabc4..76ba0fb60 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -694,6 +694,14 @@ def dict_search(path, dict_object): c = c.get(p, {}) return c.get(parts[-1], None) +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. |