Search in sources :

Example 46 with IslReference

use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.

the class NetworkUniIslService method roundTripStatusNotification.

/**
 * Process round trip status notification.
 */
public void roundTripStatusNotification(RoundTripStatus status) {
    log.debug("Uni-ISL service receive ROUND TRIP STATUS notification");
    IslReference reference = lookupEndpointData(status.getEndpoint());
    if (isIslReferenceUsable(reference)) {
        carrier.notifyIslRoundTripStatus(reference, status);
    }
}
Also used : IslReference(org.openkilda.wfm.share.model.IslReference)

Example 47 with IslReference

use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.

the class NetworkUniIslService method uniIslSetup.

/**
 * .
 */
public void uniIslSetup(Endpoint endpoint, Isl history) {
    log.info("Uni-ISL service receive SETUP request for {}", endpoint);
    IslReference reference;
    if (history != null) {
        reference = IslReference.of(history);
        carrier.setupIslFromHistory(endpoint, reference, history);
    } else {
        reference = IslReference.of(endpoint);
    }
    endpointData.put(endpoint, reference);
}
Also used : IslReference(org.openkilda.wfm.share.model.IslReference)

Example 48 with IslReference

use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.

the class IslStatusUpdateBolt method handleIslStatusUpdateNotification.

private void handleIslStatusUpdateNotification(Tuple tuple, IslStatusUpdateNotification notification) {
    IslReference islReference = new IslReference(Endpoint.of(notification.getSrcSwitchId(), notification.getSrcPortNo()), Endpoint.of(notification.getDstSwitchId(), notification.getDstPortNo()));
    Values values = new Values(islReference, notification, getCommandContext());
    getOutput().emit(StreamType.ISL_STATUS.toString(), tuple, values);
}
Also used : IslReference(org.openkilda.wfm.share.model.IslReference) Values(org.apache.storm.tuple.Values)

Example 49 with IslReference

use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.

the class CacheBolt method emitCachedData.

@Override
public void emitCachedData(IslRoundTripLatency data, Endpoint destination) {
    IslReference islReference = new IslReference(Endpoint.of(data.getSrcSwitchId(), data.getSrcPortNo()), destination);
    Values values = new Values(islReference, data, destination, getCommandContext());
    getOutput().emit(StreamType.LATENCY.toString(), getCurrentTuple(), values);
}
Also used : IslReference(org.openkilda.wfm.share.model.IslReference) Values(org.apache.storm.tuple.Values)

Example 50 with IslReference

use of org.openkilda.wfm.share.model.IslReference in project open-kilda by telstra.

the class OneWayLatencyManipulationBolt method emitIslOneWayLatency.

@Override
public void emitIslOneWayLatency(IslOneWayLatency islOneWayLatency) throws PipelineException {
    IslReference islReference = pullValue(getCurrentTuple(), ISL_GROUPING_FIELD, IslReference.class);
    Values values = new Values(islReference, islOneWayLatency, getCommandContext());
    getOutput().emit(StreamType.LATENCY.toString(), getCurrentTuple(), values);
}
Also used : IslReference(org.openkilda.wfm.share.model.IslReference) Values(org.apache.storm.tuple.Values)

Aggregations

IslReference (org.openkilda.wfm.share.model.IslReference)50 Test (org.junit.Test)30 IslDataHolder (org.openkilda.wfm.topology.network.model.IslDataHolder)16 Isl (org.openkilda.model.Isl)13 RoundTripStatus (org.openkilda.wfm.topology.network.model.RoundTripStatus)10 Endpoint (org.openkilda.wfm.share.model.Endpoint)8 Instant (java.time.Instant)4 Values (org.apache.storm.tuple.Values)4 RemoveIslDefaultRulesResult (org.openkilda.messaging.info.discovery.RemoveIslDefaultRulesResult)4 Ignore (org.junit.Ignore)3 Switch (org.openkilda.model.Switch)3 Duration (java.time.Duration)2 Collections (java.util.Collections)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 Objects (java.util.Objects)2 Optional (java.util.Optional)2 AllArgsConstructor (lombok.AllArgsConstructor)2 EqualsAndHashCode (lombok.EqualsAndHashCode)2