use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.redirect.extended.community.RedirectExtendedCommunity in project bgpcep by opendaylight.
the class RedirectAsTwoOctetEcHandler method serializeExtendedCommunity.
@Override
public void serializeExtendedCommunity(final ExtendedCommunity extendedCommunity, final ByteBuf byteAggregator) {
checkArgument(extendedCommunity instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.RedirectExtendedCommunity, "The extended community %s is not RedirectExtendedCommunityCase type.", extendedCommunity);
final RedirectExtendedCommunity redirect = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.RedirectExtendedCommunity) extendedCommunity).getRedirectExtendedCommunity();
byteAggregator.writeShort(redirect.getGlobalAdministrator().getValue().intValue());
byteAggregator.writeBytes(redirect.getLocalAdministrator());
}
Aggregations