diff options
author | Christian Breunig <christian@breunig.cc> | 2023-11-16 15:17:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 15:17:13 +0100 |
commit | ccf8a0a0466cb8540705e1b1518c8b4ab9e8363d (patch) | |
tree | 90eaeb7a98b8153bd28109e227af20df362a6d79 /python/vyos/ifconfig | |
parent | c1754c4c0610824d54d03b5408ade26112bd643f (diff) | |
parent | bd873274d462f43d4e7ed100726930326139ee74 (diff) | |
download | vyos-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.py | 10 |
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. |