Search in sources :

Example 1 with Ipv6NextHopParserSerializer

use of org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer in project bgpcep by opendaylight.

the class BGPActivator method startImpl.

@Override
protected List<AutoCloseable> startImpl(final BGPExtensionProviderContext context) {
    final List<AutoCloseable> regs = new ArrayList<>(8);
    final LUNlriParser luNlriParser = new LUNlriParser();
    regs.add(context.registerSubsequentAddressFamily(LabeledUnicastSubsequentAddressFamily.class, LABELED_UNICAST_SAFI));
    final Ipv4NextHopParserSerializer ipv4NextHopParser = new Ipv4NextHopParserSerializer();
    final Ipv6NextHopParserSerializer ipv6NextHopParser = new Ipv6NextHopParserSerializer();
    regs.add(context.registerNlriParser(Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class, luNlriParser, ipv4NextHopParser, Ipv4NextHopCase.class));
    regs.add(context.registerNlriParser(Ipv6AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class, luNlriParser, ipv6NextHopParser, Ipv6NextHopCase.class));
    regs.add(context.registerNlriSerializer(LabeledUnicastRoutes.class, luNlriParser));
    final LabelIndexTlvParser labelHandler = new LabelIndexTlvParser();
    final OriginatorSrgbTlvParser originatorHandler = new OriginatorSrgbTlvParser();
    regs.add(context.registerBgpPrefixSidTlvParser(labelHandler.getType(), labelHandler));
    regs.add(context.registerBgpPrefixSidTlvParser(labelHandler.getType(), originatorHandler));
    regs.add(context.registerBgpPrefixSidTlvSerializer(LuLabelIndexTlv.class, labelHandler));
    regs.add(context.registerBgpPrefixSidTlvSerializer(LuOriginatorSrgbTlv.class, originatorHandler));
    return regs;
}
Also used : Ipv6AddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily) LabeledUnicastRoutes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.LabeledUnicastRoutes) Ipv6NextHopParserSerializer(org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer) Ipv4AddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily) ArrayList(java.util.ArrayList) LuOriginatorSrgbTlv(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.bgp.prefix.sid.tlv.LuOriginatorSrgbTlv) LabeledUnicastSubsequentAddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.LabeledUnicastSubsequentAddressFamily) Ipv4NextHopCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase) Ipv6NextHopCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv6NextHopCase) Ipv4NextHopParserSerializer(org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer) LuLabelIndexTlv(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.bgp.prefix.sid.tlv.LuLabelIndexTlv)

Example 2 with Ipv6NextHopParserSerializer

use of org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer in project bgpcep by opendaylight.

the class BGPActivator method startImpl.

@Override
protected List<AutoCloseable> startImpl(final BGPExtensionProviderContext context) {
    final List<AutoCloseable> regs = new ArrayList<>();
    final SimpleFlowspecExtensionProviderContext flowspecContext = this.activator.getContext();
    regs.add(context.registerSubsequentAddressFamily(FlowspecSubsequentAddressFamily.class, FLOWSPEC_SAFI));
    regs.add(context.registerSubsequentAddressFamily(FlowspecL3vpnSubsequentAddressFamily.class, FLOWSPEC_L3VPN_SAFI));
    final Ipv4NextHopParserSerializer ipv4NextHopParser = new Ipv4NextHopParserSerializer();
    final Ipv6NextHopParserSerializer ipv6NextHopParser = new Ipv6NextHopParserSerializer();
    final SimpleFlowspecIpv4NlriParser fsIpv4Handler = new SimpleFlowspecIpv4NlriParser(flowspecContext.getFlowspecTypeRegistry(SimpleFlowspecExtensionProviderContext.AFI.IPV4, SimpleFlowspecExtensionProviderContext.SAFI.FLOWSPEC));
    final SimpleFlowspecIpv6NlriParser fsIpv6Handler = new SimpleFlowspecIpv6NlriParser(flowspecContext.getFlowspecTypeRegistry(SimpleFlowspecExtensionProviderContext.AFI.IPV6, SimpleFlowspecExtensionProviderContext.SAFI.FLOWSPEC));
    regs.add(context.registerNlriParser(Ipv4AddressFamily.class, FlowspecSubsequentAddressFamily.class, fsIpv4Handler, ipv4NextHopParser, Ipv4NextHopCase.class));
    regs.add(context.registerNlriParser(Ipv6AddressFamily.class, FlowspecSubsequentAddressFamily.class, fsIpv6Handler, ipv6NextHopParser, Ipv6NextHopCase.class));
    regs.add(context.registerNlriSerializer(FlowspecRoutes.class, fsIpv4Handler));
    regs.add(context.registerNlriSerializer(FlowspecIpv6Routes.class, fsIpv6Handler));
    final FlowspecL3vpnIpv4NlriParser fsL3vpnIpv4Handler = new FlowspecL3vpnIpv4NlriParser(flowspecContext.getFlowspecTypeRegistry(SimpleFlowspecExtensionProviderContext.AFI.IPV4, SimpleFlowspecExtensionProviderContext.SAFI.FLOWSPEC_VPN));
    final FlowspecL3vpnIpv6NlriParser fsL3vpnIpv6Handler = new FlowspecL3vpnIpv6NlriParser(flowspecContext.getFlowspecTypeRegistry(SimpleFlowspecExtensionProviderContext.AFI.IPV6, SimpleFlowspecExtensionProviderContext.SAFI.FLOWSPEC_VPN));
    regs.add(context.registerNlriParser(Ipv4AddressFamily.class, FlowspecL3vpnSubsequentAddressFamily.class, fsL3vpnIpv4Handler, ipv4NextHopParser, Ipv4NextHopCase.class));
    regs.add(context.registerNlriParser(Ipv6AddressFamily.class, FlowspecL3vpnSubsequentAddressFamily.class, fsL3vpnIpv6Handler, ipv6NextHopParser, Ipv6NextHopCase.class));
    regs.add(context.registerNlriSerializer(FlowspecL3vpnIpv4Routes.class, fsL3vpnIpv4Handler));
    regs.add(context.registerNlriSerializer(FlowspecL3vpnIpv6Routes.class, fsL3vpnIpv6Handler));
    final RedirectAsTwoOctetEcHandler redirect2bHandler = new RedirectAsTwoOctetEcHandler();
    regs.add(context.registerExtendedCommunityParser(redirect2bHandler.getType(true), redirect2bHandler.getSubType(), redirect2bHandler));
    regs.add(context.registerExtendedCommunitySerializer(RedirectExtendedCommunityCase.class, redirect2bHandler));
    final TrafficActionEcHandler trafficActionHandler = new TrafficActionEcHandler();
    regs.add(context.registerExtendedCommunityParser(trafficActionHandler.getType(true), trafficActionHandler.getSubType(), trafficActionHandler));
    regs.add(context.registerExtendedCommunitySerializer(TrafficActionExtendedCommunityCase.class, trafficActionHandler));
    final TrafficMarkingEcHandler trafficMarkingHandler = new TrafficMarkingEcHandler();
    regs.add(context.registerExtendedCommunityParser(trafficMarkingHandler.getType(true), trafficMarkingHandler.getSubType(), trafficMarkingHandler));
    regs.add(context.registerExtendedCommunitySerializer(TrafficMarkingExtendedCommunityCase.class, trafficMarkingHandler));
    final TrafficRateEcHandler trafficRateEcHandler = new TrafficRateEcHandler();
    regs.add(context.registerExtendedCommunityParser(trafficRateEcHandler.getType(true), trafficRateEcHandler.getSubType(), trafficRateEcHandler));
    regs.add(context.registerExtendedCommunitySerializer(TrafficRateExtendedCommunityCase.class, trafficRateEcHandler));
    final RedirectIpv6EcHandler redirectIpv6EcHandler = new RedirectIpv6EcHandler();
    regs.add(context.registerExtendedCommunityParser(redirectIpv6EcHandler.getType(true), redirectIpv6EcHandler.getSubType(), redirectIpv6EcHandler));
    regs.add(context.registerExtendedCommunitySerializer(RedirectIpv6ExtendedCommunityCase.class, redirectIpv6EcHandler));
    final RedirectAsFourOctetEcHandler redirect4bHandler = new RedirectAsFourOctetEcHandler();
    regs.add(context.registerExtendedCommunityParser(redirect4bHandler.getType(true), redirect4bHandler.getSubType(), redirect4bHandler));
    regs.add(context.registerExtendedCommunitySerializer(RedirectAs4ExtendedCommunityCase.class, redirect4bHandler));
    final RedirectIpv4EcHandler redirectIpv4Handler = new RedirectIpv4EcHandler();
    regs.add(context.registerExtendedCommunityParser(redirectIpv4Handler.getType(true), redirectIpv4Handler.getSubType(), redirectIpv4Handler));
    regs.add(context.registerExtendedCommunitySerializer(RedirectIpv4ExtendedCommunityCase.class, redirectIpv4Handler));
    final RedirectIpNextHopEcHandler redirectIpNhHandler = new RedirectIpNextHopEcHandler();
    regs.add(context.registerExtendedCommunityParser(redirectIpNhHandler.getType(true), redirectIpNhHandler.getSubType(), redirectIpNhHandler));
    regs.add(context.registerExtendedCommunitySerializer(RedirectIpNhExtendedCommunityCase.class, redirectIpNhHandler));
    return regs;
}
Also used : Ipv6AddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily) FlowspecL3vpnIpv4Routes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.flowspec.l3vpn.ipv4.routes.FlowspecL3vpnIpv4Routes) Ipv4AddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily) RedirectIpv6EcHandler(org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectIpv6EcHandler) ArrayList(java.util.ArrayList) RedirectIpv6ExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.route.attributes.extended.communities.extended.community.RedirectIpv6ExtendedCommunityCase) RedirectAsFourOctetEcHandler(org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectAsFourOctetEcHandler) TrafficRateEcHandler(org.opendaylight.protocol.bgp.flowspec.extended.communities.TrafficRateEcHandler) FlowspecL3vpnSubsequentAddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.FlowspecL3vpnSubsequentAddressFamily) RedirectExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.route.attributes.extended.communities.extended.community.RedirectExtendedCommunityCase) RedirectIpv4ExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.route.attributes.extended.communities.extended.community.RedirectIpv4ExtendedCommunityCase) RedirectAsTwoOctetEcHandler(org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectAsTwoOctetEcHandler) Ipv4NextHopParserSerializer(org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer) Ipv6NextHopParserSerializer(org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer) FlowspecRoutes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.flowspec.routes.FlowspecRoutes) FlowspecL3vpnIpv6NlriParser(org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv6.FlowspecL3vpnIpv6NlriParser) TrafficMarkingEcHandler(org.opendaylight.protocol.bgp.flowspec.extended.communities.TrafficMarkingEcHandler) RedirectIpNextHopEcHandler(org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectIpNextHopEcHandler) TrafficMarkingExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.route.attributes.extended.communities.extended.community.TrafficMarkingExtendedCommunityCase) Ipv4NextHopCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase) TrafficRateExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.route.attributes.extended.communities.extended.community.TrafficRateExtendedCommunityCase) Ipv6NextHopCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv6NextHopCase) FlowspecL3vpnIpv4NlriParser(org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv4.FlowspecL3vpnIpv4NlriParser) RedirectIpv4EcHandler(org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectIpv4EcHandler) FlowspecL3vpnIpv6Routes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.flowspec.l3vpn.ipv6.routes.FlowspecL3vpnIpv6Routes) TrafficActionExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.route.attributes.extended.communities.extended.community.TrafficActionExtendedCommunityCase) RedirectIpNhExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.route.attributes.extended.communities.extended.community.RedirectIpNhExtendedCommunityCase) TrafficActionEcHandler(org.opendaylight.protocol.bgp.flowspec.extended.communities.TrafficActionEcHandler) FlowspecSubsequentAddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.FlowspecSubsequentAddressFamily) RedirectAs4ExtendedCommunityCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.bgp.rib.route.attributes.extended.communities.extended.community.RedirectAs4ExtendedCommunityCase) FlowspecIpv6Routes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.flowspec.ipv6.routes.FlowspecIpv6Routes)

Example 3 with Ipv6NextHopParserSerializer

use of org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer in project bgpcep by opendaylight.

the class BGPActivator method startImpl.

@Override
protected List<AutoCloseable> startImpl(final BGPExtensionProviderContext context) {
    final List<AutoCloseable> regs = new ArrayList<>(6);
    final Ipv4NextHopParserSerializer ipv4NextHopParser = new Ipv4NextHopParserSerializer();
    final Ipv4NlriParser ipv4Codec = new Ipv4NlriParser();
    regs.add(context.registerNlriParser(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class, ipv4Codec, ipv4NextHopParser, Ipv4NextHopCase.class, Ipv6NextHopCase.class));
    regs.add(context.registerNlriSerializer(Ipv4Routes.class, ipv4Codec));
    final Ipv6NextHopParserSerializer ipv6NextHopParser = new Ipv6NextHopParserSerializer();
    final Ipv6NlriParser ipv6Codec = new Ipv6NlriParser();
    regs.add(context.registerNlriParser(Ipv6AddressFamily.class, UnicastSubsequentAddressFamily.class, ipv6Codec, ipv6NextHopParser, Ipv4NextHopCase.class, Ipv6NextHopCase.class));
    regs.add(context.registerNlriSerializer(Ipv6Routes.class, ipv6Codec));
    final Ipv6BgpPrefixSidParser tlvHandler = new Ipv6BgpPrefixSidParser();
    regs.add(context.registerBgpPrefixSidTlvParser(tlvHandler.getType(), tlvHandler));
    regs.add(context.registerBgpPrefixSidTlvSerializer(Ipv6SidTlv.class, tlvHandler));
    return regs;
}
Also used : Ipv6AddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily) Ipv6NextHopParserSerializer(org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer) Ipv6SidTlv(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.update.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.bgp.prefix.sid.tlv.Ipv6SidTlv) Ipv4AddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily) Ipv6BgpPrefixSidParser(org.opendaylight.protocol.bgp.inet.codec.Ipv6BgpPrefixSidParser) ArrayList(java.util.ArrayList) Ipv4NextHopCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase) Ipv6Routes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.Ipv6Routes) Ipv6NlriParser(org.opendaylight.protocol.bgp.inet.codec.Ipv6NlriParser) Ipv6NextHopCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv6NextHopCase) Ipv4NlriParser(org.opendaylight.protocol.bgp.inet.codec.Ipv4NlriParser) Ipv4NextHopParserSerializer(org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer) UnicastSubsequentAddressFamily(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.UnicastSubsequentAddressFamily) Ipv4Routes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.Ipv4Routes)

Aggregations

ArrayList (java.util.ArrayList)3 Ipv4NextHopParserSerializer (org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer)3 Ipv6NextHopParserSerializer (org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer)3 Ipv4AddressFamily (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily)3 Ipv6AddressFamily (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily)3 Ipv4NextHopCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase)3 Ipv6NextHopCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv6NextHopCase)3 RedirectAsFourOctetEcHandler (org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectAsFourOctetEcHandler)1 RedirectAsTwoOctetEcHandler (org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectAsTwoOctetEcHandler)1 RedirectIpNextHopEcHandler (org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectIpNextHopEcHandler)1 RedirectIpv4EcHandler (org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectIpv4EcHandler)1 RedirectIpv6EcHandler (org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectIpv6EcHandler)1 TrafficActionEcHandler (org.opendaylight.protocol.bgp.flowspec.extended.communities.TrafficActionEcHandler)1 TrafficMarkingEcHandler (org.opendaylight.protocol.bgp.flowspec.extended.communities.TrafficMarkingEcHandler)1 TrafficRateEcHandler (org.opendaylight.protocol.bgp.flowspec.extended.communities.TrafficRateEcHandler)1 FlowspecL3vpnIpv4NlriParser (org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv4.FlowspecL3vpnIpv4NlriParser)1 FlowspecL3vpnIpv6NlriParser (org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv6.FlowspecL3vpnIpv6NlriParser)1 Ipv4NlriParser (org.opendaylight.protocol.bgp.inet.codec.Ipv4NlriParser)1 Ipv6BgpPrefixSidParser (org.opendaylight.protocol.bgp.inet.codec.Ipv6BgpPrefixSidParser)1 Ipv6NlriParser (org.opendaylight.protocol.bgp.inet.codec.Ipv6NlriParser)1