mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Changed output format of arp_ip_target from list to comma delimited string
This commit is contained in:
parent
f9fde8f6a7
commit
dc4256f7df
2 changed files with 20 additions and 8 deletions
|
@ -819,9 +819,12 @@ def _parse_settings_bond_0(opts, iface, bond_def):
|
|||
if 'arp_ip_target' in opts:
|
||||
if isinstance(opts['arp_ip_target'], list):
|
||||
if 1 <= len(opts['arp_ip_target']) <= 16:
|
||||
bond.update({'arp_ip_target': []})
|
||||
bond.update({'arp_ip_target': ''})
|
||||
for ip in opts['arp_ip_target']: # pylint: disable=C0103
|
||||
bond['arp_ip_target'].append(ip)
|
||||
if len(bond['arp_ip_target']) > 0:
|
||||
bond['arp_ip_target'] = bond['arp_ip_target'] + ',' + ip
|
||||
else:
|
||||
bond['arp_ip_target'] = ip
|
||||
else:
|
||||
_raise_error_iface(iface, 'arp_ip_target', valid)
|
||||
else:
|
||||
|
@ -892,9 +895,12 @@ def _parse_settings_bond_2(opts, iface, bond_def):
|
|||
if 'arp_ip_target' in opts:
|
||||
if isinstance(opts['arp_ip_target'], list):
|
||||
if 1 <= len(opts['arp_ip_target']) <= 16:
|
||||
bond.update({'arp_ip_target': []})
|
||||
bond.update({'arp_ip_target': ''})
|
||||
for ip in opts['arp_ip_target']: # pylint: disable=C0103
|
||||
bond['arp_ip_target'].append(ip)
|
||||
if len(bond['arp_ip_target']) > 0:
|
||||
bond['arp_ip_target'] = bond['arp_ip_target'] + ',' + ip
|
||||
else:
|
||||
bond['arp_ip_target'] = ip
|
||||
else:
|
||||
_raise_error_iface(iface, 'arp_ip_target', valid)
|
||||
else:
|
||||
|
|
|
@ -276,9 +276,12 @@ def _parse_settings_bond_0(opts, iface, bond_def):
|
|||
if 'arp_ip_target' in opts:
|
||||
if isinstance(opts['arp_ip_target'], list):
|
||||
if 1 <= len(opts['arp_ip_target']) <= 16:
|
||||
bond.update({'arp_ip_target': []})
|
||||
bond.update({'arp_ip_target': ''})
|
||||
for ip in opts['arp_ip_target']: # pylint: disable=C0103
|
||||
bond['arp_ip_target'].append(ip)
|
||||
if len(bond['arp_ip_target']) > 0:
|
||||
bond['arp_ip_target'] = bond['arp_ip_target'] + ',' + ip
|
||||
else:
|
||||
bond['arp_ip_target'] = ip
|
||||
else:
|
||||
_raise_error_iface(iface, 'arp_ip_target', valid)
|
||||
else:
|
||||
|
@ -349,9 +352,12 @@ def _parse_settings_bond_2(opts, iface, bond_def):
|
|||
if 'arp_ip_target' in opts:
|
||||
if isinstance(opts['arp_ip_target'], list):
|
||||
if 1 <= len(opts['arp_ip_target']) <= 16:
|
||||
bond.update({'arp_ip_target': []})
|
||||
bond.update({'arp_ip_target': ''})
|
||||
for ip in opts['arp_ip_target']: # pylint: disable=C0103
|
||||
bond['arp_ip_target'].append(ip)
|
||||
if len(bond['arp_ip_target']) > 0:
|
||||
bond['arp_ip_target'] = bond['arp_ip_target'] + ',' + ip
|
||||
else:
|
||||
bond['arp_ip_target'] = ip
|
||||
else:
|
||||
_raise_error_iface(iface, 'arp_ip_target', valid)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue