diff options
author | Christian Breunig <christian@breunig.cc> | 2023-11-15 16:04:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 16:04:59 +0100 |
commit | f021386b8860a20fe774613a616799b059ab45d4 (patch) | |
tree | fbeda4ee436e965db7f3a6e798282ff0d9601581 /python | |
parent | 8c222c3848fe3b094f25d35c212784272616ad69 (diff) | |
parent | 21e4fddeebe541856e25a398018854fb0cf6fbd9 (diff) | |
download | vyos-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')
-rw-r--r-- | python/vyos/utils/network.py | 15 |
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 |