summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/servers.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index ba9dd4ec3..dd784043a 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -568,8 +568,10 @@ class Controller(object):
msg = _("Invalid metadata")
raise exc.HTTPBadRequest(explanation=msg)
+ instance = self._get_server(context, instance_id)
+
image = self.compute_api.backup(context,
- instance_id,
+ instance,
image_name,
backup_type,
rotation,
@@ -846,9 +848,11 @@ class Controller(object):
msg = _("Invalid metadata")
raise exc.HTTPBadRequest(explanation=msg)
+ instance = self._get_server(context, instance_id)
+
try:
image = self.compute_api.snapshot(context,
- instance_id,
+ instance,
image_name,
extra_properties=props)
except exception.InstanceBusy: