summaryrefslogtreecommitdiff
path: root/src/conf_mode/interface-dummy.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-24 19:03:57 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-24 21:53:25 +0200
commit065adc3ab2ee6262b4a1a85762697ac81fc5b084 (patch)
tree0e23be39c2c7225063c74c2203b2ddd4c383e5e3 /src/conf_mode/interface-dummy.py
parent09f4553ffdbf3c35696f08118d75793db33cb59b (diff)
downloadvyos-1x-065adc3ab2ee6262b4a1a85762697ac81fc5b084.tar.gz
vyos-1x-065adc3ab2ee6262b4a1a85762697ac81fc5b084.zip
Python/ifconfig: T1557: refactor Interface 'state' property to set_state()/get_state()
Diffstat (limited to 'src/conf_mode/interface-dummy.py')
-rwxr-xr-xsrc/conf_mode/interface-dummy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interface-dummy.py b/src/conf_mode/interface-dummy.py
index 2556722fa..16b716e61 100755
--- a/src/conf_mode/interface-dummy.py
+++ b/src/conf_mode/interface-dummy.py
@@ -84,8 +84,6 @@ def apply(dummy):
if dummy['deleted']:
d.remove()
else:
- # enable interface
- d.state = 'up'
# update interface description used e.g. within SNMP
d.set_alias(dummy['description'])
@@ -99,7 +97,9 @@ def apply(dummy):
# disable interface on demand
if dummy['disable']:
- d.state = 'down'
+ d.set_state('down')
+ else
+ d.set_state('up')
return None