summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorBrian Waldon <brian.waldon@rackspace.com>2011-06-23 21:38:10 +0000
committerTarmac <>2011-06-23 21:38:10 +0000
commit006cbeb5f145ea0e8ccf51163f4611d784876160 (patch)
treebf4aa9db909be23547eeb2eb7fc3448fbbf249e0 /nova/compute
parenta44f7dfa3af8dc8c605ff52ed536dae8f9ee23bb (diff)
parent2ee267b7e463b3f0b7997f5dce91b325610795ab (diff)
Accept a full serverRef to OSAPI POST /images (snapshot)
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index a7ea88d51..593a16a1f 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -701,7 +701,7 @@ class API(base.Base):
raise exception.Error(_("Unable to find host for Instance %s")
% instance_id)
- def snapshot(self, context, instance_id, name):
+ def snapshot(self, context, instance_id, name, extra_properties=None):
"""Snapshot the given instance.
:returns: A dict containing image metadata
@@ -709,6 +709,7 @@ class API(base.Base):
properties = {'instance_id': str(instance_id),
'user_id': str(context.user_id),
'image_state': 'creating'}
+ properties.update(extra_properties or {})
sent_meta = {'name': name, 'is_public': False,
'status': 'creating', 'properties': properties}
recv_meta = self.image_service.create(context, sent_meta)