use of org.onosproject.segmentrouting.xconnect.api.XconnectEndpoint in project trellis-control by opennetworkinglab.
the class XconnectManager method revokeXConnect.
/**
* Revokes XConnect groups and flows for given key.
*
* @param key XConnect key
* @param endpoints XConnect endpoints
*/
private void revokeXConnect(XconnectKey key, Set<XconnectEndpoint> endpoints) {
if (!srService.shouldProgram(key.deviceId())) {
log.debug("Abort revoking XConnect {}: {}", key, ERROR_NOT_LEADER);
return;
}
revokeFilter(key, endpoints);
int nextId = Versioned.valueOrElse(xconnectNextObjStore.get(key), -1);
if (nextId != -1) {
revokeFwd(key, nextId, null);
revokeNext(key, endpoints, nextId, null);
} else {
log.warn("NextObj for {} does not exist in the store.", key);
}
revokeFilter(key, endpoints);
revokeAcl(key);
}
use of org.onosproject.segmentrouting.xconnect.api.XconnectEndpoint in project trellis-control by opennetworkinglab.
the class XconnectManager method dequeue.
// Invalidate the cache and re-start the xconnect installation
private void dequeue(PortLoadBalancerId portLoadBalancerId) {
XconnectKey xconnectKey = portLoadBalancerCache.getIfPresent(portLoadBalancerId);
if (xconnectKey == null) {
log.trace("{} not present in the cache", portLoadBalancerId);
return;
}
log.debug("Dequeue {}", portLoadBalancerId);
portLoadBalancerCache.invalidate(portLoadBalancerId);
Set<XconnectEndpoint> endpoints = Versioned.valueOrNull(xconnectStore.get(xconnectKey));
if (endpoints == null || endpoints.isEmpty()) {
log.warn("Endpoints not found for XConnect {}", xconnectKey);
return;
}
populateXConnect(xconnectKey, endpoints);
log.trace("PortLoadBalancer cache size {}", portLoadBalancerCache.size());
}
Aggregations