summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-16 15:17:13 +0100
committerGitHub <noreply@github.com>2023-11-16 15:17:13 +0100
commitccf8a0a0466cb8540705e1b1518c8b4ab9e8363d (patch)
tree90eaeb7a98b8153bd28109e227af20df362a6d79 /python/vyos/ifconfig
parentc1754c4c0610824d54d03b5408ade26112bd643f (diff)
parentbd873274d462f43d4e7ed100726930326139ee74 (diff)
downloadvyos-1x-ccf8a0a0466cb8540705e1b1518c8b4ab9e8363d.tar.gz
vyos-1x-ccf8a0a0466cb8540705e1b1518c8b4ab9e8363d.zip
Merge pull request #2494 from vyos/mergify/bp/sagitta/pr-2491
T5747: op-mode add show interfaces summary (backport #2491)
Diffstat (limited to 'python/vyos/ifconfig')
-rw-r--r--python/vyos/ifconfig/interface.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index 41ce352ad..b8f947d65 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -569,6 +569,16 @@ class Interface(Control):
self.set_interface('netns', netns)
+ def get_vrf(self):
+ """
+ Get VRF from interface
+
+ Example:
+ >>> from vyos.ifconfig import Interface
+ >>> Interface('eth0').get_vrf()
+ """
+ return self.get_interface('vrf')
+
def set_vrf(self, vrf):
"""
Add/Remove interface from given VRF instance.