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.rev160812.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 buildMLDpMp2mPLspAttribute.
static Attributes buildMLDpMp2mPLspAttribute() {
final PmsiTunnelBuilder pmsiTunnelBuilder = getPmsiTunnelBuilder();
pmsiTunnelBuilder.setTunnelIdentifier(new MldpMp2mpLspBuilder().setMldpMp2mpLsp(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev160812.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.mldp.mp2mp.lsp.MldpMp2mpLspBuilder().setOpaque(OPAQUE_TEST).setOpaqueType(OpaqueUtil.GENERIC_LSP_IDENTIFIER).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 getPmsiTunnelBuilder.
private static PmsiTunnelBuilder getPmsiTunnelBuilder() {
final PmsiTunnelBuilder pmsiTunnelBuilder = new PmsiTunnelBuilder();
pmsiTunnelBuilder.setLeafInformationRequired(true);
pmsiTunnelBuilder.setMplsLabel(MPLS_LABEL);
return 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 buildMldpp2MPLspL2vpnAttribute.
static Attributes buildMldpp2MPLspL2vpnAttribute() {
final PmsiTunnelBuilder pmsiTunnelBuilder = getPmsiTunnelBuilder();
pmsiTunnelBuilder.setTunnelIdentifier(buildMldpP2mpLsp(IP_ADDRESS, L2vpnAddressFamily.class, createOpaqueList()));
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(@Nonnull final ByteBuf buffer, @Nonnull final AttributesBuilder builder) {
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(PmsiTunnelAugmentation.class, new PmsiTunnelAugmentationBuilder().setPmsiTunnel(pmsiTunnelBuilder.build()).build());
}
Aggregations