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