Updated Branches: refs/heads/4.1 ebc10b6bf -> 0e33ba8d3
CLOUDSTACK-1368: Shared network - Not able to delete network because of java.lang.NullPointerException Missed network destroy state transistion while 'events framework' merge. Before merge, network states were explicitly set. It was changed to go through state machine. This fix, introduces missing state transistions. Tested life cycle of both isolated and shared network Signed-off-by: Murali Reddy <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0e33ba8d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0e33ba8d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0e33ba8d Branch: refs/heads/4.1 Commit: 0e33ba8d353aa0ae7bac5260daa0d710306372bb Parents: ebc10b6 Author: Murali Reddy <[email protected]> Authored: Thu Mar 21 17:38:33 2013 +0530 Committer: Chip Childers <[email protected]> Committed: Thu Mar 21 15:41:59 2013 +0000 ---------------------------------------------------------------------- api/src/com/cloud/network/Network.java | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e33ba8d/api/src/com/cloud/network/Network.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/network/Network.java b/api/src/com/cloud/network/Network.java index 2bf7b7f..e13bca5 100644 --- a/api/src/com/cloud/network/Network.java +++ b/api/src/com/cloud/network/Network.java @@ -235,6 +235,8 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I s_fsm.addTransition(State.Implemented, Event.DestroyNetwork, State.Shutdown); s_fsm.addTransition(State.Shutdown, Event.OperationSucceeded, State.Allocated); s_fsm.addTransition(State.Shutdown, Event.OperationFailed, State.Implemented); + s_fsm.addTransition(State.Setup, Event.DestroyNetwork, State.Destroy); + s_fsm.addTransition(State.Allocated, Event.DestroyNetwork, State.Destroy); } public static StateMachine2<State, Network.Event, Network> getStateMachine() {
