summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-15 16:04:59 +0100
committerGitHub <noreply@github.com>2023-11-15 16:04:59 +0100
commitf021386b8860a20fe774613a616799b059ab45d4 (patch)
treefbeda4ee436e965db7f3a6e798282ff0d9601581 /python/vyos
parent8c222c3848fe3b094f25d35c212784272616ad69 (diff)
parent21e4fddeebe541856e25a398018854fb0cf6fbd9 (diff)
downloadvyos-1x-f021386b8860a20fe774613a616799b059ab45d4.tar.gz
vyos-1x-f021386b8860a20fe774613a616799b059ab45d4.zip
Merge pull request #2474 from vyos/mergify/bp/sagitta/pr-2435
mtr: T5658: Add VRF support for mtr (+ op_mode wrapper) (backport #2435)
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/utils/network.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/vyos/utils/network.py b/python/vyos/utils/network.py
index 157530cc1..3b5e146e1 100644
--- a/python/vyos/utils/network.py
+++ b/python/vyos/utils/network.py
@@ -194,6 +194,21 @@ def get_all_vrfs():
data[name] = entry
return data
+def interface_list() -> list:
+ """
+ Get list of interfaces in system
+ :rtype: list
+ """
+ return Section.interfaces()
+
+
+def vrf_list() -> list:
+ """
+ Get list of VRFs in system
+ :rtype: list
+ """
+ return list(get_all_vrfs().keys())
+
def mac2eui64(mac, prefix=None):
"""
Convert a MAC address to a EUI64 address or, with prefix provided, a full