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;
}
Aggregations