Search in sources :

Example 1 with RedirectIpv4

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

the class RedirectIpv4EcHandler 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.RedirectIpv4ExtendedCommunity, "The extended community %s is not RedirectIpv4ExtendedCommunityCase type.", extendedCommunity);
    final RedirectIpv4 redirect = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.RedirectIpv4ExtendedCommunity) extendedCommunity).getRedirectIpv4();
    Ipv4Util.writeIpv4Address(redirect.getGlobalAdministrator(), byteAggregator);
    ByteBufUtils.writeOrZero(byteAggregator, redirect.getLocalAdministrator());
}
Also used : RedirectIpv4(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.redirect.ipv4.extended.community.RedirectIpv4)

Aggregations

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