mirror of
https://github.com/valitydev/salt-common.git
synced 2024-11-07 02:45:21 +00:00
sls/xen/bridgeconfig.sls: add type cast in case num is an int.
This commit is contained in:
parent
9b95ed95c0
commit
915f43069a
@ -5,16 +5,17 @@ def mlchap(key, values):
|
||||
changes.append(key + '="' + '''\n\t'''.join(values) + '"\n')
|
||||
|
||||
for br in __salt__['pillar.get']('xen:xenbrs', []):
|
||||
mlchap('bridge_xenbr' + br['num'], br['ifaces'])
|
||||
mlchap('config_xenbr' + br['num'], (br['config'],))
|
||||
mlchap('config_brctl' + br['num'], (br['brctl'],))
|
||||
mlchap('rc_net_xenbr' + br['num'] + '_provide', ('!net',))
|
||||
mlchap('rc_net_xenbr' + br['num'] + '_need', (br['need'],))
|
||||
mlchap('rc_xendomains_use', ('net.xenbr' + br['num'],))
|
||||
state('/etc/init.d/net.xenbr' + br['num']).file.symlink(target='net.lo').\
|
||||
num = str(br['num'])
|
||||
mlchap('bridge_xenbr' + num, br['ifaces'])
|
||||
mlchap('config_xenbr' + num, (br['config'],))
|
||||
mlchap('config_brctl' + num, (br['brctl'],))
|
||||
mlchap('rc_net_xenbr' + num + '_provide', ('!net',))
|
||||
mlchap('rc_net_xenbr' + num + '_need', (br['need'],))
|
||||
mlchap('rc_xendomains_use', ('net.xenbr' + num,))
|
||||
state('/etc/init.d/net.xenbr' + num).file.symlink(target='net.lo').\
|
||||
require(file='set-xenbridges-conf')
|
||||
state('net.xenbr' + br['num']).service.running(enable=True).\
|
||||
require(file='/etc/init.d/net.xenbr' + br['num'])
|
||||
state('net.xenbr' + num).service.running(enable=True).\
|
||||
require(file='/etc/init.d/net.xenbr' + num)
|
||||
|
||||
state('set-xenbridges-conf').file.blockreplace(
|
||||
name='/etc/conf.d/net',
|
||||
|
Loading…
Reference in New Issue
Block a user