From d29f9e34555c2af2d996cd96e084af4be513a33b Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Thu, 10 Nov 2011 21:54:14 -0500 Subject: Converting snapshot/backup to use instance objects Related to blueprint internal-uuids Change-Id: I8d9768524d36f7066cc1550bba01326dc5167a8d --- nova/api/openstack/servers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nova/api') 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: -- cgit