diff options
| author | Rick Harris <rick.harris@rackspace.com> | 2011-01-17 11:21:56 -0600 |
|---|---|---|
| committer | Rick Harris <rick.harris@rackspace.com> | 2011-01-17 11:21:56 -0600 |
| commit | 523d7788acd6ecb0835dfda73d4cd5540a651a85 (patch) | |
| tree | 91713530a237669387e575d5a8002bcacc60002f /nova/compute | |
| parent | b5445da21b9ae91308e2adecc7aaa8e56e278d50 (diff) | |
| download | nova-523d7788acd6ecb0835dfda73d4cd5540a651a85.tar.gz nova-523d7788acd6ecb0835dfda73d4cd5540a651a85.tar.xz nova-523d7788acd6ecb0835dfda73d4cd5540a651a85.zip | |
Returning image_metadata from snapshot()
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index d3fa4d786..d5c70e0cd 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -361,7 +361,7 @@ class API(base.Base): :param params: Optional dictionary of arguments to be passed to the compute worker - :retval Result returned by compute worker + :retval: Result returned by compute worker """ if not params: params = {} @@ -374,12 +374,16 @@ class API(base.Base): return rpc.call(context, queue, kwargs) def snapshot(self, context, instance_id, name): - """Snapshot the given instance.""" + """Snapshot the given instance. + + :retval: A dict containing image metadata + """ data = {'name': name, 'is_public': False} image_meta = self.image_service.create(context, data) params = {'image_id': image_meta['id']} self._cast_compute_message('snapshot_instance', context, instance_id, params=params) + return image_meta def reboot(self, context, instance_id): """Reboot the given instance.""" |
