diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-24 19:03:57 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-24 21:53:25 +0200 |
commit | 065adc3ab2ee6262b4a1a85762697ac81fc5b084 (patch) | |
tree | 0e23be39c2c7225063c74c2203b2ddd4c383e5e3 /src/conf_mode/interface-bonding.py | |
parent | 09f4553ffdbf3c35696f08118d75793db33cb59b (diff) | |
download | vyos-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-bonding.py')
-rwxr-xr-x | src/conf_mode/interface-bonding.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/interface-bonding.py b/src/conf_mode/interface-bonding.py index 0fd19ce1e..c7adb0f9a 100755 --- a/src/conf_mode/interface-bonding.py +++ b/src/conf_mode/interface-bonding.py @@ -95,9 +95,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 @@ -337,7 +337,7 @@ def apply(bond): else: # Some parameters can not be changed when the bond is up. # Always disable the bond prior changing anything - b.state = 'down' + b.set_state('down') # The bonding mode can not be changed when there are interfaces enslaved # to this bond, thus we will free all interfaces from the bond first! @@ -407,7 +407,7 @@ def apply(bond): # parameters we will only re-enable the interface if it is not # administratively disabled if not bond['disable']: - b.state = 'up' + b.set_state('up') # Configure interface address(es) # - not longer required addresses get removed first |