Commit adf31013 authored by Stratos Psomadakis's avatar Stratos Psomadakis

Use img['checksum'] as origin disk param.

Use the img['checksum'], instead of img['backend_id'] as the origin disk
paramater, as neede by the new archipelago code (and drop support for the old
one).
parent cfa6540a
......@@ -295,6 +295,7 @@ def create_server(request):
properties = img.get('properties', {})
image['backend_id'] = img['location']
image['format'] = img['disk_format']
image['checksum'] = img['checksum']
image['metadata'] = dict((key.upper(), val) \
for key, val in properties.items())
......
......@@ -312,7 +312,7 @@ def create_instance(vm, public_nic, flavor, image, password, personality):
kw['disks'][0]['provider'] = provider
if provider == 'vlmc':
kw['disks'][0]['origin'] = image['backend_id']
kw['disks'][0]['origin'] = image['checksum']
kw['nics'] = [public_nic]
if settings.GANETI_USE_HOTPLUG:
......@@ -339,7 +339,7 @@ def create_instance(vm, public_nic, flavor, image, password, personality):
if personality:
kw['osparams']['img_personality'] = json.dumps(personality)
if provider != None and provider == 'vlmc':
if provider == 'vlmc':
kw['osparams']['img_id'] = 'null'
kw['osparams']['img_properties'] = json.dumps(image['metadata'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment