use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev160812.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.RsvpTeP2mpLsp in project bgpcep by opendaylight.
the class RsvpTeP2MpLspParser method serialize.
@Override
public int serialize(final TunnelIdentifier tunnelIdentifier, final ByteBuf buffer) {
Preconditions.checkArgument(tunnelIdentifier instanceof RsvpTeP2mpLsp, "The tunnelIdentifier %s is not RsvpTeP2mpLps type.", tunnelIdentifier);
final RsvpTeP2mpLps rsvpTeP2mpLsp = ((RsvpTeP2mpLsp) tunnelIdentifier).getRsvpTeP2mpLps();
ByteBufWriteUtil.writeUnsignedInt(rsvpTeP2mpLsp.getP2mpId(), buffer);
buffer.writeZero(RESERVED);
ByteBufWriteUtil.writeUnsignedShort(rsvpTeP2mpLsp.getTunnelId(), buffer);
serializeIpAddress(rsvpTeP2mpLsp.getExtendedTunnelId(), buffer);
return TunnelType.RSVP_TE_P2MP_LSP.getIntValue();
}
Aggregations