summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig_vlan.py
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-03-23 11:50:22 +0000
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-03-23 11:50:22 +0000
commit193d0f416807b3eb5980dcf209e93774282b85f3 (patch)
tree1e7a2597872b04bc8e5af69d32a33b8b7ce4c4e8 /python/vyos/ifconfig_vlan.py
parentf71a7461e44a98e862810bed3d0b9d280ee5dae0 (diff)
downloadvyos-1x-193d0f416807b3eb5980dcf209e93774282b85f3.tar.gz
vyos-1x-193d0f416807b3eb5980dcf209e93774282b85f3.zip
ifconfig: T31: convert all interface to set_vrf api
Diffstat (limited to 'python/vyos/ifconfig_vlan.py')
-rw-r--r--python/vyos/ifconfig_vlan.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/python/vyos/ifconfig_vlan.py b/python/vyos/ifconfig_vlan.py
index 1d57283ac..fe94a5af4 100644
--- a/python/vyos/ifconfig_vlan.py
+++ b/python/vyos/ifconfig_vlan.py
@@ -68,11 +68,8 @@ def apply_vlan_config(vlan, config):
# Maximum Transmission Unit (MTU)
vlan.set_mtu(config['mtu'])
- # assign to VRF
- if config['vrf']:
- vlan.add_vrf(config['vrf'])
- else:
- vlan.del_vrf(config['vrf'])
+ # assign/remove VRF
+ vlan.set_vrf(config['vrf'])
# Change VLAN interface MAC address
if config['mac']: