summaryrefslogtreecommitdiff
path: root/src/conf_mode/interface-dummy.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-24 18:40:07 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-24 21:53:25 +0200
commit12d0cdf69ba15dccb705e212ea605b692f825dbd (patch)
treee871010d64336f6494ef7f1deb372862b11b342c /src/conf_mode/interface-dummy.py
parent8138766884bb7fe301dc21d2cb0bd3556d169d2e (diff)
downloadvyos-1x-12d0cdf69ba15dccb705e212ea605b692f825dbd.tar.gz
vyos-1x-12d0cdf69ba15dccb705e212ea605b692f825dbd.zip
Python/ifconfig: T1557: refactor Interface 'ifalias' property to set_alias()
Diffstat (limited to 'src/conf_mode/interface-dummy.py')
-rwxr-xr-xsrc/conf_mode/interface-dummy.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/conf_mode/interface-dummy.py b/src/conf_mode/interface-dummy.py
index 1b3fbcc93..2556722fa 100755
--- a/src/conf_mode/interface-dummy.py
+++ b/src/conf_mode/interface-dummy.py
@@ -78,28 +78,28 @@ def generate(dummy):
return None
def apply(dummy):
- du = DummyIf(dummy['intf'])
+ d = DummyIf(dummy['intf'])
# Remove dummy interface
if dummy['deleted']:
- du.remove()
+ d.remove()
else:
# enable interface
- du.state = 'up'
+ d.state = 'up'
# update interface description used e.g. within SNMP
- du.ifalias = dummy['description']
+ d.set_alias(dummy['description'])
# Configure interface address(es)
# - not longer required addresses get removed first
# - newly addresses will be added second
for addr in dummy['address_remove']:
- du.del_addr(addr)
+ d.del_addr(addr)
for addr in dummy['address']:
- du.add_addr(addr)
+ d.add_addr(addr)
# disable interface on demand
if dummy['disable']:
- du.state = 'down'
+ d.state = 'down'
return None