ensure agent reconciliation triggers events

This commit is contained in:
Pierre-Yves Ritschard 2015-02-16 17:30:51 +01:00 committed by Loic Lambiel
parent a8273c0a94
commit 0ba75bcebd
1 changed files with 4 additions and 1 deletions

View File

@ -142,7 +142,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;