summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-12 10:10:52 +0100
committerGitHub <noreply@github.com>2023-11-12 10:10:52 +0100
commit45ac050b914d8fbbc64f3492ec7aed80d710643c (patch)
tree129ce4d073d74f053c2a810bd23e97f9c34c6f91 /python
parente5a53d48cf149facb30410c25e55ab3780205186 (diff)
parentc0de93d37354ec89f44dde7f1b5a4c8af550a019 (diff)
downloadvyos-1x-45ac050b914d8fbbc64f3492ec7aed80d710643c.tar.gz
vyos-1x-45ac050b914d8fbbc64f3492ec7aed80d710643c.zip
Merge pull request #2435 from bbabich/current
mtr: T5658: Add VRF support for mtr (+ op_mode wrapper)
Diffstat (limited to 'python')
-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 9354bd495..5d19f256b 100644
--- a/python/vyos/utils/network.py
+++ b/python/vyos/utils/network.py
@@ -197,6 +197,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