diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-11-30 15:54:37 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-11-30 15:54:37 +0000 |
| commit | b3d8a823d33a4d4e42e814d4b31cea6e6587745f (patch) | |
| tree | 962c185246d22b8efe8185c55ab59243ac56a22a | |
| parent | 651637ad5475153ef3f2bc15ff0037aebec414c3 (diff) | |
| parent | 924084b4ddde31b07ceb8b789bebc31db8903d08 (diff) | |
| download | nova-b3d8a823d33a4d4e42e814d4b31cea6e6587745f.tar.gz nova-b3d8a823d33a4d4e42e814d4b31cea6e6587745f.tar.xz nova-b3d8a823d33a4d4e42e814d4b31cea6e6587745f.zip | |
Merge "Add POWERVM_STARTING state to powervm driver"
| -rw-r--r-- | nova/virt/powervm/constants.py | 2 | ||||
| -rw-r--r-- | nova/virt/powervm/operator.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/virt/powervm/constants.py b/nova/virt/powervm/constants.py index 1990ec5a5..f1d091586 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 adc7bf7d0..c977f7687 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'], |
