summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-geneve.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-12-31 13:06:17 +0100
committerChristian Poessinger <christian@poessinger.com>2019-12-31 13:06:17 +0100
commitd296eb00cc041b4abb5c0d69151aec61bfc8f87c (patch)
treede56f2b01410f39948f1edccbab1cdfac51adcd7 /src/conf_mode/interfaces-geneve.py
parent68e9026dc33f53ef105aa2f20b777d126a0e3072 (diff)
parent4ebe0e002208b67dd4720a3fa8569557232df7e5 (diff)
downloadvyos-1x-d296eb00cc041b4abb5c0d69151aec61bfc8f87c.tar.gz
vyos-1x-d296eb00cc041b4abb5c0d69151aec61bfc8f87c.zip
Merge branch 't1923-l2tpv3-migration' of github.com:c-po/vyos-1x into current
* 't1923-l2tpv3-migration' of github.com:c-po/vyos-1x: l2tpv3: T1923: support interface deletion l2tpv3: T1923: implementation in XML/Python ifconfig: vxlan: change VXLANIf API ifconfig: geneve: always place interface in A/D state geneve: use proper variable name
Diffstat (limited to 'src/conf_mode/interfaces-geneve.py')
-rwxr-xr-xsrc/conf_mode/interfaces-geneve.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/conf_mode/interfaces-geneve.py b/src/conf_mode/interfaces-geneve.py
index 7322e0c50..b0c381656 100755
--- a/src/conf_mode/interfaces-geneve.py
+++ b/src/conf_mode/interfaces-geneve.py
@@ -111,10 +111,10 @@ def generate(geneve):
def apply(geneve):
# Check if GENEVE interface already exists
if geneve['intf'] in interfaces():
- v = GeneveIf(geneve['intf'])
+ g = GeneveIf(geneve['intf'])
# GENEVE is super picky and the tunnel always needs to be recreated,
# thus we can simply always delete it first.
- v.remove()
+ g.remove()
if not geneve['deleted']:
# GENEVE interface needs to be created on-block
@@ -127,28 +127,28 @@ def apply(geneve):
conf['remote'] = geneve['remote']
# Finally create the new interface
- v = GeneveIf(geneve['intf'], config=conf)
+ g = GeneveIf(geneve['intf'], config=conf)
# update interface description used e.g. by SNMP
- v.set_alias(geneve['description'])
+ g.set_alias(geneve['description'])
# Maximum Transfer Unit (MTU)
- v.set_mtu(geneve['mtu'])
+ g.set_mtu(geneve['mtu'])
# configure ARP cache timeout in milliseconds
- v.set_arp_cache_tmo(geneve['ip_arp_cache_tmo'])
+ g.set_arp_cache_tmo(geneve['ip_arp_cache_tmo'])
# Enable proxy-arp on this interface
- v.set_proxy_arp(geneve['ip_proxy_arp'])
+ g.set_proxy_arp(geneve['ip_proxy_arp'])
# Configure interface address(es) - no need to implicitly delete the
# old addresses as they have already been removed by deleting the
# interface above
for addr in geneve['address']:
- v.add_addr(addr)
+ g.add_addr(addr)
- # As the bond interface is always disabled first when changing
+ # As the GENEVE interface is always disabled first when changing
# parameters we will only re-enable the interface if it is not
# administratively disabled
if not geneve['disable']:
- v.set_state('up')
+ g.set_state('up')
return None