summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorBrian Waldon <brian.waldon@rackspace.com>2011-11-10 21:54:14 -0500
committerBrian Waldon <brian.waldon@rackspace.com>2011-11-10 21:54:14 -0500
commitd29f9e34555c2af2d996cd96e084af4be513a33b (patch)
tree278e0f0c5ba4f660f3238fb33b233574a56dd2be /nova/api
parent59dfaf9e02ff0064a6844c9c986737267317776f (diff)
downloadnova-d29f9e34555c2af2d996cd96e084af4be513a33b.tar.gz
nova-d29f9e34555c2af2d996cd96e084af4be513a33b.tar.xz
nova-d29f9e34555c2af2d996cd96e084af4be513a33b.zip
Converting snapshot/backup to use instance objects
Related to blueprint internal-uuids Change-Id: I8d9768524d36f7066cc1550bba01326dc5167a8d
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: