Search in sources :

Example 6 with MessageData

use of org.openkilda.messaging.MessageData in project open-kilda by telstra.

the class MessageEncoder method handleInput.

@Override
protected void handleInput(Tuple input) throws Exception {
    MessageData payload = pullPayload(input);
    try {
        CommandContext commandContext = pullContext(input);
        Message message = wrap(commandContext, payload);
        if (payload instanceof FlowRerouteRequest) {
            getOutput().emit(input.getSourceStreamId(), input, new Values(message));
        } else if (payload instanceof SwitchValidateRequest) {
            getOutput().emit(input.getSourceStreamId(), input, new Values(commandContext.getCorrelationId(), message));
        } else if (payload instanceof ErrorData) {
            getOutput().emit(StreamType.ERROR.toString(), input, new Values(null, message));
        }
    } catch (IllegalArgumentException e) {
        log.error(e.getMessage());
        unhandledInput(input);
    }
}
Also used : CommandContext(org.openkilda.wfm.CommandContext) Message(org.openkilda.messaging.Message) MessageData(org.openkilda.messaging.MessageData) Values(org.apache.storm.tuple.Values) FlowRerouteRequest(org.openkilda.messaging.command.flow.FlowRerouteRequest) SwitchValidateRequest(org.openkilda.messaging.command.switches.SwitchValidateRequest) ErrorData(org.openkilda.messaging.error.ErrorData)

Example 7 with MessageData

use of org.openkilda.messaging.MessageData in project open-kilda by telstra.

the class RouterBolt method handleInput.

@Override
protected void handleInput(Tuple input) {
    if (active) {
        String key = input.getStringByField(FIELD_ID_KEY);
        if (StringUtils.isBlank(key)) {
            // TODO: the key must be unique, but the correlationId comes in from outside and we can't guarantee that.
            // IMPORTANT: Storm may initiate reprocessing of the same tuple (e.g. in the case of timeout) and
            // cause creating multiple FSMs for the same tuple. This must be avoided.
            // As for now tuples are routed by the key field, and services can check FSM uniqueness.
            key = getCommandContext().getCorrelationId();
        }
        CommandMessage message = (CommandMessage) input.getValueByField(FIELD_ID_PAYLOAD);
        MessageData data = message.getData();
        if (data instanceof FlowRequest) {
            FlowRequest request = (FlowRequest) data;
            log.debug("Received request {} with key {}", request, key);
            Values values = new Values(key, request.getFlowId(), request);
            switch(request.getType()) {
                case CREATE:
                    emitWithContext(ROUTER_TO_FLOW_CREATE_HUB.name(), input, values);
                    break;
                case UPDATE:
                    emitWithContext(ROUTER_TO_FLOW_UPDATE_HUB.name(), input, values);
                    break;
                default:
                    throw new UnsupportedOperationException(format("Flow operation %s is not supported", request.getType()));
            }
        } else if (data instanceof FlowRerouteRequest) {
            FlowRerouteRequest rerouteRequest = (FlowRerouteRequest) data;
            log.debug("Received a reroute request {}/{} with key {}. MessageId {}", rerouteRequest.getFlowId(), rerouteRequest.getAffectedIsl(), key, input.getMessageId());
            Values values = new Values(key, rerouteRequest.getFlowId(), data);
            emitWithContext(ROUTER_TO_FLOW_REROUTE_HUB.name(), input, values);
        } else if (data instanceof FlowDeleteRequest) {
            FlowDeleteRequest deleteRequest = (FlowDeleteRequest) data;
            log.debug("Received a delete request {} with key {}. MessageId {}", deleteRequest.getFlowId(), key, input.getMessageId());
            Values values = new Values(key, deleteRequest.getFlowId(), data);
            emitWithContext(ROUTER_TO_FLOW_DELETE_HUB.name(), input, values);
        } else if (data instanceof FlowPathSwapRequest) {
            FlowPathSwapRequest pathSwapRequest = (FlowPathSwapRequest) data;
            log.debug("Received a path swap request {} with key {}. MessageId {}", pathSwapRequest.getFlowId(), key, input.getMessageId());
            Values values = new Values(key, pathSwapRequest.getFlowId(), data);
            emitWithContext(ROUTER_TO_FLOW_PATH_SWAP_HUB.name(), input, values);
        } else if (data instanceof SwapFlowEndpointRequest) {
            log.debug("Received a swap flow endpoints request with key {}. MessageId {}", key, input.getMessageId());
            emitWithContext(ROUTER_TO_FLOW_SWAP_ENDPOINTS_HUB.name(), input, new Values(key, data));
        } else if (data instanceof CreateFlowLoopRequest) {
            log.debug("Received a create flow loop request with key {}. MessageId {}", key, input.getMessageId());
            CreateFlowLoopRequest request = (CreateFlowLoopRequest) data;
            emitWithContext(ROUTER_TO_FLOW_UPDATE_HUB.name(), input, new Values(key, request.getFlowId(), data));
        } else if (data instanceof DeleteFlowLoopRequest) {
            log.debug("Received a delete flow loop request with key {}. MessageId {}", key, input.getMessageId());
            DeleteFlowLoopRequest request = (DeleteFlowLoopRequest) data;
            emitWithContext(ROUTER_TO_FLOW_UPDATE_HUB.name(), input, new Values(key, request.getFlowId(), data));
        } else if (data instanceof FlowMirrorPointCreateRequest) {
            log.debug("Received a flow mirror point create request with key {}. MessageId {}", key, input.getMessageId());
            FlowMirrorPointCreateRequest request = (FlowMirrorPointCreateRequest) data;
            emitWithContext(ROUTER_TO_FLOW_CREATE_MIRROR_POINT_HUB.name(), input, new Values(key, request.getFlowId(), data));
        } else if (data instanceof FlowMirrorPointDeleteRequest) {
            log.debug("Received a flow mirror point delete request with key {}. MessageId {}", key, input.getMessageId());
            FlowMirrorPointDeleteRequest request = (FlowMirrorPointDeleteRequest) data;
            emitWithContext(ROUTER_TO_FLOW_DELETE_MIRROR_POINT_HUB.name(), input, new Values(key, request.getFlowId(), data));
        } else if (data instanceof FlowValidationRequest) {
            log.debug("Received a flow validation request with key {}. MessageId {}", key, input.getMessageId());
            FlowValidationRequest request = (FlowValidationRequest) data;
            emitWithContext(ROUTER_TO_FLOW_VALIDATION_HUB.name(), input, new Values(key, request.getFlowId(), data));
        } else if (data instanceof YFlowRequest) {
            YFlowRequest request = (YFlowRequest) data;
            log.debug("Received request {} with key {}", request, key);
            Values values = new Values(key, request.getYFlowId(), request);
            switch(request.getType()) {
                case CREATE:
                    emitWithContext(ROUTER_TO_YFLOW_CREATE_HUB.name(), input, values);
                    break;
                case UPDATE:
                    emitWithContext(ROUTER_TO_YFLOW_UPDATE_HUB.name(), input, values);
                    break;
                default:
                    throw new UnsupportedOperationException(format("Y-flow operation %s is not supported", request.getType()));
            }
        } else if (data instanceof YFlowPartialUpdateRequest) {
            YFlowPartialUpdateRequest request = (YFlowPartialUpdateRequest) data;
            log.debug("Received a y-flow partial update request {} with key {}", request, key);
            emitWithContext(ROUTER_TO_YFLOW_UPDATE_HUB.name(), input, new Values(key, request.getYFlowId(), data));
        } else if (data instanceof YFlowRerouteRequest) {
            YFlowRerouteRequest request = (YFlowRerouteRequest) data;
            log.debug("Received a y-flow reroute request {} with key {}", data, key);
            emitWithContext(ROUTER_TO_YFLOW_REROUTE_HUB.name(), input, new Values(key, request.getYFlowId(), data));
        } else if (data instanceof YFlowDeleteRequest) {
            YFlowDeleteRequest request = (YFlowDeleteRequest) data;
            log.debug("Received a y-flow delete request {} with key {}", request, key);
            emitWithContext(ROUTER_TO_YFLOW_DELETE_HUB.name(), input, new Values(key, request.getYFlowId(), data));
        } else if (data instanceof YFlowsDumpRequest) {
            log.debug("Received a y-flow dump request {} with key {}", data, key);
            emitWithContext(ROUTER_TO_YFLOW_READ.name(), input, new Values(key, data));
        } else if (data instanceof YFlowReadRequest) {
            log.debug("Received a y-flow read request {} with key {}", data, key);
            emitWithContext(ROUTER_TO_YFLOW_READ.name(), input, new Values(key, data));
        } else if (data instanceof YFlowPathsReadRequest) {
            log.debug("Received a y-flow read path request {} with key {}", data, key);
            emitWithContext(ROUTER_TO_YFLOW_READ.name(), input, new Values(key, data));
        } else if (data instanceof SubFlowsReadRequest) {
            log.debug("Received a y-flow sub-flows request {} with key {}", data, key);
            emitWithContext(ROUTER_TO_YFLOW_READ.name(), input, new Values(key, data));
        } else if (data instanceof YFlowValidationRequest) {
            YFlowValidationRequest request = (YFlowValidationRequest) data;
            log.debug("Received a y-flow validation request {} with key {}", request, key);
            emitWithContext(ROUTER_TO_YFLOW_VALIDATION_HUB.name(), input, new Values(key, request.getYFlowId(), data));
        } else if (data instanceof YFlowSyncRequest) {
            YFlowSyncRequest request = (YFlowSyncRequest) data;
            log.debug("Received a y-flow synchronization request {} with key {}", request, key);
            YFlowRerouteRequest rerouteRequest = new YFlowRerouteRequest(request.getYFlowId(), emptySet(), true, "initiated via synchronization request", false);
            emitWithContext(ROUTER_TO_YFLOW_REROUTE_HUB.name(), input, new Values(key, rerouteRequest.getYFlowId(), rerouteRequest));
        } else {
            unhandledInput(input);
        }
    }
}
Also used : YFlowSyncRequest(org.openkilda.messaging.command.yflow.YFlowSyncRequest) YFlowRequest(org.openkilda.messaging.command.yflow.YFlowRequest) FlowRequest(org.openkilda.messaging.command.flow.FlowRequest) FlowDeleteRequest(org.openkilda.messaging.command.flow.FlowDeleteRequest) YFlowDeleteRequest(org.openkilda.messaging.command.yflow.YFlowDeleteRequest) CreateFlowLoopRequest(org.openkilda.messaging.command.flow.CreateFlowLoopRequest) Values(org.apache.storm.tuple.Values) SwapFlowEndpointRequest(org.openkilda.messaging.command.flow.SwapFlowEndpointRequest) YFlowRequest(org.openkilda.messaging.command.yflow.YFlowRequest) YFlowsDumpRequest(org.openkilda.messaging.command.yflow.YFlowsDumpRequest) YFlowDeleteRequest(org.openkilda.messaging.command.yflow.YFlowDeleteRequest) FlowPathSwapRequest(org.openkilda.messaging.command.flow.FlowPathSwapRequest) FlowRerouteRequest(org.openkilda.messaging.command.flow.FlowRerouteRequest) YFlowRerouteRequest(org.openkilda.messaging.command.yflow.YFlowRerouteRequest) YFlowPartialUpdateRequest(org.openkilda.messaging.command.yflow.YFlowPartialUpdateRequest) FlowMirrorPointDeleteRequest(org.openkilda.messaging.command.flow.FlowMirrorPointDeleteRequest) DeleteFlowLoopRequest(org.openkilda.messaging.command.flow.DeleteFlowLoopRequest) MessageData(org.openkilda.messaging.MessageData) FlowMirrorPointCreateRequest(org.openkilda.messaging.command.flow.FlowMirrorPointCreateRequest) CommandMessage(org.openkilda.messaging.command.CommandMessage) YFlowValidationRequest(org.openkilda.messaging.command.yflow.YFlowValidationRequest) FlowValidationRequest(org.openkilda.messaging.command.flow.FlowValidationRequest) YFlowValidationRequest(org.openkilda.messaging.command.yflow.YFlowValidationRequest) YFlowRerouteRequest(org.openkilda.messaging.command.yflow.YFlowRerouteRequest) YFlowReadRequest(org.openkilda.messaging.command.yflow.YFlowReadRequest) YFlowPathsReadRequest(org.openkilda.messaging.command.yflow.YFlowPathsReadRequest) SubFlowsReadRequest(org.openkilda.messaging.command.yflow.SubFlowsReadRequest)

Example 8 with MessageData

use of org.openkilda.messaging.MessageData in project open-kilda by telstra.

the class FlowValidationHubBolt method onWorkerResponse.

@Override
protected void onWorkerResponse(Tuple input) throws PipelineException {
    String operationKey = pullKey(input);
    currentKey = KeyProvider.getParentKey(operationKey);
    MessageData messageData = pullValue(input, FIELD_ID_PAYLOAD, MessageData.class);
    try {
        service.handleAsyncResponse(currentKey, messageData);
    } catch (UnknownKeyException e) {
        log.warn("Received a response with unknown key {}.", currentKey);
    }
}
Also used : MessageData(org.openkilda.messaging.MessageData) UnknownKeyException(org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException)

Example 9 with MessageData

use of org.openkilda.messaging.MessageData in project open-kilda by telstra.

the class RecordHandler method processDumpRuleManagerRulesRequest.

private void processDumpRuleManagerRulesRequest(SwitchId switchId, java.util.function.Consumer<MessageData> sender) {
    try {
        logger.debug("Loading installed rules for switch {}", switchId);
        List<OFFlowStatsEntry> flowEntries = context.getSwitchManager().dumpFlowTable(DatapathId.of(switchId.toLong()));
        List<FlowSpeakerData> flows = flowEntries.stream().map(entry -> OfFlowConverter.INSTANCE.convertToFlowSpeakerData(entry, switchId)).collect(Collectors.toList());
        FlowDumpResponse response = FlowDumpResponse.builder().switchId(switchId).flowSpeakerData(flows).build();
        sender.accept(response);
    } catch (SwitchNotFoundException e) {
        logger.error("Dumping of rules on switch '{}' was unsuccessful: {}", switchId, e.getMessage());
        ErrorData errorData = anError(ErrorType.NOT_FOUND).withMessage(e.getMessage()).withDescription("The switch was not found when requesting a rules dump.").buildData();
        sender.accept(errorData);
    }
}
Also used : OFFlowStatsEntry(org.projectfloodlight.openflow.protocol.OFFlowStatsEntry) MirrorConfig(org.openkilda.model.MirrorConfig) OFPortDesc(org.projectfloodlight.openflow.protocol.OFPortDesc) GroupModifyCommand(org.openkilda.floodlight.command.group.GroupModifyCommand) SwitchMeterUnsupported(org.openkilda.messaging.info.meter.SwitchMeterUnsupported) OfFlowStatsMapper(org.openkilda.floodlight.converter.OfFlowStatsMapper) DeleteMeterRequest(org.openkilda.messaging.command.flow.DeleteMeterRequest) CommandMessage(org.openkilda.messaging.command.CommandMessage) MULTITABLE_POST_INGRESS_DROP_COOKIE(org.openkilda.model.cookie.Cookie.MULTITABLE_POST_INGRESS_DROP_COOKIE) Map(java.util.Map) DeleteRulesAction(org.openkilda.messaging.command.switches.DeleteRulesAction) DumpPortDescriptionRequest(org.openkilda.messaging.command.switches.DumpPortDescriptionRequest) RemoveFlow(org.openkilda.messaging.command.flow.RemoveFlow) SwitchGroupEntries(org.openkilda.messaging.info.rule.SwitchGroupEntries) PortStatus(org.openkilda.model.PortStatus) SetupBfdSessionDispatcher(org.openkilda.floodlight.kafka.dispatcher.SetupBfdSessionDispatcher) InvalidMeterIdException(org.openkilda.floodlight.error.InvalidMeterIdException) AliveResponse(org.openkilda.messaging.AliveResponse) MULTITABLE_PRE_INGRESS_PASS_THROUGH_COOKIE(org.openkilda.model.cookie.Cookie.MULTITABLE_PRE_INGRESS_PASS_THROUGH_COOKIE) MessageContext(org.openkilda.messaging.MessageContext) CookieType(org.openkilda.model.cookie.CookieBase.CookieType) GroupEntry(org.openkilda.messaging.info.rule.GroupEntry) CommandProcessorService(org.openkilda.floodlight.service.CommandProcessorService) OFMeterConfig(org.projectfloodlight.openflow.protocol.OFMeterConfig) ROUND_TRIP_LATENCY_RULE_COOKIE(org.openkilda.model.cookie.Cookie.ROUND_TRIP_LATENCY_RULE_COOKIE) ReinstallServer42FlowForSwitchManagerRequest(org.openkilda.messaging.command.flow.ReinstallServer42FlowForSwitchManagerRequest) LLDP_INGRESS_COOKIE(org.openkilda.model.cookie.Cookie.LLDP_INGRESS_COOKIE) BaseSpeakerCommandsRequest(org.openkilda.floodlight.api.request.rulemanager.BaseSpeakerCommandsRequest) InstallIngressFlow(org.openkilda.messaging.command.flow.InstallIngressFlow) Command(org.openkilda.floodlight.command.Command) SwitchTrackingService(org.openkilda.floodlight.switchmanager.SwitchTrackingService) PortDescription(org.openkilda.messaging.info.switches.PortDescription) BaseInstallFlow(org.openkilda.messaging.command.flow.BaseInstallFlow) TransitFlowLoopSegmentInstallCommand(org.openkilda.floodlight.command.flow.transit.TransitFlowLoopSegmentInstallCommand) ModifyGroupResponse(org.openkilda.messaging.info.switches.ModifyGroupResponse) SpeakerCommand(org.openkilda.floodlight.command.SpeakerCommand) SwitchPortsDescription(org.openkilda.messaging.info.switches.SwitchPortsDescription) DumpGroupsForFlowHsRequest(org.openkilda.messaging.command.switches.DumpGroupsForFlowHsRequest) FlowEndpoint(org.openkilda.model.FlowEndpoint) GroupDumpResponse(org.openkilda.messaging.info.group.GroupDumpResponse) CorrelationContextClosable(org.openkilda.floodlight.utils.CorrelationContext.CorrelationContextClosable) NetworkCommandData(org.openkilda.messaging.command.discovery.NetworkCommandData) ErrorType(org.openkilda.messaging.error.ErrorType) SERVER_42_ISL_RTT_OUTPUT_COOKIE(org.openkilda.model.cookie.Cookie.SERVER_42_ISL_RTT_OUTPUT_COOKIE) MeterDumpResponse(org.openkilda.messaging.info.meter.MeterDumpResponse) IOException(java.io.IOException) FeatureDetectorService(org.openkilda.floodlight.service.FeatureDetectorService) InstallTransitLoopFlow(org.openkilda.messaging.command.flow.InstallTransitLoopFlow) PortStatusData(org.openkilda.messaging.info.stats.PortStatusData) InstallIslDefaultRulesCommand(org.openkilda.messaging.payload.switches.InstallIslDefaultRulesCommand) FlowSharedSegmentCookie(org.openkilda.model.cookie.FlowSharedSegmentCookie) DumpRulesForFlowHsRequest(org.openkilda.messaging.command.switches.DumpRulesForFlowHsRequest) InstallSharedFlow(org.openkilda.messaging.command.flow.InstallSharedFlow) PortConfigurationResponse(org.openkilda.messaging.info.switches.PortConfigurationResponse) DeleteGroupRequest(org.openkilda.messaging.command.switches.DeleteGroupRequest) GroupInstallCommand(org.openkilda.floodlight.command.group.GroupInstallCommand) DatapathId(org.projectfloodlight.openflow.types.DatapathId) SpeakerCommandReport(org.openkilda.floodlight.command.SpeakerCommandReport) OneSwitchFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand) DumpMetersForSwitchManagerRequest(org.openkilda.messaging.command.switches.DumpMetersForSwitchManagerRequest) ModifyDefaultMeterForSwitchManagerRequest(org.openkilda.messaging.command.flow.ModifyDefaultMeterForSwitchManagerRequest) FlowSegmentResponseFactory(org.openkilda.floodlight.command.flow.FlowSegmentResponseFactory) OfPortDescConverter(org.openkilda.floodlight.converter.OfPortDescConverter) PingRequestDispatcher(org.openkilda.floodlight.kafka.dispatcher.PingRequestDispatcher) SwitchFeature(org.openkilda.model.SwitchFeature) FlowSegmentSyncResponseFactory(org.openkilda.floodlight.command.flow.FlowSegmentSyncResponseFactory) DeleteGroupResponse(org.openkilda.messaging.info.switches.DeleteGroupResponse) LLDP_POST_INGRESS_COOKIE(org.openkilda.model.cookie.Cookie.LLDP_POST_INGRESS_COOKIE) OneSwitchMirrorFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchMirrorFlowInstallCommand) SwitchOperationException(org.openkilda.floodlight.error.SwitchOperationException) SwitchRulesInstallRequest(org.openkilda.messaging.command.switches.SwitchRulesInstallRequest) RemoveIslDefaultRulesCommand(org.openkilda.messaging.payload.switches.RemoveIslDefaultRulesCommand) OFFlowStatsEntry(org.projectfloodlight.openflow.protocol.OFFlowStatsEntry) InstallIngressMirrorFlow(org.openkilda.messaging.command.flow.InstallIngressMirrorFlow) ModifyGroupRequest(org.openkilda.messaging.command.switches.ModifyGroupRequest) InstallFlowForSwitchManagerRequest(org.openkilda.messaging.command.flow.InstallFlowForSwitchManagerRequest) ISwitchManager(org.openkilda.floodlight.switchmanager.ISwitchManager) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) CommandContext(org.openkilda.floodlight.command.CommandContext) Objects(java.util.Objects) MacAddress(org.openkilda.model.MacAddress) MULTITABLE_EGRESS_PASS_THROUGH_COOKIE(org.openkilda.model.cookie.Cookie.MULTITABLE_EGRESS_PASS_THROUGH_COOKIE) SwitchNotFoundException(org.openkilda.floodlight.error.SwitchNotFoundException) ARP_POST_INGRESS_VXLAN_COOKIE(org.openkilda.model.cookie.Cookie.ARP_POST_INGRESS_VXLAN_COOKIE) DumpRulesForSwitchManagerRequest(org.openkilda.messaging.command.switches.DumpRulesForSwitchManagerRequest) ARP_INGRESS_COOKIE(org.openkilda.model.cookie.Cookie.ARP_INGRESS_COOKIE) SwitchPortStatusData(org.openkilda.messaging.info.stats.SwitchPortStatusData) MULTITABLE_TRANSIT_DROP_COOKIE(org.openkilda.model.cookie.Cookie.MULTITABLE_TRANSIT_DROP_COOKIE) SERVER_42_FLOW_RTT_TURNING_COOKIE(org.openkilda.model.cookie.Cookie.SERVER_42_FLOW_RTT_TURNING_COOKIE) RemoveFlowForSwitchManagerRequest(org.openkilda.messaging.command.flow.RemoveFlowForSwitchManagerRequest) FlowTransitEncapsulation(org.openkilda.model.FlowTransitEncapsulation) DumpSwitchPortsDescriptionRequest(org.openkilda.messaging.command.switches.DumpSwitchPortsDescriptionRequest) CATCH_BFD_RULE_COOKIE(org.openkilda.model.cookie.Cookie.CATCH_BFD_RULE_COOKIE) HashSet(java.util.HashSet) DumpMetersForFlowHsRequest(org.openkilda.messaging.command.switches.DumpMetersForFlowHsRequest) ImmutableList(com.google.common.collect.ImmutableList) MULTITABLE_INGRESS_DROP_COOKIE(org.openkilda.model.cookie.Cookie.MULTITABLE_INGRESS_DROP_COOKIE) MAPPER(org.openkilda.messaging.Utils.MAPPER) BroadcastStatsRequestDispatcher(org.openkilda.floodlight.kafka.dispatcher.BroadcastStatsRequestDispatcher) ConnectModeResponse(org.openkilda.messaging.info.switches.ConnectModeResponse) SharedSegmentType(org.openkilda.model.cookie.FlowSharedSegmentCookie.SharedSegmentType) POST_INGRESS_TABLE_ID(org.openkilda.floodlight.switchmanager.SwitchManager.POST_INGRESS_TABLE_ID) MeterSpeakerData(org.openkilda.rulemanager.MeterSpeakerData) Logger(org.slf4j.Logger) EgressFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.egress.EgressFlowSegmentInstallCommand) MeterModifyCommand(org.openkilda.floodlight.command.meter.MeterModifyCommand) LLDP_INPUT_PRE_DROP_COOKIE(org.openkilda.model.cookie.Cookie.LLDP_INPUT_PRE_DROP_COOKIE) FlowSpeakerData(org.openkilda.rulemanager.FlowSpeakerData) MeterId(org.openkilda.model.MeterId) OfInstallException(org.openkilda.floodlight.error.OfInstallException) CommandDispatcher(org.openkilda.floodlight.kafka.dispatcher.CommandDispatcher) FlowDumpResponse(org.openkilda.messaging.info.flow.FlowDumpResponse) GroupId(org.openkilda.model.GroupId) DROP_VERIFICATION_LOOP_RULE_COOKIE(org.openkilda.model.cookie.Cookie.DROP_VERIFICATION_LOOP_RULE_COOKIE) VERIFICATION_UNICAST_VXLAN_RULE_COOKIE(org.openkilda.model.cookie.Cookie.VERIFICATION_UNICAST_VXLAN_RULE_COOKIE) IOFSwitch(net.floodlightcontroller.core.IOFSwitch) SERVER_42_FLOW_RTT_VXLAN_TURNING_COOKIE(org.openkilda.model.cookie.Cookie.SERVER_42_FLOW_RTT_VXLAN_TURNING_COOKIE) RemoveBfdSessionDispatcher(org.openkilda.floodlight.kafka.dispatcher.RemoveBfdSessionDispatcher) DeleteMeterResponse(org.openkilda.messaging.info.switches.DeleteMeterResponse) SwitchFlowEntries(org.openkilda.messaging.info.rule.SwitchFlowEntries) DiscoverIslCommandData(org.openkilda.messaging.command.discovery.DiscoverIslCommandData) IngressMirrorFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.ingress.IngressMirrorFlowSegmentInstallCommand) BroadcastWrapper(org.openkilda.messaging.command.BroadcastWrapper) RulesContext(org.openkilda.floodlight.model.RulesContext) IKafkaProducerService(org.openkilda.floodlight.service.kafka.IKafkaProducerService) EgressMirrorFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.egress.EgressMirrorFlowSegmentInstallCommand) FlowTransitData(org.openkilda.floodlight.model.FlowTransitData) Set(java.util.Set) OfFlowConverter(org.openkilda.floodlight.converter.rulemanager.OfFlowConverter) SwitchMeterEntries(org.openkilda.messaging.info.meter.SwitchMeterEntries) CorrelationContext(org.openkilda.floodlight.utils.CorrelationContext) MeterModifyCommandRequest(org.openkilda.messaging.command.flow.MeterModifyCommandRequest) ConsumerRecord(org.apache.kafka.clients.consumer.ConsumerRecord) PortsCommandData(org.openkilda.messaging.command.discovery.PortsCommandData) Message(org.openkilda.messaging.Message) InstallServer42IngressFlow(org.openkilda.messaging.command.flow.InstallServer42IngressFlow) MeterEntry(org.openkilda.messaging.info.meter.MeterEntry) MessageData(org.openkilda.messaging.MessageData) RemoveIslDefaultRulesResult(org.openkilda.messaging.info.discovery.RemoveIslDefaultRulesResult) ArrayList(java.util.ArrayList) SpeakerDataResponse(org.openkilda.floodlight.api.response.SpeakerDataResponse) InstallIngressLoopFlow(org.openkilda.messaging.command.flow.InstallIngressLoopFlow) LLDP_TRANSIT_COOKIE(org.openkilda.model.cookie.Cookie.LLDP_TRANSIT_COOKIE) GroupRemoveCommand(org.openkilda.floodlight.command.group.GroupRemoveCommand) DiscoverPathCommandData(org.openkilda.messaging.command.discovery.DiscoverPathCommandData) AliveRequest(org.openkilda.messaging.AliveRequest) FlowCommandErrorData(org.openkilda.messaging.error.rule.FlowCommandErrorData) FlowEntry(org.openkilda.messaging.info.rule.FlowEntry) PortColourCookie(org.openkilda.model.cookie.PortColourCookie) DROP_RULE_COOKIE(org.openkilda.model.cookie.Cookie.DROP_RULE_COOKIE) InstallOneSwitchFlow(org.openkilda.messaging.command.flow.InstallOneSwitchFlow) InstallRulesAction(org.openkilda.messaging.command.switches.InstallRulesAction) TRANSIT_TABLE_ID(org.openkilda.floodlight.switchmanager.SwitchManager.TRANSIT_TABLE_ID) InstallGroupRequest(org.openkilda.messaging.command.switches.InstallGroupRequest) InstallEgressMirrorFlow(org.openkilda.messaging.command.flow.InstallEgressMirrorFlow) VERIFICATION_UNICAST_RULE_COOKIE(org.openkilda.model.cookie.Cookie.VERIFICATION_UNICAST_RULE_COOKIE) FlowCommandException(org.openkilda.floodlight.error.FlowCommandException) GroupSpeakerData(org.openkilda.rulemanager.GroupSpeakerData) InstallIslDefaultRulesResult(org.openkilda.messaging.info.discovery.InstallIslDefaultRulesResult) FlowRemoveResponse(org.openkilda.messaging.info.flow.FlowRemoveResponse) FlowSegmentWrapperCommand(org.openkilda.floodlight.command.flow.FlowSegmentWrapperCommand) VERIFICATION_BROADCAST_RULE_COOKIE(org.openkilda.model.cookie.Cookie.VERIFICATION_BROADCAST_RULE_COOKIE) ErrorMessage(org.openkilda.messaging.error.ErrorMessage) InfoMessage(org.openkilda.messaging.info.InfoMessage) IngressFlowLoopSegmentInstallCommand(org.openkilda.floodlight.command.flow.ingress.IngressFlowLoopSegmentInstallCommand) DumpMetersRequest(org.openkilda.messaging.command.switches.DumpMetersRequest) InstallServer42Flow(org.openkilda.messaging.command.flow.InstallServer42Flow) IngressFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.ingress.IngressFlowSegmentInstallCommand) ARP_POST_INGRESS_COOKIE(org.openkilda.model.cookie.Cookie.ARP_POST_INGRESS_COOKIE) DeleteRulesCriteria(org.openkilda.messaging.command.switches.DeleteRulesCriteria) LoggerFactory(org.slf4j.LoggerFactory) InstallTransitFlow(org.openkilda.messaging.command.flow.InstallTransitFlow) ARP_INPUT_PRE_DROP_COOKIE(org.openkilda.model.cookie.Cookie.ARP_INPUT_PRE_DROP_COOKIE) InstallOneSwitchMirrorFlow(org.openkilda.messaging.command.flow.InstallOneSwitchMirrorFlow) DumpGroupsForSwitchManagerRequest(org.openkilda.messaging.command.switches.DumpGroupsForSwitchManagerRequest) SwitchRulesDeleteRequest(org.openkilda.messaging.command.switches.SwitchRulesDeleteRequest) BaseFlow(org.openkilda.messaging.command.flow.BaseFlow) SERVER_42_FLOW_RTT_OUTPUT_VXLAN_COOKIE(org.openkilda.model.cookie.Cookie.SERVER_42_FLOW_RTT_OUTPUT_VXLAN_COOKIE) ReinstallDefaultFlowForSwitchManagerRequest(org.openkilda.messaging.command.flow.ReinstallDefaultFlowForSwitchManagerRequest) InstallGroupResponse(org.openkilda.messaging.info.switches.InstallGroupResponse) PortConfigurationRequest(org.openkilda.messaging.command.switches.PortConfigurationRequest) MeterConfig(org.openkilda.model.MeterConfig) ConnectModeRequest(org.openkilda.messaging.command.switches.ConnectModeRequest) TypeReference(com.fasterxml.jackson.core.type.TypeReference) ModifyFlowMeterForSwitchManagerRequest(org.openkilda.messaging.command.flow.ModifyFlowMeterForSwitchManagerRequest) OFGroupDescStatsEntry(org.projectfloodlight.openflow.protocol.OFGroupDescStatsEntry) LLDP_POST_INGRESS_VXLAN_COOKIE(org.openkilda.model.cookie.Cookie.LLDP_POST_INGRESS_VXLAN_COOKIE) ModifyMeterResponse(org.openkilda.messaging.info.switches.ModifyMeterResponse) FlowReinstallResponse(org.openkilda.messaging.info.flow.FlowReinstallResponse) IngressServer42FlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.IngressServer42FlowInstallCommand) InfoData(org.openkilda.messaging.info.InfoData) OfGroupConverter(org.openkilda.floodlight.converter.rulemanager.OfGroupConverter) TransitFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.transit.TransitFlowSegmentInstallCommand) String.format(java.lang.String.format) UnsupportedSwitchOperationException(org.openkilda.floodlight.error.UnsupportedSwitchOperationException) InstallEgressFlow(org.openkilda.messaging.command.flow.InstallEgressFlow) DumpRulesRequest(org.openkilda.messaging.command.switches.DumpRulesRequest) List(java.util.List) INGRESS_TABLE_ID(org.openkilda.floodlight.switchmanager.SwitchManager.INGRESS_TABLE_ID) FlowSegmentMetadata(org.openkilda.floodlight.model.FlowSegmentMetadata) FlowInstallResponse(org.openkilda.messaging.info.flow.FlowInstallResponse) Optional(java.util.Optional) JsonMappingException(com.fasterxml.jackson.databind.JsonMappingException) CommandData(org.openkilda.messaging.command.CommandData) DeleterMeterForSwitchManagerRequest(org.openkilda.messaging.command.switches.DeleterMeterForSwitchManagerRequest) Getter(lombok.Getter) ARP_POST_INGRESS_ONE_SWITCH_COOKIE(org.openkilda.model.cookie.Cookie.ARP_POST_INGRESS_ONE_SWITCH_COOKIE) Cookie(org.openkilda.model.cookie.Cookie) SERVER_42_FLOW_RTT_OUTPUT_VLAN_COOKIE(org.openkilda.model.cookie.Cookie.SERVER_42_FLOW_RTT_OUTPUT_VLAN_COOKIE) ARP_TRANSIT_COOKIE(org.openkilda.model.cookie.Cookie.ARP_TRANSIT_COOKIE) ErrorMessageBuilder.anError(org.openkilda.floodlight.kafka.ErrorMessageBuilder.anError) SERVER_42_ISL_RTT_TURNING_COOKIE(org.openkilda.model.cookie.Cookie.SERVER_42_ISL_RTT_TURNING_COOKIE) OfMeterConverter(org.openkilda.floodlight.converter.OfMeterConverter) SwitchId(org.openkilda.model.SwitchId) SwitchRulesResponse(org.openkilda.messaging.info.switches.SwitchRulesResponse) VisibleForTesting(com.google.common.annotations.VisibleForTesting) ErrorData(org.openkilda.messaging.error.ErrorData) LLDP_POST_INGRESS_ONE_SWITCH_COOKIE(org.openkilda.model.cookie.Cookie.LLDP_POST_INGRESS_ONE_SWITCH_COOKIE) FlowDumpResponse(org.openkilda.messaging.info.flow.FlowDumpResponse) FlowSpeakerData(org.openkilda.rulemanager.FlowSpeakerData) SwitchNotFoundException(org.openkilda.floodlight.error.SwitchNotFoundException) FlowCommandErrorData(org.openkilda.messaging.error.rule.FlowCommandErrorData) ErrorData(org.openkilda.messaging.error.ErrorData)

Aggregations

MessageData (org.openkilda.messaging.MessageData)9 Message (org.openkilda.messaging.Message)4 CommandMessage (org.openkilda.messaging.command.CommandMessage)4 ErrorData (org.openkilda.messaging.error.ErrorData)4 Values (org.apache.storm.tuple.Values)3 TypeReference (com.fasterxml.jackson.core.type.TypeReference)2 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)2 ImmutableList (com.google.common.collect.ImmutableList)2 IOException (java.io.IOException)2 String.format (java.lang.String.format)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 List (java.util.List)2 Map (java.util.Map)2 Objects (java.util.Objects)2 Optional (java.util.Optional)2 Set (java.util.Set)2 UUID (java.util.UUID)2 Collectors (java.util.stream.Collectors)2