use of org.openkilda.wfm.topology.network.model.IslEndpointPollStatus in project open-kilda by telstra.
the class DiscoveryPollMonitor method actualFlush.
@Override
protected void actualFlush(Endpoint endpoint, Isl persistentView) {
IslEndpointPollStatus pollStatus = discoveryData.get(endpoint);
IslDataHolder islData = makeAggregatedIslData(pollStatus.getIslData(), discoveryData.get(reference.getOpposite(endpoint)).getIslData());
if (islData == null) {
log.error("There is no ISL data available for {}, unable to calculate available_bandwidth", reference);
} else {
persistentView.setSpeed(islData.getSpeed());
persistentView.setMaxBandwidth(islData.getMaximumBandwidth());
persistentView.setDefaultMaxBandwidth(islData.getEffectiveMaximumBandwidth());
}
persistentView.setActualStatus(pollStatus.getStatus());
}
use of org.openkilda.wfm.topology.network.model.IslEndpointPollStatus in project open-kilda by telstra.
the class DiscoveryPollMonitor method actualUpdate.
@Override
public void actualUpdate(IslFsmEvent event, IslFsmContext context) {
Endpoint endpoint = context.getEndpoint();
IslEndpointPollStatus update = discoveryData.get(endpoint);
switch(event) {
case ISL_UP:
update = new IslEndpointPollStatus(context.getIslData(), IslStatus.ACTIVE);
log.info("ISL {} data update - bind:{} - {}", reference, endpoint, update.getIslData());
break;
case ISL_DOWN:
update = new IslEndpointPollStatus(update.getIslData(), IslStatus.INACTIVE);
break;
case ISL_MOVE:
// We must track MOVED state, because poll and moved monitor save it's status
// inside same field {@link Isl.actualStatus}. In other case we will rewrite MOVED state
// saved by {@link DiscoveryMovedMonitor} with our ovn "vision".
update = new IslEndpointPollStatus(update.getIslData(), IslStatus.MOVED);
break;
default:
}
discoveryData.put(endpoint, update);
}
use of org.openkilda.wfm.topology.network.model.IslEndpointPollStatus in project open-kilda by telstra.
the class DiscoveryPollMonitor method load.
@Override
public void load(Endpoint endpoint, Isl persistentView) {
super.load(endpoint, persistentView);
IslDataHolder islData = new IslDataHolder(persistentView);
IslEndpointPollStatus status = new IslEndpointPollStatus(islData, persistentView.getStatus());
discoveryData.put(endpoint, status);
cache.put(endpoint, status);
}
Aggregations