use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.sessions.Session in project bgpcep by opendaylight.
the class PCCTunnelManagerImpl method onSessionDown.
@Override
public synchronized void onSessionDown(final PCCSession session) {
for (final Entry<PlspId, PCCTunnel> entry : this.tunnels.entrySet()) {
final PCCTunnel tunnel = entry.getValue();
final PlspId plspId = entry.getKey();
// deal with delegations
if (hasDelegation(tunnel, session)) {
startStateTimeout(tunnel, entry.getKey());
startRedelegationTimer(tunnel, plspId, session);
}
}
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.sessions.Session in project bgpcep by opendaylight.
the class PCCTunnelManagerImpl method sendEndOfSynchronization.
private void sendEndOfSynchronization(final PCCSession session, final Optional<SrpIdNumber> operationId) {
Srp srp = null;
if (operationId.isPresent()) {
srp = new SrpBuilder().setOperationId(operationId.get()).build();
}
Optional<Tlvs> tlv = Optional.empty();
if (this.syncOptimization.isSyncAvoidanceEnabled()) {
tlv = createLspTlvsEndofSync(this.syncOptimization.incrementLspDBVersion().get());
}
final Pcrpt pcrtp = createPcRtpMessage(createLsp(Uint32.ZERO, false, tlv, true, false), Optional.ofNullable(srp), createPath(Collections.emptyList()));
session.sendReport(pcrtp);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.sessions.Session in project bgpcep by opendaylight.
the class PCCTunnelManagerImpl method reportAllKnownLsp.
private void reportAllKnownLsp(final Optional<SrpIdNumber> operationId, final PCCSession session) {
Srp srp = null;
if (operationId.isPresent()) {
srp = new SrpBuilder().setOperationId(operationId.get()).build();
}
for (final Entry<PlspId, PCCTunnel> entry : this.tunnels.entrySet()) {
final PCCTunnel tunnel = entry.getValue();
final Uint32 plspId = entry.getKey().getValue();
createLspAndSendReport(plspId, tunnel, session, Optional.empty(), Optional.ofNullable(srp));
}
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.sessions.Session in project bgpcep by opendaylight.
the class AbstractPCEPSessionNegotiator method startNegotiationWithOpen.
private void startNegotiationWithOpen() {
this.localPrefs = getInitialProposal();
final OpenMessage m = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev181109.OpenBuilder().setOpenMessage(new OpenMessageBuilder().setOpen(this.localPrefs).build()).build();
this.sendMessage(m);
this.state = State.OPEN_WAIT;
scheduleFailTimer();
LOG.info("PCEP session with {} started, sent proposal {}", this.channel, this.localPrefs);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.sessions.Session in project bgpcep by opendaylight.
the class PCCTunnelManagerImpl method handledDbTriggeredResync.
private void handledDbTriggeredResync(final Updates update, final PCCSession session) {
this.syncOptimization.setResynchronizingState(true);
final SrpIdNumber operationId = update.getSrp().getOperationId();
if (update.getLsp().getPlspId().getValue().toJava() == 0) {
reportAllKnownLsp(Optional.of(operationId), session);
} else {
reportLsp(update.getLsp().getPlspId(), operationId, session);
}
sendEndOfSynchronization(session, Optional.of(operationId));
this.syncOptimization.setResynchronizingState(false);
}
Aggregations