Search in sources :

Example 1 with RedirectAs4

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.redirect.as4.extended.community.RedirectAs4 in project bgpcep by opendaylight.

the class RedirectAsFourOctetEcHandler 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.RedirectAs4ExtendedCommunity, "The extended community %s is not RedirectAs4ExtendedCommunityCase type.", extendedCommunity);
    final RedirectAs4 redirect = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.RedirectAs4ExtendedCommunity) extendedCommunity).getRedirectAs4();
    ByteBufUtils.write(byteAggregator, redirect.getGlobalAdministrator().getValue());
    ByteBufUtils.writeOrZero(byteAggregator, redirect.getLocalAdministrator());
}
Also used : RedirectAs4(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.redirect.as4.extended.community.RedirectAs4)

Aggregations

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