Skip to content

Commit

Permalink
#183: agent-cli now handles state machine properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Sep 14, 2013
1 parent 36e0401 commit c8e6d10
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ class ClientMain implements Startable
parent: Config.getOptionalString(config, 'parent', '/'),
initParameters: extractArgs(config))

moveToState(agent, mountPoint, 'installed')
// installed state is the "first" state after NONE
def installedState = stateMachine.transitions[StateMachine.NONE][0].to

moveToState(agent, mountPoint, installedState)
}

// uninstall
Expand All @@ -312,7 +315,7 @@ class ClientMain implements Startable
initParameters: extractArgs(config))
}

moveToState(agent, mountPoint, 'running')
moveToState(agent, mountPoint, DefaultStateMachine.DEFAULT_ENTRY_STATE)
}

protected def moveToState(agent, mountPoint, toState)
Expand Down

0 comments on commit c8e6d10

Please sign in to comment.