summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Waldon <bcwaldon@gmail.com>2012-01-12 22:08:04 -0800
committerBrian Waldon <bcwaldon@gmail.com>2012-01-12 22:10:35 -0800
commit841d473b78454a25506b2ffabe00ba85dee7343a (patch)
treeea30383b7d0e6bcf40544dee06e309fb6baf22bc
parent6d80851279052a30b98e465106f158cb2afdb6a5 (diff)
Remove 'status' from default snapshot properties
* status is only used by our ec2 api * clean up the _create_image code Change-Id: I2ed43b3b42bb74bb4ccea795f77d66c425ab9e64
-rw-r--r--nova/compute/api.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 3630a3ec2..0ed562a1b 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -1199,14 +1199,12 @@ class API(base.Base):
'image_type': image_type,
}
+ sent_meta = {'name': name, 'is_public': False}
+
if image_type == 'backup':
properties['backup_type'] = backup_type
- properties.update(extra_properties or {})
- sent_meta = {'name': name, 'is_public': False,
- 'status': 'creating', 'properties': properties}
-
- if image_type == 'snapshot':
+ elif image_type == 'snapshot':
min_ram, min_disk = self._get_minram_mindisk_params(context,
instance)
if min_ram is not None:
@@ -1214,6 +1212,9 @@ class API(base.Base):
if min_disk is not None:
sent_meta['min_disk'] = min_disk
+ properties.update(extra_properties or {})
+ sent_meta['properties'] = properties
+
recv_meta = self.image_service.create(context, sent_meta)
params = {'image_id': recv_meta['id'], 'image_type': image_type,
'backup_type': backup_type, 'rotation': rotation}