use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.srp.object.SrpBuilder in project bgpcep by opendaylight.
the class PCCTriggeredFullDBResyncTest method createTriggerLspResync.
private static Message createTriggerLspResync() {
final SrpBuilder srpBuilder = new SrpBuilder().setOperationId(new SrpIdNumber(Uint32.ONE)).setProcessingRule(Boolean.TRUE);
final Srp srp = srpBuilder.build();
final Lsp lsp = new LspBuilder().setPlspId(new PlspId(Uint32.ZERO)).setSync(Boolean.TRUE).build();
final UpdatesBuilder rb = new UpdatesBuilder().setSrp(srp).setLsp(lsp).setPath(new PathBuilder().build());
final PcupdMessageBuilder ub = new PcupdMessageBuilder();
ub.setUpdates(Collections.singletonList(rb.build()));
return new PcupdBuilder().setPcupdMessage(ub.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.srp.object.SrpBuilder in project bgpcep by opendaylight.
the class PCCTriggeredSyncTest method createTriggerMsg.
private static Message createTriggerMsg() {
final UpdatesBuilder rb = new UpdatesBuilder().setSrp(new SrpBuilder().setIgnore(false).setProcessingRule(false).setOperationId(new SrpIdNumber(Uint32.ONE)).build()).setLsp(new LspBuilder().setPlspId(new PlspId(Uint32.ZERO)).setSync(Boolean.TRUE).build()).setPath(new PathBuilder().build());
final PcupdMessageBuilder ub = new PcupdMessageBuilder();
ub.setUpdates(Collections.singletonList(rb.build()));
return new PcupdBuilder().setPcupdMessage(ub.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.srp.object.SrpBuilder in project bgpcep by opendaylight.
the class PCCTunnelManagerImpl method removeTunnel.
protected void removeTunnel(final Requests request, final PCCSession session) {
final PlspId plspId = request.getLsp().getPlspId();
final PCCTunnel tunnel = this.tunnels.get(plspId);
final Uint32 srpId = request.getSrp().getOperationId().getValue();
if (tunnel != null) {
if (tunnel.getType() == LspType.PCE_LSP) {
if (hasDelegation(tunnel, session)) {
this.tunnels.remove(plspId);
sendToAll(tunnel, plspId, tunnel.getLspState().getEro().getSubobject(), new SrpBuilder(request.getSrp()).addAugmentation(new Srp1Builder().setRemove(true).build()).build(), reqToRptPath(request), request.getLsp());
} else {
session.sendError(MsgBuilderUtil.createErrorMsg(PCEPErrors.UPDATE_REQ_FOR_NON_LSP, srpId));
}
} else {
session.sendError(MsgBuilderUtil.createErrorMsg(PCEPErrors.LSP_NOT_PCE_INITIATED, srpId));
}
} else {
session.sendError(MsgBuilderUtil.createErrorMsg(PCEPErrors.UNKNOWN_PLSP_ID, srpId));
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.srp.object.SrpBuilder in project bgpcep by opendaylight.
the class PCCTunnelManagerImpl method reportLsp.
private void reportLsp(final PlspId plspId, final SrpIdNumber operationId, final PCCSession session) {
final PCCTunnel tunnel = this.tunnels.get(plspId);
if (tunnel == null) {
return;
}
final Srp srp = new SrpBuilder().setOperationId(operationId).build();
createLspAndSendReport(plspId.getValue(), tunnel, session, Optional.of(Boolean.TRUE), Optional.of(srp));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.srp.object.SrpBuilder in project bgpcep by opendaylight.
the class PCCTriggeredLspResyncTest method createTriggerLspResync.
private static Message createTriggerLspResync() {
final SrpBuilder srpBuilder = new SrpBuilder();
srpBuilder.setOperationId(new SrpIdNumber(Uint32.ONE));
srpBuilder.setProcessingRule(Boolean.TRUE);
final Srp srp = srpBuilder.build();
final Lsp lsp = new LspBuilder().setPlspId(new PlspId(Uint32.TWO)).setSync(Boolean.TRUE).build();
final UpdatesBuilder rb = new UpdatesBuilder();
rb.setSrp(srp);
rb.setLsp(lsp);
final PathBuilder pb = new PathBuilder();
rb.setPath(pb.build());
final PcupdMessageBuilder ub = new PcupdMessageBuilder();
ub.setUpdates(Collections.singletonList(rb.build()));
return new PcupdBuilder().setPcupdMessage(ub.build()).build();
}
Aggregations