1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Add destination storage option for instance creation from a template.

This commit is contained in:
catborise 2019-01-09 14:16:51 +03:00
parent 1aea7baada
commit fc6761aabc
3 changed files with 25 additions and 4 deletions

View file

@ -134,7 +134,7 @@ def create_instance(request, compute_id):
error_msg = _("Image has already exist. Please check volumes or change instance name")
error_messages.append(error_msg)
else:
clone_path = conn.clone_from_template(data['name'], templ_path, metadata=meta_prealloc)
clone_path = conn.clone_from_template(data['name'], templ_path, data['storage'], metadata=meta_prealloc)
volume = dict()
volume['path'] = clone_path
volume['type'] = conn.get_volume_type(clone_path)