use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.source.as.extended.community._case.SourceAsExtendedCommunity in project bgpcep by opendaylight.
the class SourceASHandler method serializeExtendedCommunity.
@Override
public void serializeExtendedCommunity(final ExtendedCommunity extendedCommunity, final ByteBuf body) {
Preconditions.checkArgument(extendedCommunity instanceof SourceAsExtendedCommunityCase, "The extended community %s is not SourceAsExtendedCommunityCase type.", extendedCommunity);
final SourceAsExtendedCommunity excomm = ((SourceAsExtendedCommunityCase) extendedCommunity).getSourceAsExtendedCommunity();
body.writeShort(excomm.getGlobalAdministrator().getValue().intValue());
body.writeInt(LOCAL_ADMIN);
}
Aggregations