- image_vim_id = vim.new_image(image_dict)
- rollback_list.append({"where":"vim", "vim_id": vim_id, "what":"image","uuid":image_vim_id})
- image_created="true"
+ #image_dict['location']=image_dict.get('new_location') if image_dict['location'] is None
+ if image_dict['location']:
+ image_vim_id = vim.new_image(image_dict)
+ rollback_list.append({"where":"vim", "vim_id": vim_id, "what":"image","uuid":image_vim_id})
+ image_created="true"
+ else:
+ raise vimconn.vimconnException("Cannot create image without location")