mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
should make Name tag only default if the user has not defined it in the cloud configuration file
This commit is contained in:
parent
61a74b68a4
commit
bd22b9a9ac
@ -2876,12 +2876,14 @@ def create(vm_=None, call=None):
|
||||
for k, v in six.iteritems(ret['blockDeviceMapping']):
|
||||
if isinstance(v, dict):
|
||||
if v['deviceName'] in ex_blockdevicetags:
|
||||
ex_blockdevicetags[v['deviceName']]['Name'] = vm_['name']
|
||||
if not 'Name' in ex_blockdevicetags[v['deviceName']]:
|
||||
ex_blockdevicetags[v['deviceName']]['Name'] = vm_['name']
|
||||
block_device_volume_id_map[v[ret['rootDeviceType']]['volumeId']] = ex_blockdevicetags[v['deviceName']]
|
||||
else:
|
||||
for _d in v:
|
||||
if _d['deviceName'] in ex_blockdevicetags:
|
||||
ex_blockdevicetags[_d['deviceName']]['Name'] = vm_['name']
|
||||
if not 'Name' in ex_blockdevicetags[_d['deviceName']]:
|
||||
ex_blockdevicetags[_d['deviceName']]['Name'] = vm_['name']
|
||||
block_device_volume_id_map[_d[ret['rootDeviceType']]['volumeId']] = ex_blockdevicetags[_d['deviceName']]
|
||||
|
||||
if block_device_volume_id_map:
|
||||
|
Loading…
Reference in New Issue
Block a user