summaryrefslogtreecommitdiff
path: root/src/conf_mode/interface-ethernet.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-ethernet.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-ethernet.py')
-rwxr-xr-xsrc/conf_mode/interface-ethernet.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py
index cc9f44753..99450b19e 100755
--- a/src/conf_mode/interface-ethernet.py
+++ b/src/conf_mode/interface-ethernet.py
@@ -78,9 +78,9 @@ def apply_vlan_config(vlan, config):
# enable/disable VLAN interface
if config['disable']:
- vlan.state = 'down'
+ vlan.set_state('down')
else:
- vlan.state = 'up'
+ vlan.set_state('up')
# Configure interface address(es)
# - not longer required addresses get removed first
@@ -318,9 +318,9 @@ def apply(eth):
# Enable/Disable interface
if eth['disable']:
- e.state = 'down'
+ e.set_state('down')
else:
- e.state = 'up'
+ e.set_state('up')
# Configure interface address(es)
# - not longer required addresses get removed first