Search in sources :

Example 1 with RedirectExtendedCommunity

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());
}
Also used : RedirectExtendedCommunity(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.redirect.extended.community.RedirectExtendedCommunity)

Aggregations

RedirectExtendedCommunity (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.redirect.extended.community.RedirectExtendedCommunity)1