ensure agent reconciliation triggers events

(cherry picked from commit 0ba75bcebde4e8a4773c7b31e5d8b88bf748a131)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Pierre-Yves Ritschard 2015-02-16 17:30:51 +01:00 committed by Rohit Yadav
parent e77b4ae8e8
commit c37841817e

View File

@ -145,7 +145,10 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I
}
public static boolean isVmStopped(State oldState, Event e, State newState) {
if (oldState == State.Stopping && newState == State.Stopped) {
if ((oldState == State.Stopping && newState == State.Stopped) ||
(oldState == State.Running &&
newState == State.Stopped &&
e == Event.FollowAgentPowerOffReport)) {
return true;
}
return false;