diff options
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 |