Change the Goal State of an Agency
A solution can
change the goal state of its ESX agencies while the solution is running. For
example, when a solution starts, the goal state of its ESX agencies can be
ENABLED
. If the solution includes a function to remove ESX
agencies, when this function runs, the goal state of the ESX agency changes to
UNDEPLOYED
.
You call the Agency.enable(), Agency.disable(), and Agency.uninstall() methods to change the goal state of an ESX agency. Calling these methods changes the status of the ESX agency to yellow until the agency reaches the desired state, in which case the status changes to green. If the ESX agency cannot achieve the goal state, the status changes to red.
Your solution can define a function to change the goal state of its ESX agencies in the MyAgentHandler.java class. Your solution can change the goal state of its ESX agency when users select ESXi hosts on which to run the solution, and when they uninstall the solution.
Prerequisites
- Verify that you have set up and started your solution in an application server.
Procedure
Results
You changed the goal state of an ESX agency while the solution is running.