diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-06-17 13:39:34 -0400 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-06-17 13:39:34 -0400 |
| commit | bfbb2b8e04d1cd4b761c67973b173d2ca6f84859 (patch) | |
| tree | fe04871eac8a46e6b7b86e25a53c556716bc981d /nova/compute | |
| parent | 556f467bf0065331cdbb5c5e20fe33dca1239a64 (diff) | |
adding extra image service properties to compute api snapshot; adding instance_ref property
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 e2c4cf8d7..86e2b116e 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -619,7 +619,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 @@ -627,6 +627,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) |
