diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-06-23 21:38:10 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-06-23 21:38:10 +0000 |
| commit | 006cbeb5f145ea0e8ccf51163f4611d784876160 (patch) | |
| tree | bf4aa9db909be23547eeb2eb7fc3448fbbf249e0 /nova/compute | |
| parent | a44f7dfa3af8dc8c605ff52ed536dae8f9ee23bb (diff) | |
| parent | 2ee267b7e463b3f0b7997f5dce91b325610795ab (diff) | |
Accept a full serverRef to OSAPI POST /images (snapshot)
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 3 |
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) |
