Search in sources :

Example 1 with BfdWorkerLogicalPortDeleteResponse

use of org.openkilda.wfm.topology.network.storm.bolt.bfd.worker.response.BfdWorkerLogicalPortDeleteResponse in project open-kilda by telstra.

the class GrpcRouter method route.

private void route(Tuple input, InfoMessage message) throws PipelineException {
    InfoData payload = message.getData();
    String key = pullKey(input);
    if (payload instanceof CreateLogicalPortResponse) {
        emit(STREAM_BFD_WORKER_ID, input, makeBfdWorkerTuple(key, new BfdWorkerLogicalPortCreateResponse((CreateLogicalPortResponse) payload)));
    } else if (payload instanceof DeleteLogicalPortResponse) {
        emit(STREAM_BFD_WORKER_ID, input, makeBfdWorkerTuple(key, new BfdWorkerLogicalPortDeleteResponse((DeleteLogicalPortResponse) payload)));
    } else {
        log.debug("Ignore GRPC message {}: {}", payload.getClass().getName(), payload);
    }
}
Also used : BfdWorkerLogicalPortDeleteResponse(org.openkilda.wfm.topology.network.storm.bolt.bfd.worker.response.BfdWorkerLogicalPortDeleteResponse) CreateLogicalPortResponse(org.openkilda.messaging.info.grpc.CreateLogicalPortResponse) InfoData(org.openkilda.messaging.info.InfoData) BfdWorkerLogicalPortCreateResponse(org.openkilda.wfm.topology.network.storm.bolt.bfd.worker.response.BfdWorkerLogicalPortCreateResponse) DeleteLogicalPortResponse(org.openkilda.messaging.info.grpc.DeleteLogicalPortResponse)

Aggregations

InfoData (org.openkilda.messaging.info.InfoData)1 CreateLogicalPortResponse (org.openkilda.messaging.info.grpc.CreateLogicalPortResponse)1 DeleteLogicalPortResponse (org.openkilda.messaging.info.grpc.DeleteLogicalPortResponse)1 BfdWorkerLogicalPortCreateResponse (org.openkilda.wfm.topology.network.storm.bolt.bfd.worker.response.BfdWorkerLogicalPortCreateResponse)1 BfdWorkerLogicalPortDeleteResponse (org.openkilda.wfm.topology.network.storm.bolt.bfd.worker.response.BfdWorkerLogicalPortDeleteResponse)1