mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #6936 from kaptk2/develop
Added ability to specify boot order
This commit is contained in:
commit
0a8ce6a7ad
@ -197,7 +197,7 @@ def _gen_xml(name,
|
||||
<memory unit='KiB'>%%MEM%%</memory>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
%%BOOT%%
|
||||
</os>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
@ -219,6 +219,16 @@ def _gen_xml(name,
|
||||
data = data.replace('%%MEM%%', str(mem))
|
||||
data = data.replace('%%VDA%%', vda)
|
||||
data = data.replace('%%DISKTYPE%%', _image_type(vda))
|
||||
boot_str = ''
|
||||
if 'boot_dev' in kwargs:
|
||||
for dev in boot_dev:
|
||||
boot_part = '''<boot dev='%%DEV%%' />
|
||||
'''
|
||||
boot_part = boot_part.replace('%%DEV%%', dev)
|
||||
boot_str += boot_part
|
||||
else:
|
||||
boot_str = '''<boot dev='hd'/>'''
|
||||
data = data.replace('%%BOOT%%', boot_str)
|
||||
nic_str = ''
|
||||
for dev, args in nicp.items():
|
||||
nic_t = '''
|
||||
|
Loading…
Reference in New Issue
Block a user