diff options
| author | Rick Harris <rick.harris@rackspace.com> | 2011-01-06 23:38:01 -0600 |
|---|---|---|
| committer | Rick Harris <rick.harris@rackspace.com> | 2011-01-06 23:38:01 -0600 |
| commit | 8de96296dfb22d0e6c491fcaf072210dfbaa67e8 (patch) | |
| tree | e83fb153ee36615966f6905c4eef99a9d2db7efc /nova/api | |
| parent | 3bf9bc6f6c0fbf90e3f4eab68a9bd99d85fcc422 (diff) | |
| download | nova-8de96296dfb22d0e6c491fcaf072210dfbaa67e8.tar.gz nova-8de96296dfb22d0e6c491fcaf072210dfbaa67e8.tar.xz nova-8de96296dfb22d0e6c491fcaf072210dfbaa67e8.zip | |
Removing some FIXMEs
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/images.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py index 4d1af77d9..a826b8435 100644 --- a/nova/api/openstack/images.py +++ b/nova/api/openstack/images.py @@ -76,7 +76,14 @@ def _translate_status(item): 'decrypting': 'preparing', 'untarring': 'saving', 'available': 'active'} - item['status'] = status_mapping[item['status']] + try: + item['status'] = status_mapping[item['status']] + except KeyError: + # TODO(sirp): Performing translation of status (if necessary) here for + # now. Perhaps this should really be done in EC2 API and + # S3ImageService + pass + return item @@ -115,8 +122,7 @@ class Controller(wsgi.Controller): items = self._service.index(req.environ['nova.context']) items = common.limited(items, req) items = [_translate_keys(item) for item in items] - #TODO(sirp): removing for glance - #items = [_translate_status(item) for item in items] + items = [_translate_status(item) for item in items] return dict(images=items) def show(self, req, id): @@ -132,11 +138,10 @@ class Controller(wsgi.Controller): env = self._deserialize(req.body, req) instance_id = env["image"]["serverId"] name = env["image"]["name"] - + image_meta = compute_api.ComputeAPI().snapshot( context, instance_id, name) - #TODO(sirp): need to map Glance attrs to OpenStackAPI attrs return dict(image=image_meta) def update(self, req, id): |
