From 62ca3783ce4fcc0b03e96936972abc83b54c772f Mon Sep 17 00:00:00 2001 From: YangLei Date: Tue, 21 May 2013 15:00:53 +0800 Subject: No relevant message when stop a stopped VM When user tries to stop a stopped VM, there is no need to stop it again, and We need return it's vm_state. Fixes bug 1181934 Change-Id: I71772dfcead440cb49b6ccdbb4e1a891475bb75e --- nova/compute/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index f31aefb9b..9f61788ae 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1310,7 +1310,7 @@ class API(base.Base): @check_instance_lock @check_instance_host @check_instance_state(vm_state=[vm_states.ACTIVE, vm_states.RESCUED, - vm_states.ERROR, vm_states.STOPPED], + vm_states.ERROR], task_state=[None]) def stop(self, context, instance, do_cast=True): """Stop an instance.""" -- cgit