Don't stacktrace if local_disk isn't set

This commit is contained in:
rallytime 2015-09-16 17:07:41 -06:00
parent fe74d203f5
commit 54e104cf5b

View File

@ -275,10 +275,14 @@ def create(vm_):
'domain': vm_['domain'],
'startCpus': vm_['cpu_number'],
'maxMemory': vm_['ram'],
'localDiskFlag': vm_['local_disk'],
'hourlyBillingFlag': vm_['hourly_billing'],
}
local_disk_flag = config.get_cloud_config_value(
'local_disk', vm_, __opts__, default=False
)
kwargs['localDiskFlag'] = local_disk_flag
if 'image' in vm_:
kwargs['operatingSystemReferenceCode'] = vm_['image']
kwargs['blockDevices'] = []