summaryrefslogtreecommitdiff
path: root/nova/virt/powervm
diff options
context:
space:
mode:
Diffstat (limited to 'nova/virt/powervm')
-rw-r--r--nova/virt/powervm/constants.py2
-rw-r--r--nova/virt/powervm/operator.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/virt/powervm/constants.py b/nova/virt/powervm/constants.py
index 1990ec5a50..f1d0915860 100644
--- a/nova/virt/powervm/constants.py
+++ b/nova/virt/powervm/constants.py
@@ -18,11 +18,13 @@ from nova.compute import power_state
POWERVM_NOSTATE = ''
POWERVM_RUNNING = 'Running'
+POWERVM_STARTING = 'Starting'
POWERVM_SHUTDOWN = 'Not Activated'
POWERVM_POWER_STATE = {
POWERVM_NOSTATE: power_state.NOSTATE,
POWERVM_RUNNING: power_state.RUNNING,
POWERVM_SHUTDOWN: power_state.SHUTDOWN,
+ POWERVM_STARTING: power_state.RUNNING
}
POWERVM_CPU_INFO = ('ppc64', 'powervm', '3940')
diff --git a/nova/virt/powervm/operator.py b/nova/virt/powervm/operator.py
index adc7bf7d02..c977f7687a 100644
--- a/nova/virt/powervm/operator.py
+++ b/nova/virt/powervm/operator.py
@@ -74,7 +74,8 @@ class PowerVMOperator(object):
"""
lpar_instance = self._get_instance(instance_name)
- state = constants.POWERVM_POWER_STATE[lpar_instance['state']]
+ state = constants.POWERVM_POWER_STATE.get(
+ lpar_instance['state'], power_state.NOSTATE)
return {'state': state,
'max_mem': lpar_instance['max_mem'],
'mem': lpar_instance['desired_mem'],