use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev200120.pmsi.tunnel.PmsiTunnelBuilder in project bgpcep by opendaylight.
the class PMSITunnelAttributeHandlerTestUtil method buildRsvpTep2MPLspAttribute.
static Attributes buildRsvpTep2MPLspAttribute() {
final PmsiTunnelBuilder pmsiTunnelBuilder = getPmsiTunnelBuilder();
pmsiTunnelBuilder.setTunnelIdentifier(new RsvpTeP2mpLspBuilder().setRsvpTeP2mpLps(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev160812.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.rsvp.te.p2mp.lsp.RsvpTeP2mpLpsBuilder().setP2mpId(3458L).setTunnelId(15).setExtendedTunnelId(IP_ADDRESS).build()).build());
return buildAttribute(pmsiTunnelBuilder);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev200120.pmsi.tunnel.PmsiTunnelBuilder in project bgpcep by opendaylight.
the class PMSITunnelAttributeHandlerTestUtil method buildNoSupportedOpaqueAttribute.
static Attributes buildNoSupportedOpaqueAttribute() {
final PmsiTunnelBuilder pmsiTunnelBuilder = getPmsiTunnelBuilder();
final List<OpaqueValue> nonSupported = singletonList(new OpaqueValueBuilder().setOpaque(OPAQUE_TEST).setOpaqueType(NO_SUPPORTED_OPAQUE).build());
pmsiTunnelBuilder.setTunnelIdentifier(buildMldpP2mpLsp(IP_ADDRESS, Ipv4AddressFamily.class, nonSupported));
return buildAttribute(pmsiTunnelBuilder);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev200120.pmsi.tunnel.PmsiTunnelBuilder in project bgpcep by opendaylight.
the class PMSITunnelAttributeHandler method parseAttribute.
@Override
public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder, final PeerSpecificParserConstraint constraint) {
// FIXME: BGPCEP-359: what is the error handling here?
if (!buffer.isReadable()) {
return;
}
final PmsiTunnelBuilder pmsiTunnelBuilder = new PmsiTunnelBuilder();
pmsiTunnelBuilder.setLeafInformationRequired(buffer.readBoolean());
final int tunnelType = buffer.readUnsignedByte();
parseMpls(pmsiTunnelBuilder, buffer);
final TunnelIdentifier tunnelIdentifier = this.tunnelIdentifierHandler.parse(tunnelType, buffer);
if (tunnelIdentifier != null) {
pmsiTunnelBuilder.setTunnelIdentifier(tunnelIdentifier);
}
builder.addAugmentation(new PmsiTunnelAugmentationBuilder().setPmsiTunnel(pmsiTunnelBuilder.build()).build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev200120.pmsi.tunnel.PmsiTunnelBuilder in project bgpcep by opendaylight.
the class PMSITunnelAttributeHandlerTestUtil method buildIngressReplicationAttribute.
static Attributes buildIngressReplicationAttribute() {
final PmsiTunnelBuilder pmsiTunnelBuilder = getPmsiTunnelBuilder();
pmsiTunnelBuilder.setTunnelIdentifier(new IngressReplicationBuilder().setIngressReplication(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev200120.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.ingress.replication.IngressReplicationBuilder().setReceivingEndpointAddress(IP_ADDRESS).build()).build());
return buildAttribute(pmsiTunnelBuilder);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev200120.pmsi.tunnel.PmsiTunnelBuilder in project bgpcep by opendaylight.
the class PMSITunnelAttributeHandlerTestUtil method buildMldpP2mpLspIpv4Attribute.
static Attributes buildMldpP2mpLspIpv4Attribute() {
final PmsiTunnelBuilder pmsiTunnelBuilder = getPmsiTunnelBuilder();
pmsiTunnelBuilder.setTunnelIdentifier(buildMldpP2mpLsp(IP_ADDRESS, Ipv4AddressFamily.class, createOpaqueList()));
return buildAttribute(pmsiTunnelBuilder);
}
Aggregations