use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.as.specific.extended.community._case.AsSpecificExtendedCommunity in project bgpcep by opendaylight.
the class AsTwoOctetSpecificEcHandler method serializeExtendedCommunity.
@Override
public void serializeExtendedCommunity(final ExtendedCommunity extendedCommunity, final ByteBuf byteAggregator) {
Preconditions.checkArgument(extendedCommunity instanceof AsSpecificExtendedCommunityCase, "The extended community %s is not AsSpecificExtendedCommunity type.", extendedCommunity);
final AsSpecificExtendedCommunity asSpecific = ((AsSpecificExtendedCommunityCase) extendedCommunity).getAsSpecificExtendedCommunity();
byteAggregator.writeShort(asSpecific.getGlobalAdministrator().getValue().intValue());
byteAggregator.writeBytes(asSpecific.getLocalAdministrator());
}
Aggregations