Search in sources :

Example 1 with CommunitiesAttributeParser

use of org.opendaylight.protocol.bgp.parser.impl.message.update.CommunitiesAttributeParser in project bgpcep by opendaylight.

the class BGPActivator method registerAttributeParsers.

private static void registerAttributeParsers(final List<AutoCloseable> regs, final BGPExtensionProviderContext context) {
    final BgpPrefixSidAttributeParser prefixSidAttributeParser = new BgpPrefixSidAttributeParser(context.getBgpPrefixSidTlvRegistry());
    regs.add(context.registerAttributeSerializer(BgpPrefixSid.class, prefixSidAttributeParser));
    regs.add(context.registerAttributeParser(BgpPrefixSidAttributeParser.TYPE, prefixSidAttributeParser));
    final OriginAttributeParser originAttributeParser = new OriginAttributeParser();
    regs.add(context.registerAttributeSerializer(Origin.class, originAttributeParser));
    regs.add(context.registerAttributeParser(OriginAttributeParser.TYPE, originAttributeParser));
    final AigpAttributeParser aigpAttributeParser = new AigpAttributeParser();
    regs.add(context.registerAttributeSerializer(Aigp.class, aigpAttributeParser));
    regs.add(context.registerAttributeParser(AigpAttributeParser.TYPE, aigpAttributeParser));
    final AsPathAttributeParser asPathAttributeParser = new AsPathAttributeParser(context.getReferenceCache());
    regs.add(context.registerAttributeSerializer(AsPath.class, asPathAttributeParser));
    regs.add(context.registerAttributeParser(AsPathAttributeParser.TYPE, asPathAttributeParser));
    final NextHopAttributeParser nextHopAttributeParser = new NextHopAttributeParser();
    regs.add(context.registerAttributeSerializer(NextHop.class, nextHopAttributeParser));
    regs.add(context.registerAttributeParser(NextHopAttributeParser.TYPE, nextHopAttributeParser));
    final MultiExitDiscriminatorAttributeParser multiExitDiscriminatorAttributeParser = new MultiExitDiscriminatorAttributeParser();
    regs.add(context.registerAttributeSerializer(MultiExitDisc.class, multiExitDiscriminatorAttributeParser));
    regs.add(context.registerAttributeParser(MultiExitDiscriminatorAttributeParser.TYPE, multiExitDiscriminatorAttributeParser));
    final LocalPreferenceAttributeParser localPreferenceAttributeParser = new LocalPreferenceAttributeParser();
    regs.add(context.registerAttributeSerializer(LocalPref.class, localPreferenceAttributeParser));
    regs.add(context.registerAttributeParser(LocalPreferenceAttributeParser.TYPE, localPreferenceAttributeParser));
    final AtomicAggregateAttributeParser atomicAggregateAttributeParser = new AtomicAggregateAttributeParser();
    regs.add(context.registerAttributeSerializer(AtomicAggregate.class, atomicAggregateAttributeParser));
    regs.add(context.registerAttributeParser(AtomicAggregateAttributeParser.TYPE, atomicAggregateAttributeParser));
    final AggregatorAttributeParser as4AggregatorAttributeParser = new AggregatorAttributeParser(context.getReferenceCache());
    regs.add(context.registerAttributeSerializer(Aggregator.class, as4AggregatorAttributeParser));
    regs.add(context.registerAttributeParser(AggregatorAttributeParser.TYPE, as4AggregatorAttributeParser));
    final CommunitiesAttributeParser communitiesAttributeParser = new CommunitiesAttributeParser(context.getReferenceCache());
    regs.add(context.registerAttributeSerializer(Communities.class, communitiesAttributeParser));
    regs.add(context.registerAttributeParser(CommunitiesAttributeParser.TYPE, communitiesAttributeParser));
    final OriginatorIdAttributeParser originatorIdAttributeParser = new OriginatorIdAttributeParser();
    regs.add(context.registerAttributeSerializer(OriginatorId.class, originatorIdAttributeParser));
    regs.add(context.registerAttributeParser(OriginatorIdAttributeParser.TYPE, originatorIdAttributeParser));
    final ClusterIdAttributeParser clusterIdAttributeParser = new ClusterIdAttributeParser();
    regs.add(context.registerAttributeSerializer(ClusterId.class, clusterIdAttributeParser));
    regs.add(context.registerAttributeParser(ClusterIdAttributeParser.TYPE, clusterIdAttributeParser));
    final NlriRegistry nlriReg = context.getNlriRegistry();
    final MPReachAttributeParser mpReachAttributeParser = new MPReachAttributeParser(nlriReg);
    regs.add(context.registerAttributeSerializer(MpReachNlri.class, mpReachAttributeParser));
    regs.add(context.registerAttributeParser(MPReachAttributeParser.TYPE, mpReachAttributeParser));
    final MPUnreachAttributeParser mpUnreachAttributeParser = new MPUnreachAttributeParser(nlriReg);
    regs.add(context.registerAttributeSerializer(MpUnreachNlri.class, mpUnreachAttributeParser));
    regs.add(context.registerAttributeParser(MPUnreachAttributeParser.TYPE, mpUnreachAttributeParser));
    final ExtendedCommunitiesAttributeParser extendedCommunitiesAttributeParser = new ExtendedCommunitiesAttributeParser(context.getExtendedCommunityRegistry());
    regs.add(context.registerAttributeSerializer(ExtendedCommunities.class, extendedCommunitiesAttributeParser));
    regs.add(context.registerAttributeParser(ExtendedCommunitiesAttributeParser.TYPE, extendedCommunitiesAttributeParser));
    regs.add(context.registerAttributeParser(AS4AggregatorAttributeParser.TYPE, new AS4AggregatorAttributeParser()));
    regs.add(context.registerAttributeParser(AS4PathAttributeParser.TYPE, new AS4PathAttributeParser()));
    regs.add(context.registerAttributeSerializer(UnrecognizedAttributes.class, new UnrecognizedAttributesSerializer()));
}
Also used : Origin(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Origin) AS4AggregatorAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.AS4AggregatorAttributeParser) AS4AggregatorAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.AS4AggregatorAttributeParser) AggregatorAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.AggregatorAttributeParser) CommunitiesAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.CommunitiesAttributeParser) ExtendedCommunitiesAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.ExtendedCommunitiesAttributeParser) Communities(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Communities) ExtendedCommunities(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.ExtendedCommunities) AtomicAggregate(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.AtomicAggregate) BgpPrefixSid(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.BgpPrefixSid) AtomicAggregateAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.AtomicAggregateAttributeParser) UnrecognizedAttributes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.UnrecognizedAttributes) LocalPreferenceAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.LocalPreferenceAttributeParser) LocalPref(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.LocalPref) ExtendedCommunities(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.ExtendedCommunities) AsPathAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.AsPathAttributeParser) OriginatorIdAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.OriginatorIdAttributeParser) OriginatorId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.OriginatorId) ClusterId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.ClusterId) NextHop(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.NextHop) MultiExitDiscriminatorAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.MultiExitDiscriminatorAttributeParser) Aggregator(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Aggregator) ExtendedCommunitiesAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.ExtendedCommunitiesAttributeParser) BgpPrefixSidAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.BgpPrefixSidAttributeParser) NlriRegistry(org.opendaylight.protocol.bgp.parser.spi.NlriRegistry) Aigp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Aigp) ClusterIdAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.ClusterIdAttributeParser) AS4PathAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.AS4PathAttributeParser) MPUnreachAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.MPUnreachAttributeParser) AsPath(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.AsPath) NextHopAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.NextHopAttributeParser) OriginAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.OriginAttributeParser) MultiExitDisc(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.MultiExitDisc) MPReachAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.MPReachAttributeParser) MpUnreachNlri(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.update.attributes.MpUnreachNlri) AigpAttributeParser(org.opendaylight.protocol.bgp.parser.impl.message.update.AigpAttributeParser) MpReachNlri(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.update.attributes.MpReachNlri) UnrecognizedAttributesSerializer(org.opendaylight.protocol.bgp.parser.impl.message.update.UnrecognizedAttributesSerializer)

Aggregations

AS4AggregatorAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.AS4AggregatorAttributeParser)1 AS4PathAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.AS4PathAttributeParser)1 AggregatorAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.AggregatorAttributeParser)1 AigpAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.AigpAttributeParser)1 AsPathAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.AsPathAttributeParser)1 AtomicAggregateAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.AtomicAggregateAttributeParser)1 BgpPrefixSidAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.BgpPrefixSidAttributeParser)1 ClusterIdAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.ClusterIdAttributeParser)1 CommunitiesAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.CommunitiesAttributeParser)1 ExtendedCommunitiesAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.ExtendedCommunitiesAttributeParser)1 LocalPreferenceAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.LocalPreferenceAttributeParser)1 MPReachAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.MPReachAttributeParser)1 MPUnreachAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.MPUnreachAttributeParser)1 MultiExitDiscriminatorAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.MultiExitDiscriminatorAttributeParser)1 NextHopAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.NextHopAttributeParser)1 OriginAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.OriginAttributeParser)1 OriginatorIdAttributeParser (org.opendaylight.protocol.bgp.parser.impl.message.update.OriginatorIdAttributeParser)1 UnrecognizedAttributesSerializer (org.opendaylight.protocol.bgp.parser.impl.message.update.UnrecognizedAttributesSerializer)1 NlriRegistry (org.opendaylight.protocol.bgp.parser.spi.NlriRegistry)1 Aggregator (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.Aggregator)1