use of org.openkilda.floodlight.command.group.GroupInstallCommand in project open-kilda by telstra.
the class RecordHandler method doInstallGroupRequest.
private void doInstallGroupRequest(CommandMessage message) {
SwitchId switchId = ((InstallGroupRequest) message.getData()).getSwitchId();
MirrorConfig mirrorConfig = ((InstallGroupRequest) message.getData()).getMirrorConfig();
FlowTransitEncapsulation encapsulation = ((InstallGroupRequest) message.getData()).getEncapsulation();
SwitchId egressSwitchId = ((InstallGroupRequest) message.getData()).getEgressSwitchId();
FlowTransitData flowTransitData = null;
if (encapsulation != null) {
flowTransitData = FlowTransitData.builder().ingressSwitchId(switchId).egressSwitchId(egressSwitchId).encapsulation(encapsulation).build();
}
logger.debug("Install group '{}' for switch '{}'", mirrorConfig.getGroupId().intValue(), switchId);
handleSpeakerCommand(new GroupInstallCommand(new MessageContext(message), switchId, mirrorConfig, flowTransitData));
InstallGroupResponse response = new InstallGroupResponse(switchId, mirrorConfig.getGroupId().intValue());
String correlationId = message.getCorrelationId();
InfoMessage infoMessage = new InfoMessage(response, System.currentTimeMillis(), correlationId);
getKafkaProducer().sendMessageAndTrack(context.getKafkaSwitchManagerTopic(), correlationId, infoMessage);
}
Aggregations