Search in sources :

Example 6 with LspErrorCode

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.error.code.tlv.LspErrorCode in project bgpcep by opendaylight.

the class StatefulLspUpdateErrorTlvParser method serializeTlv.

@Override
public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
    checkArgument(tlv instanceof LspErrorCode, "LspErrorCodeTlv is mandatory.");
    final ByteBuf body = Unpooled.buffer(Integer.BYTES);
    ByteBufUtils.writeOrZero(body, ((LspErrorCode) tlv).getErrorCode());
    TlvUtil.formatTlv(TYPE, body, buffer);
}
Also used : LspErrorCode(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.error.code.tlv.LspErrorCode) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

ByteBuf (io.netty.buffer.ByteBuf)6 Test (org.junit.Test)4 LspErrorCode (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.error.code.tlv.LspErrorCode)4 ObjectHeaderImpl (org.opendaylight.protocol.pcep.spi.ObjectHeaderImpl)3 LspErrorCodeBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.error.code.tlv.LspErrorCodeBuilder)3 StatefulActivator (org.opendaylight.protocol.pcep.ietf.stateful.StatefulActivator)2 LspErrorCode (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.lsp.error.code.tlv.LspErrorCode)2 PlspId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.PlspId)2 LspBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.object.LspBuilder)2 SymbolicPathName (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.symbolic.path.name.tlv.SymbolicPathName)2 SymbolicPathNameBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.symbolic.path.name.tlv.SymbolicPathNameBuilder)2 Ipv4ExtendedTunnelId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.Ipv4ExtendedTunnelId)2 LspId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspId)2 TunnelId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.TunnelId)2 StatefulLspObjectParser (org.opendaylight.protocol.pcep.ietf.stateful.StatefulLspObjectParser)1 StatefulLspUpdateErrorTlvParser (org.opendaylight.protocol.pcep.ietf.stateful.StatefulLspUpdateErrorTlvParser)1 Stateful07LspObjectParser (org.opendaylight.protocol.pcep.ietf.stateful07.Stateful07LspObjectParser)1 SyncOptimizationsActivator (org.opendaylight.protocol.pcep.sync.optimizations.SyncOptimizationsActivator)1 SyncOptimizationsLspObjectParser (org.opendaylight.protocol.pcep.sync.optimizations.SyncOptimizationsLspObjectParser)1 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)1