diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-03-27 18:10:49 +0000 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-03-28 10:17:31 +0000 |
commit | 627d1c704c83efe973b16db61005aacb1a96aead (patch) | |
tree | 8fc2eb43bcaaf31d90985e3736248e958a26b4ce /python/vyos/ifconfig/bond.py | |
parent | 583e9d907236a4a98fe40e97a378c1fb655f8a95 (diff) | |
download | vyos-1x-627d1c704c83efe973b16db61005aacb1a96aead.tar.gz vyos-1x-627d1c704c83efe973b16db61005aacb1a96aead.zip |
ifconfig: T2057: explicity name state functions
The Interface get_state/set_state were not clear about
if they edited the admin or operational state.
functions are now using admin_state and oper_state
for clarity.
Diffstat (limited to 'python/vyos/ifconfig/bond.py')
-rw-r--r-- | python/vyos/ifconfig/bond.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/bond.py b/python/vyos/ifconfig/bond.py index 3c26b9b95..e2ff71490 100644 --- a/python/vyos/ifconfig/bond.py +++ b/python/vyos/ifconfig/bond.py @@ -101,7 +101,7 @@ class BondIf(Interface): for s in self.get_slaves(): slave = { 'ifname': s, - 'state': Interface(s).get_state() + 'state': Interface(s).get_admin_state() } slave_list.append(slave) @@ -112,7 +112,7 @@ class BondIf(Interface): # physical interface for slave in slave_list: i = Interface(slave['ifname']) - i.set_state(slave['state']) + i.set_admin_state(slave['state']) def set_hash_policy(self, mode): """ @@ -211,7 +211,7 @@ class BondIf(Interface): # An interface can only be added to a bond if it is in 'down' state. If # interface is in 'up' state, the following Kernel error will be thrown: # bond0: eth1 is up - this may be due to an out of date ifenslave. - Interface(interface).set_state('down') + Interface(interface).set_admin_state('down') return self.set_interface('bond_add_port', f'+{interface}') def del_port(self, interface): |