use of com.cloud.legacymodel.communication.command.agentcontrol.ShutdownEventCommand in project cosmic by MissionCriticalCloud.
the class LifecycleListener method sendShutdownEventCommand.
private void sendShutdownEventCommand(final Domain domain) {
try {
logger.info("Found domain " + domain.getName() + " to have been stopped, transferring a shutdown event to the management server");
final ShutdownEventCommand shutdownEventCommand = new ShutdownEventCommand(domain.getName());
this.libvirtComputingResource.getAgentControl().sendRequest(shutdownEventCommand, 60000);
} catch (final LibvirtException e) {
logger.error("Unable to gather libvirt domain name for shutdown event");
} catch (final AgentControlChannelException e) {
logger.error("Exception while sending shutdown event to management server");
}
}
Aggregations