mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Fixing bug #28372 for use_carrier option on bonding network interfaces.
This commit is contained in:
parent
e07e3f257b
commit
32cffeceb6
@ -865,9 +865,9 @@ def _parse_settings_bond_1(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
@ -948,9 +948,9 @@ def _parse_settings_bond_3(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
@ -992,9 +992,9 @@ def _parse_settings_bond_4(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
@ -1035,9 +1035,9 @@ def _parse_settings_bond_5(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
@ -1071,9 +1071,9 @@ def _parse_settings_bond_6(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
|
@ -322,9 +322,9 @@ def _parse_settings_bond_1(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
@ -405,9 +405,9 @@ def _parse_settings_bond_3(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
@ -449,9 +449,9 @@ def _parse_settings_bond_4(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
@ -492,9 +492,9 @@ def _parse_settings_bond_5(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
@ -528,9 +528,9 @@ def _parse_settings_bond_6(opts, iface, bond_def):
|
||||
|
||||
if 'use_carrier' in opts:
|
||||
if opts['use_carrier'] in _CONFIG_TRUE:
|
||||
bond.update({'use_carrier': 'on'})
|
||||
bond.update({'use_carrier': '1'})
|
||||
elif opts['use_carrier'] in _CONFIG_FALSE:
|
||||
bond.update({'use_carrier': 'off'})
|
||||
bond.update({'use_carrier': '0'})
|
||||
else:
|
||||
valid = _CONFIG_TRUE + _CONFIG_FALSE
|
||||
_raise_error_iface(iface, 'use_carrier', valid)
|
||||
|
Loading…
Reference in New Issue
Block a user