Search in sources :

Example 1 with MacAutoGenerated

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.mac.auto.generated._case.MacAutoGenerated in project bgpcep by opendaylight.

the class MacParser method serializeBody.

@Override
public ByteBuf serializeBody(final Esi esi, final ByteBuf body) {
    checkArgument(esi instanceof MacAutoGeneratedCase, "Unknown esi instance. Passed %s. Needed MacAutoGeneratedCase.", esi.getClass());
    final MacAutoGenerated macAuto = ((MacAutoGeneratedCase) esi).getMacAutoGenerated();
    body.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(macAuto.getSystemMacAddress()));
    RFC8294ByteBufUtils.writeUint24(body, macAuto.getLocalDiscriminator());
    return body;
}
Also used : MacAutoGenerated(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.mac.auto.generated._case.MacAutoGenerated) MacAutoGeneratedCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.MacAutoGeneratedCase)

Aggregations

MacAutoGeneratedCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.MacAutoGeneratedCase)1 MacAutoGenerated (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.mac.auto.generated._case.MacAutoGenerated)1