diff options
| author | Ken Pepple <ken.pepple@gmail.com> | 2011-04-04 17:17:36 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-04-04 17:17:36 +0000 |
| commit | 6ee6f211f2b76fb4d2f007be7adeb88edc68c917 (patch) | |
| tree | f42744d34862d7ad549bc90cf13db30888b5c4c8 /nova/api | |
| parent | 0ec4352046939785b3ffa390e6d8264ce4d99f98 (diff) | |
| parent | fc53de592fb903f8a7e3741fa98d03140aca9066 (diff) | |
fixes incorrect case of OpenStack API status response
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/views/servers.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/nova/api/openstack/views/servers.py b/nova/api/openstack/views/servers.py index 4e7f62eb3..d24c025be 100644 --- a/nova/api/openstack/views/servers.py +++ b/nova/api/openstack/views/servers.py @@ -57,16 +57,16 @@ class ViewBuilder(object): def _build_detail(self, inst): """Returns a detailed model of a server.""" power_mapping = { - None: 'build', - power_state.NOSTATE: 'build', - power_state.RUNNING: 'active', - power_state.BLOCKED: 'active', - power_state.SUSPENDED: 'suspended', - power_state.PAUSED: 'paused', - power_state.SHUTDOWN: 'active', - power_state.SHUTOFF: 'active', - power_state.CRASHED: 'error', - power_state.FAILED: 'error'} + None: 'BUILD', + power_state.NOSTATE: 'BUILD', + power_state.RUNNING: 'ACTIVE', + power_state.BLOCKED: 'ACTIVE', + power_state.SUSPENDED: 'SUSPENDED', + power_state.PAUSED: 'PAUSED', + power_state.SHUTDOWN: 'ACTIVE', + power_state.SHUTOFF: 'ACTIVE', + power_state.CRASHED: 'ERROR', + power_state.FAILED: 'ERROR'} inst_dict = { 'id': int(inst['id']), @@ -77,7 +77,7 @@ class ViewBuilder(object): ctxt = nova.context.get_admin_context() compute_api = nova.compute.API() if compute_api.has_finished_migration(ctxt, inst['id']): - inst_dict['status'] = 'resize-confirm' + inst_dict['status'] = 'RESIZE-CONFIRM' # Return the metadata as a dictionary metadata = {} |
