summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorBrian Lamar <brian.lamar@rackspace.com>2011-08-22 11:04:45 -0400
committerBrian Lamar <brian.lamar@rackspace.com>2011-08-22 11:04:45 -0400
commit699cf3e939fd0d2e3e50841ac229d3670787bfe9 (patch)
treea3f93677750ec374e8f7bdcc4c43fbc36b6079dc /nova/api
parent0de475bb878189c217eb208540c9f2079f3db78f (diff)
parent44aea954e5efa7d94d8333ddbf54dab6464018a0 (diff)
Merged task_state -> task_states and fixed test_servers test.
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py
index eae0fd916..778c1e514 100644
--- a/nova/api/openstack/common.py
+++ b/nova/api/openstack/common.py
@@ -28,7 +28,7 @@ from nova import log as logging
from nova import quota
from nova.api.openstack import wsgi
from nova.compute import vm_states
-from nova.compute import task_state
+from nova.compute import task_states
LOG = logging.getLogger('nova.api.openstack.common')
@@ -56,9 +56,9 @@ _STATE_MAP = {
}
-def status_from_state(_vm_state, _task_state=None):
+def status_from_state(_vm_state, task_state=None):
"""Given vm_state and task_state, return a status string."""
- if _vm_state == vm_states.ACTIVE and _task_state == task_state.PASSWORD:
+ if _vm_state == vm_states.ACTIVE and task_state == task_states.PASSWORD:
return "PASSWORD"
return _STATE_MAP.get(_vm_state, "UNKNOWN_STATE")