Search in sources :

Example 1 with RouterIdGenerated

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.esi.esi.router.id.generated._case.RouterIdGenerated in project bgpcep by opendaylight.

the class RouterIdParser method serializeBody.

@Override
public void serializeBody(final Esi esi, final ByteBuf body) {
    Preconditions.checkArgument(esi instanceof RouterIdGeneratedCase, "Unknown esi instance. Passed %s. Needed RouterIdGeneratedCase.", esi.getClass());
    final RouterIdGenerated routerID = ((RouterIdGeneratedCase) esi).getRouterIdGenerated();
    ByteBufWriteUtil.writeIpv4Address(routerID.getRouterId(), body);
    ByteBufWriteUtil.writeUnsignedInt(routerID.getLocalDiscriminator(), body);
    body.writeZero(ZERO_BYTE);
}
Also used : RouterIdGenerated(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.esi.esi.router.id.generated._case.RouterIdGenerated) RouterIdGeneratedCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.esi.esi.RouterIdGeneratedCase)

Aggregations

RouterIdGeneratedCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.esi.esi.RouterIdGeneratedCase)1 RouterIdGenerated (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.esi.esi.router.id.generated._case.RouterIdGenerated)1