mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
[CLOUDSTACK-359] Hook up the other side of the event propagation
This commit is contained in:
parent
3663af1434
commit
e59726ad95
@ -407,6 +407,23 @@ public class ClusterManagerImpl implements ClusterManager {
|
||||
Answer[] answers = new Answer[1];
|
||||
answers[0] = new Answer(cmd, result, null);
|
||||
return _gson.toJson(answers);
|
||||
} else if (cmds.length == 1 && cmds[0] instanceof PropagateResourceEventCommand ) {
|
||||
PropagateResourceEventCommand cmd = (PropagateResourceEventCommand) cmds[0];
|
||||
|
||||
s_logger.debug("Intercepting command to propagate event " + cmd.getEvent().name() + " for host " + cmd.getHostId());
|
||||
|
||||
boolean result = false;
|
||||
try {
|
||||
result = executeResourceUserRequest(cmd.getHostId(), cmd.getEvent());
|
||||
s_logger.debug("Result is " + result);
|
||||
} catch (AgentUnavailableException ex) {
|
||||
s_logger.warn("Agent is unavailable", ex);
|
||||
return null;
|
||||
}
|
||||
|
||||
Answer[] answers = new Answer[1];
|
||||
answers[0] = new Answer(cmd, result, null);
|
||||
return _gson.toJson(answers);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user