summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-09-12 22:46:43 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-09-12 22:46:43 +0000
commit0fd5de705c0cd2d7df09a667d15005eee95bae2d (patch)
treeb9b3af603ac1d3b31f84a092115f73300d112e23 /nova/api
parent79ef79abf24f7b8c8d3c9b652285a69fee7e9d14 (diff)
parent9f39ff070b5500a0ccb9a6454995f97342254381 (diff)
downloadnova-0fd5de705c0cd2d7df09a667d15005eee95bae2d.tar.gz
nova-0fd5de705c0cd2d7df09a667d15005eee95bae2d.tar.xz
nova-0fd5de705c0cd2d7df09a667d15005eee95bae2d.zip
Merge with trunk
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/views/images.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/nova/api/openstack/views/images.py b/nova/api/openstack/views/images.py
index 21f1b2d3e..8983b2957 100644
--- a/nova/api/openstack/views/images.py
+++ b/nova/api/openstack/views/images.py
@@ -37,17 +37,18 @@ class ViewBuilder(object):
def _format_status(self, image):
"""Update the status field to standardize format."""
status_mapping = {
- 'pending': 'QUEUED',
- 'decrypting': 'PREPARING',
- 'untarring': 'SAVING',
- 'available': 'ACTIVE',
- 'killed': 'FAILED',
+ 'active': 'ACTIVE',
+ 'queued': 'SAVING',
+ 'saving': 'SAVING',
+ 'deleted': 'DELETED',
+ 'pending_delete': 'DELETED',
+ 'killed': 'ERROR',
}
try:
- image['status'] = status_mapping[image['status']].upper()
+ image['status'] = status_mapping[image['status']]
except KeyError:
- image['status'] = image['status'].upper()
+ image['status'] = 'UNKNOWN'
def _build_server(self, image, image_obj):
"""Indicates that you must use a ViewBuilder subclass."""