<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-rfc8294-netty</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!-- test scope dependencies -->
<dependency>
import com.google.common.annotations.VisibleForTesting;
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.evpn.impl.esi.types.ESIActivator;
import org.opendaylight.protocol.bgp.evpn.impl.extended.communities.DefaultGatewayExtCom;
import org.opendaylight.protocol.bgp.evpn.impl.extended.communities.ESILabelExtCom;
import org.opendaylight.protocol.bgp.evpn.impl.nlri.EvpnNlriParser;
import org.opendaylight.protocol.bgp.evpn.impl.nlri.NlriActivator;
import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
import org.opendaylight.protocol.bgp.parser.spi.NextHopParserSerializer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.EvpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.next.hop.c.next.hop.Ipv6NextHopCase;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
@VisibleForTesting
static final int L2VPN_AFI = 25;
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.evpn.impl;
-import java.util.Collections;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.EvpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.L2vpnAddressFamily;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = RIBExtensionProviderActivator.class)
public final class RIBActivator extends AbstractRIBExtensionProviderActivator {
-
@Override
protected List<Registration> startRIBExtensionProviderImpl(
final RIBExtensionProviderContext context,
final BindingNormalizedNodeSerializer mappingService) {
- return Collections.singletonList(context.registerRIBSupport(L2vpnAddressFamily.class,
- EvpnSubsequentAddressFamily.class,
+ return List.of(context.registerRIBSupport(L2vpnAddressFamily.class, EvpnSubsequentAddressFamily.class,
EvpnRibSupport.getInstance(mappingService)));
}
}
\ No newline at end of file
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.evpn.impl;
-import com.google.common.collect.Lists;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
+import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.L2VPNEVPN;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.EvpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.L2vpnAddressFamily;
import org.opendaylight.yangtools.concepts.AbstractRegistration;
+@MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
-
@Override
protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
final BGPTableTypeRegistryProvider provider) {
- return Lists.newArrayList(provider.registerBGPTableType(L2vpnAddressFamily.class,
- EvpnSubsequentAddressFamily.class, L2VPNEVPN.class));
+ return List.of(provider.registerBGPTableType(L2vpnAddressFamily.class, EvpnSubsequentAddressFamily.class,
+ L2VPNEVPN.class));
}
-
}
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.evpn.impl.TableTypeActivator
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.evpn.impl.BGPActivator
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.evpn.impl.RIBActivator
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-data-impl</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!-- test scope dependencies -->
<dependency>
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jdt.annotation.NonNull;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectAsFourOctetEcHandler;
import org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectAsTwoOctetEcHandler;
import org.opendaylight.protocol.bgp.flowspec.extended.communities.RedirectIpNextHopEcHandler;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer;
import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecL3vpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.next.hop.c.next.hop.Ipv6NextHopCase;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
-
private static final int FLOWSPEC_SAFI = 133;
private static final int FLOWSPEC_L3VPN_SAFI = 134;
private final FlowspecActivator activator;
+ // FIXME: this needs proper injection
public BGPActivator(final @NonNull FlowspecActivator activator) {
this.activator = requireNonNull(activator);
}
@Override
protected List<Registration> startImpl(final BGPExtensionProviderContext context) {
- final List<Registration> regs = new ArrayList<>();
- final SimpleFlowspecExtensionProviderContext flowspecContext = this.activator.getContext();
+ final SimpleFlowspecExtensionProviderContext flowspecContext = activator.getContext();
+ final List<Registration> regs = new ArrayList<>();
regs.add(context.registerSubsequentAddressFamily(FlowspecSubsequentAddressFamily.class, FLOWSPEC_SAFI));
regs.add(context.registerSubsequentAddressFamily(FlowspecL3vpnSubsequentAddressFamily.class,
FLOWSPEC_L3VPN_SAFI));
*/
package org.opendaylight.protocol.bgp.flowspec;
-import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv4.FlowspecL3vpnIpv4RIBSupport;
import org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv6.FlowspecL3vpnIpv6RIBSupport;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecL3vpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = RIBExtensionProviderActivator.class)
public final class RIBActivator extends AbstractRIBExtensionProviderActivator {
-
private final SimpleFlowspecExtensionProviderContext fsContext;
- public RIBActivator(SimpleFlowspecExtensionProviderContext context) {
- super();
+ // FIXME: this requires proper injection
+ public RIBActivator(final SimpleFlowspecExtensionProviderContext context) {
this.fsContext = context;
}
@Override
protected List<Registration> startRIBExtensionProviderImpl(final RIBExtensionProviderContext context,
final BindingNormalizedNodeSerializer mappingService) {
- final List<Registration> regs = new ArrayList<>(4);
- regs.add(context.registerRIBSupport(Ipv4AddressFamily.class, FlowspecSubsequentAddressFamily.class,
- FlowspecIpv4RIBSupport.getInstance(this.fsContext, mappingService)));
- regs.add(context.registerRIBSupport(Ipv6AddressFamily.class, FlowspecSubsequentAddressFamily.class,
- FlowspecIpv6RIBSupport.getInstance(this.fsContext, mappingService)));
- regs.add(context.registerRIBSupport(Ipv4AddressFamily.class, FlowspecL3vpnSubsequentAddressFamily.class,
- FlowspecL3vpnIpv4RIBSupport.getInstance(this.fsContext, mappingService)));
- regs.add(context.registerRIBSupport(Ipv6AddressFamily.class, FlowspecL3vpnSubsequentAddressFamily.class,
+ return List.of(
+ context.registerRIBSupport(Ipv4AddressFamily.class, FlowspecSubsequentAddressFamily.class,
+ FlowspecIpv4RIBSupport.getInstance(this.fsContext, mappingService)),
+ context.registerRIBSupport(Ipv6AddressFamily.class, FlowspecSubsequentAddressFamily.class,
+ FlowspecIpv6RIBSupport.getInstance(this.fsContext, mappingService)),
+ context.registerRIBSupport(Ipv4AddressFamily.class, FlowspecL3vpnSubsequentAddressFamily.class,
+ FlowspecL3vpnIpv4RIBSupport.getInstance(this.fsContext, mappingService)),
+ context.registerRIBSupport(Ipv6AddressFamily.class, FlowspecL3vpnSubsequentAddressFamily.class,
FlowspecL3vpnIpv6RIBSupport.getInstance(this.fsContext, mappingService)));
- return regs;
}
}
*/
package org.opendaylight.protocol.bgp.flowspec;
-import java.util.Arrays;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
+import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecL3vpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.IPV4FLOW;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
import org.opendaylight.yangtools.concepts.AbstractRegistration;
+@MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
@Override
protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
final BGPTableTypeRegistryProvider provider) {
- return Arrays.asList(
+ return List.of(
provider.registerBGPTableType(Ipv4AddressFamily.class, FlowspecSubsequentAddressFamily.class,
IPV4FLOW.class),
provider.registerBGPTableType(Ipv6AddressFamily.class, FlowspecSubsequentAddressFamily.class,
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.flowspec.TableTypeActivator
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.flowspec.BGPActivator
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.flowspec.RIBActivator
<name>${project.artifactId}</name>
<dependencies>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
+
<!-- test scope dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
*/
package org.opendaylight.protocol.bgp.inet;
-import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.inet.codec.Ipv4NlriParser;
import org.opendaylight.protocol.bgp.inet.codec.Ipv6BgpPrefixSidParser;
import org.opendaylight.protocol.bgp.inet.codec.Ipv6NlriParser;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer;
import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv4.routes.Ipv4Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv6.routes.Ipv6Routes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.next.hop.c.next.hop.Ipv6NextHopCase;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
-
@Override
protected List<Registration> startImpl(final BGPExtensionProviderContext context) {
- final List<Registration> 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;
+
+ return List.of(
+ context.registerNlriParser(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class,
+ ipv4Codec, new Ipv4NextHopParserSerializer(), Ipv4NextHopCase.class, Ipv6NextHopCase.class),
+ context.registerNlriParser(Ipv6AddressFamily.class, UnicastSubsequentAddressFamily.class, ipv6Codec,
+ new Ipv6NextHopParserSerializer(), Ipv4NextHopCase.class, Ipv6NextHopCase.class),
+ context.registerNlriSerializer(Ipv4Routes.class, ipv4Codec),
+ context.registerNlriSerializer(Ipv6Routes.class, ipv6Codec),
+ context.registerBgpPrefixSidTlvParser(tlvHandler.getType(), tlvHandler),
+ context.registerBgpPrefixSidTlvSerializer(Ipv6SidTlv.class, tlvHandler));
}
}
*/
package org.opendaylight.protocol.bgp.inet;
-import com.google.common.collect.Lists;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.UnicastSubsequentAddressFamily;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = RIBExtensionProviderActivator.class)
public final class RIBActivator extends AbstractRIBExtensionProviderActivator {
-
@Override
protected List<Registration> startRIBExtensionProviderImpl(final RIBExtensionProviderContext context,
final BindingNormalizedNodeSerializer mappingService) {
- return Lists.newArrayList(
- context.registerRIBSupport(Ipv4AddressFamily.class,
- UnicastSubsequentAddressFamily.class, IPv4RIBSupport.getInstance(mappingService)),
- context.registerRIBSupport(Ipv6AddressFamily.class,
- UnicastSubsequentAddressFamily.class, IPv6RIBSupport.getInstance(mappingService)));
+ return List.of(
+ context.registerRIBSupport(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class,
+ IPv4RIBSupport.getInstance(mappingService)),
+ context.registerRIBSupport(Ipv6AddressFamily.class, UnicastSubsequentAddressFamily.class,
+ IPv6RIBSupport.getInstance(mappingService)));
}
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.inet;
-import com.google.common.collect.Lists;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
+import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV4UNICAST;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV6UNICAST;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.UnicastSubsequentAddressFamily;
import org.opendaylight.yangtools.concepts.AbstractRegistration;
+@MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
-
@Override
protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
final BGPTableTypeRegistryProvider provider) {
- return Lists.newArrayList(
- provider.registerBGPTableType(Ipv4AddressFamily.class,
- UnicastSubsequentAddressFamily.class, IPV4UNICAST.class),
- provider.registerBGPTableType(Ipv6AddressFamily.class,
- UnicastSubsequentAddressFamily.class, IPV6UNICAST.class));
+ return List.of(
+ provider.registerBGPTableType(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class,
+ IPV4UNICAST.class),
+ provider.registerBGPTableType(Ipv6AddressFamily.class, UnicastSubsequentAddressFamily.class,
+ IPV6UNICAST.class));
}
-
}
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.inet.TableTypeActivator
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.inet.BGPActivator
+++ /dev/null
-# Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.inet.RIBActivator
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-spec-util</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!-- test scope dependencies -->
<dependency>
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.l3vpn;
import com.google.common.annotations.VisibleForTesting;
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer;
import org.opendaylight.protocol.bgp.l3vpn.mcast.nlri.L3vpnMcastIpv4NlriHandler;
import org.opendaylight.protocol.bgp.l3vpn.unicast.ipv6.VpnIpv6NextHopParserSerializer;
import org.opendaylight.protocol.bgp.l3vpn.unicast.ipv6.VpnIpv6NlriParser;
import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.McastMplsLabeledVpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.l3vpn.mcast.routes.ipv4.L3vpnMcastRoutesIpv4;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
@VisibleForTesting
static final int MCAST_L3VPN_SAFI = 129;
*/
package org.opendaylight.protocol.bgp.l3vpn;
-import com.google.common.collect.Lists;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.protocol.bgp.l3vpn.mcast.L3VpnMcastIpv4RIBSupport;
import org.opendaylight.protocol.bgp.l3vpn.mcast.L3VpnMcastIpv6RIBSupport;
import org.opendaylight.protocol.bgp.l3vpn.unicast.ipv4.VpnIpv4RIBSupport;
import org.opendaylight.protocol.bgp.l3vpn.unicast.ipv6.VpnIpv6RIBSupport;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.McastMplsLabeledVpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = RIBExtensionProviderActivator.class)
public final class RIBActivator extends AbstractRIBExtensionProviderActivator {
@Override
protected List<Registration> startRIBExtensionProviderImpl(final RIBExtensionProviderContext context,
final BindingNormalizedNodeSerializer mappingService) {
- return Lists.newArrayList(
+ return List.of(
context.registerRIBSupport(Ipv4AddressFamily.class,
MplsLabeledVpnSubsequentAddressFamily.class, VpnIpv4RIBSupport.getInstance(mappingService)),
context.registerRIBSupport(Ipv6AddressFamily.class,
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.l3vpn;
-import com.google.common.collect.Lists;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
+import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.L3VPNIPV4MULTICAST;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.L3VPNIPV4UNICAST;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.L3VPNIPV6MULTICAST;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
@Override
protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
final BGPTableTypeRegistryProvider provider) {
- return Lists.newArrayList(
+ return List.of(
provider.registerBGPTableType(Ipv4AddressFamily.class,
MplsLabeledVpnSubsequentAddressFamily.class, L3VPNIPV4UNICAST.class),
provider.registerBGPTableType(Ipv6AddressFamily.class,
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.l3vpn.TableTypeActivator
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.l3vpn.BGPActivator
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.l3vpn.RIBActivator
\ No newline at end of file
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!-- test scope dependencies -->
<dependency>
*/
package org.opendaylight.protocol.bgp.labeled.unicast;
-import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer;
import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.LabeledUnicastSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.LabeledUnicastRoutes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.next.hop.c.next.hop.Ipv6NextHopCase;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
-
private static final int LABELED_UNICAST_SAFI = 4;
@Override
protected List<Registration> startImpl(final BGPExtensionProviderContext context) {
- final List<Registration> 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(originatorHandler.getType(), originatorHandler));
- regs.add(context.registerBgpPrefixSidTlvSerializer(LuLabelIndexTlv.class, labelHandler));
- regs.add(context.registerBgpPrefixSidTlvSerializer(LuOriginatorSrgbTlv.class, originatorHandler));
- return regs;
+ return List.of(
+ context.registerSubsequentAddressFamily(LabeledUnicastSubsequentAddressFamily.class, LABELED_UNICAST_SAFI),
+ context.registerNlriParser(Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
+ luNlriParser, new Ipv4NextHopParserSerializer(), Ipv4NextHopCase.class),
+ context.registerNlriParser(Ipv6AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
+ luNlriParser, new Ipv6NextHopParserSerializer(), Ipv6NextHopCase.class),
+ context.registerNlriSerializer(LabeledUnicastRoutes.class, luNlriParser),
+ context.registerBgpPrefixSidTlvParser(labelHandler.getType(), labelHandler),
+ context.registerBgpPrefixSidTlvParser(originatorHandler.getType(), originatorHandler),
+ context.registerBgpPrefixSidTlvSerializer(LuLabelIndexTlv.class, labelHandler),
+ context.registerBgpPrefixSidTlvSerializer(LuOriginatorSrgbTlv.class, originatorHandler));
}
}
*/
package org.opendaylight.protocol.bgp.labeled.unicast;
-import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.LabeledUnicastSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = RIBExtensionProviderActivator.class)
public class RIBActivator extends AbstractRIBExtensionProviderActivator {
-
@Override
protected List<Registration> startRIBExtensionProviderImpl(final RIBExtensionProviderContext context,
final BindingNormalizedNodeSerializer mappingService) {
- final List<Registration> regs = new ArrayList<>(2);
- regs.add(context.registerRIBSupport(Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
- LabeledUnicastIpv4RIBSupport.getInstance(mappingService)));
- regs.add(context.registerRIBSupport(Ipv6AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
+ return List.of(
+ context.registerRIBSupport(Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
+ LabeledUnicastIpv4RIBSupport.getInstance(mappingService)),
+ context.registerRIBSupport(Ipv6AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
LabeledUnicastIpv6RIBSupport.getInstance(mappingService)));
- return regs;
}
}
*/
package org.opendaylight.protocol.bgp.labeled.unicast;
-import com.google.common.collect.ImmutableList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
+import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV4LABELLEDUNICAST;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV6LABELLEDUNICAST;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.LabeledUnicastSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
import org.opendaylight.yangtools.concepts.AbstractRegistration;
+@MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
-
@Override
protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
final BGPTableTypeRegistryProvider provider) {
- return ImmutableList.of(
+ return List.of(
provider.registerBGPTableType(Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
IPV4LABELLEDUNICAST.class),
provider.registerBGPTableType(Ipv6AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
IPV6LABELLEDUNICAST.class));
}
-
}
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.labeled.unicast.TableTypeActivator
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.labeled.unicast.BGPActivator
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.labeled.unicast.RIBActivator
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-rfc8294-netty</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!-- test scope dependencies -->
<dependency>
*/
package org.opendaylight.protocol.bgp.linkstate.impl;
+import com.google.common.base.MoreObjects;
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.linkstate.impl.attribute.LinkstateAttributeParser;
import org.opendaylight.protocol.bgp.linkstate.impl.attribute.sr.binding.sid.sub.tlvs.BackupUnnumberedParser;
import org.opendaylight.protocol.bgp.linkstate.impl.attribute.sr.binding.sid.sub.tlvs.EroMetricParser;
import org.opendaylight.protocol.bgp.linkstate.spi.pojo.SimpleBindingSubTlvsRegistry;
import org.opendaylight.protocol.bgp.linkstate.spi.pojo.SimpleNlriTypeRegistry;
import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
import org.opendaylight.protocol.bgp.parser.spi.NextHopParserSerializer;
import org.opendaylight.protocol.rsvp.parser.spi.RSVPTeObjectRegistry;
/**
* Activator for registering linkstate extensions to BGP parser.
*/
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
-
private static final int LINKSTATE_AFI = 16388;
-
private static final int LINKSTATE_SAFI = 71;
private final boolean ianaLinkstateAttributeType;
-
private final RSVPTeObjectRegistry rsvpTeObjectRegistry;
public BGPActivator() {
- super();
- this.ianaLinkstateAttributeType = true;
- this.rsvpTeObjectRegistry = null;
+ this(true, null);
}
+ // FIXME: this should be properly injected
public BGPActivator(final boolean ianaLinkstateAttributeType, final RSVPTeObjectRegistry rsvpTeObjectRegistry) {
- super();
this.rsvpTeObjectRegistry = rsvpTeObjectRegistry;
this.ianaLinkstateAttributeType = ianaLinkstateAttributeType;
}
regs.add(nlriTypeReg.registerTlvParser(ospfRouterParser.getType(), ospfRouterParser));
regs.add(nlriTypeReg.registerTlvSerializer(ospfRouterParser.getTlvQName(), ospfRouterParser));
}
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this).add("ianaLinkstateAttribute", ianaLinkstateAttributeType).toString();
+ }
}
*/
package org.opendaylight.protocol.bgp.linkstate.impl;
-import java.util.Collections;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.LinkstateAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.LinkstateSubsequentAddressFamily;
/**
* Activator for registering Linkstate AFI/SAFI to RIB.
*/
+@MetaInfServices(value = RIBExtensionProviderActivator.class)
public final class RIBActivator extends AbstractRIBExtensionProviderActivator {
@Override
protected List<Registration> startRIBExtensionProviderImpl(final RIBExtensionProviderContext context,
final BindingNormalizedNodeSerializer mappingService) {
- return Collections.singletonList(context.registerRIBSupport(LinkstateAddressFamily.class,
+ return List.of(context.registerRIBSupport(LinkstateAddressFamily.class,
LinkstateSubsequentAddressFamily.class, LinkstateRIBSupport.getInstance(mappingService)));
}
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.linkstate.impl;
-import com.google.common.collect.Lists;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
+import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.LinkstateAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.LinkstateSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.LINKSTATE;
import org.opendaylight.yangtools.concepts.AbstractRegistration;
+@MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
@Override
protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
final BGPTableTypeRegistryProvider provider) {
- return Lists.newArrayList(provider.registerBGPTableType(LinkstateAddressFamily.class,
+ return List.of(provider.registerBGPTableType(LinkstateAddressFamily.class,
LinkstateSubsequentAddressFamily.class, LINKSTATE.class));
}
-
}
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.linkstate.impl.TableTypeActivator
\ No newline at end of file
+++ /dev/null
-# Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.linkstate.impl.BGPActivator
+++ /dev/null
-# Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.linkstate.impl.RIBActivator
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-common-netty</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!-- test scope dependencies -->
<dependency>
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.mvpn.impl;
import com.google.common.annotations.VisibleForTesting;
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer;
import org.opendaylight.protocol.bgp.mvpn.impl.attributes.PEDistinguisherLabelsAttributeHandler;
import org.opendaylight.protocol.bgp.mvpn.impl.nlri.MvpnIpv4NlriHandler;
import org.opendaylight.protocol.bgp.mvpn.impl.nlri.MvpnIpv6NlriHandler;
import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.ipv4.rev180417.mvpn.routes.ipv4.MvpnRoutesIpv4;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.ipv6.rev180417.mvpn.routes.ipv6.MvpnRoutesIpv6;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
@VisibleForTesting
static final int MVPN_SAFI = 5;
*/
package org.opendaylight.protocol.bgp.mvpn.impl;
-import com.google.common.collect.Lists;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.rev200120.McastVpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = RIBExtensionProviderActivator.class)
public final class RIBActivator extends AbstractRIBExtensionProviderActivator {
@Override
protected List<Registration> startRIBExtensionProviderImpl(final RIBExtensionProviderContext context,
final BindingNormalizedNodeSerializer mappingService) {
- return Lists.newArrayList(
- context.registerRIBSupport(Ipv4AddressFamily.class, McastVpnSubsequentAddressFamily.class,
- MvpnIpv4RIBSupport.getInstance(mappingService)),
- context.registerRIBSupport(Ipv6AddressFamily.class, McastVpnSubsequentAddressFamily.class,
- MvpnIpv6RIBSupport.getInstance(mappingService))
- );
+ return List.of(
+ context.registerRIBSupport(Ipv4AddressFamily.class, McastVpnSubsequentAddressFamily.class,
+ MvpnIpv4RIBSupport.getInstance(mappingService)),
+ context.registerRIBSupport(Ipv6AddressFamily.class, McastVpnSubsequentAddressFamily.class,
+ MvpnIpv6RIBSupport.getInstance(mappingService)));
}
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.mvpn.impl;
-import com.google.common.collect.Lists;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
+import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.rev200120.McastVpnSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.IPV4MCASTVPN;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.IPV6MCASTVPN;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
@Override
protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
final BGPTableTypeRegistryProvider provider) {
- return Lists.newArrayList(
+ return List.of(
provider.registerBGPTableType(
Ipv4AddressFamily.class, McastVpnSubsequentAddressFamily.class, IPV4MCASTVPN.class),
provider.registerBGPTableType(
+++ /dev/null
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.mvpn.impl.TableTypeActivator
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.mvpn.impl.BGPActivator
+++ /dev/null
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.mvpn.impl.RIBActivator
\ No newline at end of file
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-spec-util</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!-- test scope dependencies -->
<dependency>
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.route.targetcontrain.impl.activators;
import com.google.common.annotations.VisibleForTesting;
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer;
import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
import org.opendaylight.protocol.bgp.route.targetcontrain.impl.nlri.RouteTargetConstrainNlriHandler;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.route.target.constrain.rev180618.RouteTargetConstrainSubsequentAddressFamily;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
@VisibleForTesting
static final int RT_SAFI = 132;
import java.util.Collections;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.protocol.bgp.rib.spi.AbstractRIBExtensionProviderActivator;
+import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
import org.opendaylight.protocol.bgp.route.targetcontrain.impl.RouteTargetConstrainRIBSupport;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.route.target.constrain.rev180618.RouteTargetConstrainSubsequentAddressFamily;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = RIBExtensionProviderActivator.class)
public final class RIBActivator extends AbstractRIBExtensionProviderActivator {
@Override
protected List<Registration> startRIBExtensionProviderImpl(final RIBExtensionProviderContext context,
import java.util.Collections;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.AbstractBGPStatementProviderActivator;
+import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.StatementProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.StatementRegistryProvider;
import org.opendaylight.protocol.bgp.route.targetcontrain.impl.route.policy.ClientAttributePrependHandler;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.route.target.constrain.rev180618.ClientAttributePrepend;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = StatementProviderActivator.class)
public final class StatementActivator extends AbstractBGPStatementProviderActivator {
@Override
protected synchronized List<Registration> startImpl(final StatementRegistryProvider provider) {
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bgp.route.targetcontrain.impl.activators;
import java.util.Collections;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
+import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.ROUTETARGETCONSTRAIN;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.route.target.constrain.rev180618.RouteTargetConstrainSubsequentAddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
*
* @author Claudio D. Gasparini
*/
+@MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
@Override
protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
+++ /dev/null
-#
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-#
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.route.targetcontrain.impl.activators.StatementActivator
\ No newline at end of file
+++ /dev/null
-#
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-#
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.route.targetcontrain.impl.activators.TableTypeActivator
\ No newline at end of file
+++ /dev/null
-#
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-#
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.route.targetcontrain.impl.activators.BGPActivator
+++ /dev/null
-#
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-#
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.route.targetcontrain.impl.activators.RIBActivator
\ No newline at end of file
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
+
<!-- Test dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.AbstractBGPStatementProviderActivator;
+import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.StatementProviderActivator;
import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.StatementRegistryProvider;
import org.opendaylight.protocol.bgp.openconfig.routing.policy.statement.actions.AsPathPrepend;
import org.opendaylight.protocol.bgp.openconfig.routing.policy.statement.actions.LocalAsPathPrependHandler;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.odl.bgp._default.policy.rev200120.VpnNonMemberCondition;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = StatementProviderActivator.class)
public final class StatementActivator extends AbstractBGPStatementProviderActivator {
private final DataBroker dataBroker;
+ // FIXME: this needs to be properly injected
public StatementActivator(final DataBroker dataBroker) {
this.dataBroker = requireNonNull(dataBroker);
}
+++ /dev/null
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.openconfig.routing.policy.statement.StatementActivator
\ No newline at end of file
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
</dependency>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>mockito-configuration</artifactId>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>bgp-util</artifactId>
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.parser.impl.message.BGPKeepAliveMessageParser;
import org.opendaylight.protocol.bgp.parser.impl.message.BGPNotificationMessageParser;
import org.opendaylight.protocol.bgp.parser.impl.message.BGPOpenMessageParser;
@Singleton
@Component(immediate = true, service = BGPExtensionProviderActivator.class,
property = "type=org.opendaylight.protocol.bgp.parser.impl.BGPActivator")
+@MetaInfServices(value = BGPExtensionProviderActivator.class)
public final class BGPActivator extends AbstractBGPExtensionProviderActivator {
private static final int IPV4_AFI = 1;
private static final int IPV6_AFI = 2;
+++ /dev/null
-# Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bgp.parser.impl.BGPActivator
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
+
<!-- test dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.protocol.bmp.parser;
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.bgp.parser.spi.AddressFamilyRegistry;
import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionConsumerContext;
import org.opendaylight.protocol.bgp.parser.spi.MessageRegistry;
import org.opendaylight.protocol.bmp.parser.tlv.StatType013TlvHandler;
import org.opendaylight.protocol.bmp.parser.tlv.StringTlvHandler;
import org.opendaylight.protocol.bmp.spi.registry.AbstractBmpExtensionProviderActivator;
+import org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderActivator;
import org.opendaylight.protocol.bmp.spi.registry.BmpExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.InitiationMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.PeerDownNotification;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.stat.tlvs.UpdatesTreatedAsWithdrawTlv;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev200120.string.tlv.StringTlv;
-
-
-/**
- * Created by cgasparini on 15.5.2015.
- */
+@MetaInfServices(value = BmpExtensionProviderActivator.class)
public final class BmpActivator extends AbstractBmpExtensionProviderActivator {
-
private final MessageRegistry messageRegistry;
private final AddressFamilyRegistry afiRegistry;
private final SubsequentAddressFamilyRegistry safiRegistry;
+ // FIXME: this needs to be properly injected
public BmpActivator(final BGPExtensionConsumerContext context) {
this.messageRegistry = context.getMessageRegistry();
this.afiRegistry = context.getAddressFamilyRegistry();
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.bmp.parser.BmpActivator
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!--test dependencies -->
<dependency>
*/
package org.opendaylight.protocol.pcep.auto.bandwidth.extension;
-import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.MoreObjects;
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
+import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator;
import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
import org.opendaylight.protocol.pcep.spi.pojo.AbstractPCEPExtensionProviderActivator;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.auto.bandwidth.rev181109.bandwidth.usage.object.BandwidthUsage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.Pcrpt;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = PCEPExtensionProviderActivator.class)
public class Activator extends AbstractPCEPExtensionProviderActivator {
private final int bandwidthUsageObjectType;
- @VisibleForTesting
public Activator() {
- this(1);
+ this(5);
}
public Activator(final int bandwidthUsageObjectType) {
final List<Registration> regs = new ArrayList<>();
final BandwidthUsageObjectCodec bandwidthUsageObjectCodec =
- new BandwidthUsageObjectCodec(this.bandwidthUsageObjectType);
+ new BandwidthUsageObjectCodec(bandwidthUsageObjectType);
regs.add(context.registerObjectParser(bandwidthUsageObjectCodec));
regs.add(context.registerObjectSerializer(BandwidthUsage.class, bandwidthUsageObjectCodec));
return regs;
}
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this).add("bandwithUsage", bandwidthUsageObjectType).toString();
+ }
}
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.pcep.auto.bandwidth.extension.Activator
<artifactId>guava</artifactId>
</dependency>
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.cmpn</artifactId>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
</dependency>
<dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
+ <groupId>org.osgi</groupId>
+ <artifactId>osgi.cmpn</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.pcep.parser.message.PCEPCloseMessageParser;
import org.opendaylight.protocol.pcep.parser.message.PCEPErrorMessageParser;
import org.opendaylight.protocol.pcep.parser.message.PCEPKeepAliveMessageParser;
import org.osgi.service.component.annotations.Component;
@Singleton
+@MetaInfServices(value = PCEPExtensionProviderActivator.class)
@Component(immediate = true, service = PCEPExtensionProviderActivator.class,
property = "type=org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator")
public final class BaseParserExtensionActivator extends AbstractPCEPExtensionProviderActivator {
+++ /dev/null
-# Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator
<groupId>${project.groupId}</groupId>
<artifactId>util</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
</dependencies>
<scm>
<url>https://wiki.opendaylight.org/display/ODL/BGPCEP</url>
<tag>HEAD</tag>
</scm>
-</project>
\ No newline at end of file
+</project>
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
+import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator;
import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
import org.opendaylight.protocol.pcep.spi.pojo.AbstractPCEPExtensionProviderActivator;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.p2mp.te.lsp.rev181109.p2mp.pce.capability.tlv.P2mpPceCapability;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = PCEPExtensionProviderActivator.class)
public final class Activator extends AbstractPCEPExtensionProviderActivator {
@Override
protected List<Registration> startImpl(final PCEPExtensionProviderContext context) {
*/
package org.opendaylight.protocol.pcep.p2mp.te.lsp;
+import com.google.common.base.MoreObjects;
import java.net.InetSocketAddress;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.pcep.PCEPCapability;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.p2mp.te.lsp.rev181109.TlvsP2mpCapabilityAug;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.p2mp.te.lsp.rev181109.TlvsP2mpCapabilityAugBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.p2mp.te.lsp.rev181109.p2mp.pce.capability.tlv.P2mpPceCapabilityBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.open.TlvsBuilder;
+@MetaInfServices
public final class P2MPTeLspCapability implements PCEPCapability {
private static final TlvsP2mpCapabilityAug PATH_COMPUTATION_CAP_AUG = new TlvsP2mpCapabilityAugBuilder()
- .setP2mpPceCapability(new P2mpPceCapabilityBuilder().build()).build();
+ .setP2mpPceCapability(new P2mpPceCapabilityBuilder().build())
+ .build();
+
private final boolean supportsPathComputation;
+ public P2MPTeLspCapability() {
+ this(true);
+ }
+
+ // FIXME: this should return distinct implementations
public P2MPTeLspCapability(final boolean supportsP2MPTeLspPathComputation) {
this.supportsPathComputation = supportsP2MPTeLspPathComputation;
}
@Override
public void setCapabilityProposal(final InetSocketAddress address, final TlvsBuilder builder) {
- if (this.supportsPathComputation) {
+ if (supportsPathComputation) {
builder.addAugmentation(PATH_COMPUTATION_CAP_AUG);
}
}
public boolean isStateful() {
return false;
}
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this).add("pathComputation", supportsPathComputation).toString();
+ }
}
+++ /dev/null
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-#
-org.opendaylight.protocol.pcep.p2mp.te.lsp.P2MPTeLspCapability
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-#
-org.opendaylight.protocol.pcep.p2mp.te.lsp.Activator
<artifactId>concepts</artifactId>
</dependency>
- <!--
- FIXME: these are IETF models which are pre-generated in SAL infra.
- This should not be here, but rather should somehow be
- discovered by the plugin.
- -->
<dependency>
<groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
<artifactId>rfc6991-ietf-inet-types</artifactId>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!--test dependencies -->
<dependency>
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
+import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator;
import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
import org.opendaylight.protocol.pcep.spi.TlvRegistry;
import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.stateful.capability.tlv.Stateful;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = PCEPExtensionProviderActivator.class)
public final class InitiatedActivator extends AbstractPCEPExtensionProviderActivator {
@Override
protected List<Registration> startImpl(final PCEPExtensionProviderContext context) {
package org.opendaylight.protocol.pcep.ietf.stateful;
import java.net.InetSocketAddress;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.pcep.PCEPCapability;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.ietf.stateful.app.config.rev160707.PcepIetfStatefulConfig;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.initiated.rev200720.Stateful1Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.stateful.capability.tlv.StatefulBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.open.TlvsBuilder;
-public class PCEPStatefulCapability implements PCEPCapability {
-
+@MetaInfServices
+public final class PCEPStatefulCapability implements PCEPCapability {
private final boolean stateful;
private final boolean active;
- private final boolean instant;
+ private final boolean intiated;
private final boolean triggeredSync;
private final boolean triggeredResync;
private final boolean deltaLspSync;
private final boolean includeDbVersion;
- public PCEPStatefulCapability(final boolean stateful, final boolean active, final boolean instant,
+ public PCEPStatefulCapability() {
+ this(true, true, true, true, true, true, true);
+ }
+
+ public PCEPStatefulCapability(final boolean stateful, final boolean active, final boolean initiated,
final boolean triggeredSync, final boolean triggeredResync, final boolean deltaLspSync,
final boolean includeDbVersion) {
this.stateful = stateful || active || triggeredSync || triggeredResync || deltaLspSync || includeDbVersion;
this.active = active;
- this.instant = instant;
+ this.intiated = initiated;
this.triggeredSync = triggeredSync;
this.triggeredResync = triggeredResync;
this.deltaLspSync = deltaLspSync;
@Override
public void setCapabilityProposal(final InetSocketAddress address, final TlvsBuilder builder) {
- if (this.stateful) {
+ if (stateful) {
builder.addAugmentation(new Tlvs1Builder()
- .setStateful(new StatefulBuilder().setLspUpdateCapability(this.active)
- .addAugmentation(new Stateful1Builder().setInitiation(this.instant).build())
+ .setStateful(new StatefulBuilder().setLspUpdateCapability(active)
+ .addAugmentation(new Stateful1Builder().setInitiation(intiated).build())
.addAugmentation(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller
.pcep.sync.optimizations.rev200720.Stateful1Builder()
- .setTriggeredInitialSync(this.triggeredSync)
- .setTriggeredResync(this.triggeredResync)
- .setDeltaLspSyncCapability(this.deltaLspSync)
- .setIncludeDbVersion(this.includeDbVersion)
+ .setTriggeredInitialSync(triggeredSync)
+ .setTriggeredResync(triggeredResync)
+ .setDeltaLspSyncCapability(deltaLspSync)
+ .setIncludeDbVersion(includeDbVersion)
.build())
.build())
.build());
@Override
public boolean isStateful() {
- return this.stateful;
+ return stateful;
}
public boolean isActive() {
- return this.active;
+ return active;
}
public boolean isInstant() {
- return this.instant;
+ return intiated;
}
public boolean isTriggeredSync() {
- return this.triggeredSync;
+ return triggeredSync;
}
public boolean isTriggeredResync() {
- return this.triggeredResync;
+ return triggeredResync;
}
public boolean isDeltaLspSync() {
- return this.deltaLspSync;
+ return deltaLspSync;
}
public boolean isIncludeDbVersion() {
- return this.includeDbVersion;
+ return includeDbVersion;
}
}
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
+import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator;
import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
import org.opendaylight.protocol.pcep.spi.TlvRegistry;
import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = PCEPExtensionProviderActivator.class)
public final class StatefulActivator extends AbstractPCEPExtensionProviderActivator {
@Override
protected List<Registration> startImpl(final PCEPExtensionProviderContext context) {
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
+import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator;
import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
import org.opendaylight.protocol.pcep.spi.TlvRegistry;
import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = PCEPExtensionProviderActivator.class)
public class SyncOptimizationsActivator extends AbstractPCEPExtensionProviderActivator {
-
@Override
protected List<Registration> startImpl(final PCEPExtensionProviderContext context) {
final List<Registration> regs = new ArrayList<>();
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.pcep.ietf.stateful.PCEPStatefulCapability
\ No newline at end of file
+++ /dev/null
-#
-# Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-#
-org.opendaylight.protocol.pcep.ietf.stateful.StatefulActivator
-org.opendaylight.protocol.pcep.ietf.initiated.InitiatedActivator
-org.opendaylight.protocol.pcep.sync.optimizations.SyncOptimizationsActivator
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
<!--test dependencies -->
<dependency>
*/
package org.opendaylight.protocol.pcep.segment.routing;
+import com.google.common.base.MoreObjects;
import java.net.InetSocketAddress;
+import org.eclipse.jdt.annotation.NonNull;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.pcep.PCEPCapability;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev200720.Tlvs1;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev200720.Tlvs1Builder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev200720.sr.pce.capability.tlv.SrPceCapabilityBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.open.TlvsBuilder;
import org.opendaylight.yangtools.yang.common.Uint8;
+@MetaInfServices
public class PCEPSegmentRoutingCapability implements PCEPCapability {
+ private static final @NonNull Tlvs1 AUGMENTATION = new Tlvs1Builder()
+ .setSrPceCapability(new SrPceCapabilityBuilder()
+ .setNFlag(Boolean.FALSE)
+ .setXFlag(Boolean.FALSE)
+ .setMsd(Uint8.ZERO)
+ .build())
+ .build();
private final boolean isSegmentRoutingCapable;
+ public PCEPSegmentRoutingCapability() {
+ this(true);
+ }
+
public PCEPSegmentRoutingCapability(final boolean isSegmentRoutingCapable) {
this.isSegmentRoutingCapable = isSegmentRoutingCapable;
}
@Override
public void setCapabilityProposal(final InetSocketAddress address, final TlvsBuilder builder) {
- if (this.isSegmentRoutingCapable) {
- builder.addAugmentation(new Tlvs1Builder()
- .setSrPceCapability(new SrPceCapabilityBuilder().setNFlag(Boolean.FALSE).setXFlag(Boolean.FALSE)
- .setMsd(Uint8.ZERO).build())
- .build());
+ if (isSegmentRoutingCapable) {
+ builder.addAugmentation(AUGMENTATION);
}
}
public boolean isSegmentRoutingCapable() {
- return this.isSegmentRoutingCapable;
+ return isSegmentRoutingCapable;
}
@Override
public boolean isStateful() {
return false;
}
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this).add("srCapable", isSegmentRoutingCapable).toString();
+ }
}
*/
package org.opendaylight.protocol.pcep.segment.routing;
+import com.google.common.base.MoreObjects;
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
+import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator;
import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
import org.opendaylight.protocol.pcep.spi.TlvRegistry;
import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.path.setup.type.tlv.PathSetupType;
import org.opendaylight.yangtools.concepts.Registration;
+@MetaInfServices(value = PCEPExtensionProviderActivator.class)
public class SegmentRoutingActivator extends AbstractPCEPExtensionProviderActivator {
-
@Deprecated
private final boolean ianaSrSubobjectsType;
public SegmentRoutingActivator() {
- this.ianaSrSubobjectsType = true;
+ ianaSrSubobjectsType = true;
}
@Deprecated
regs.add(context.registerTlvSerializer(SrPceCapability.class, new SrPceCapabilityTlvParser()));
/* Subobjects */
- final SrEroSubobjectParser srEroSubobjectParser = new SrEroSubobjectParser(this.ianaSrSubobjectsType);
+ final SrEroSubobjectParser srEroSubobjectParser = new SrEroSubobjectParser(ianaSrSubobjectsType);
regs.add(context.registerEROSubobjectParser(srEroSubobjectParser.getCodePoint(), srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
.pcep.segment.routing.rev200720.network.topology.topology.node.path.computation.client.reported.lsp.path.ero
srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(SrEroType.class, srEroSubobjectParser));
- final SrRroSubobjectParser srRroSubobjectParser = new SrRroSubobjectParser(this.ianaSrSubobjectsType);
+ final SrRroSubobjectParser srRroSubobjectParser = new SrRroSubobjectParser(ianaSrSubobjectsType);
regs.add(context.registerRROSubobjectParser(srRroSubobjectParser.getCodePoint(), srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
.pcep.segment.routing.rev200720.network.topology.topology.node.path.computation.client.reported.lsp.path.rro
return regs;
}
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this).add("ianaSubobjects", ianaSrSubobjectsType).toString();
+ }
}
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.pcep.segment.routing.PCEPSegmentRoutingCapability
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.pcep.segment.routing.SegmentRoutingActivator
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kohsuke.metainf-services</groupId>
+ <artifactId>metainf-services</artifactId>
+ </dependency>
+
<!-- Test dependencies -->
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
import java.util.ArrayList;
import java.util.List;
+import org.kohsuke.MetaInfServices;
import org.opendaylight.protocol.rsvp.parser.impl.subobject.ero.EROAsNumberSubobjectParser;
import org.opendaylight.protocol.rsvp.parser.impl.subobject.ero.EROIpv4PrefixSubobjectParser;
import org.opendaylight.protocol.rsvp.parser.impl.subobject.ero.EROIpv6PrefixSubobjectParser;
import org.opendaylight.protocol.rsvp.parser.impl.te.SessionAttributeLspRaObjectParser;
import org.opendaylight.protocol.rsvp.parser.spi.AbstractRSVPExtensionProviderActivator;
import org.opendaylight.protocol.rsvp.parser.spi.LabelRegistry;
+import org.opendaylight.protocol.rsvp.parser.spi.RSVPExtensionProviderActivator;
import org.opendaylight.protocol.rsvp.parser.spi.RSVPExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.admin.status.object.AdminStatusObject;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.association.object.AssociationObject;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.tspec.object.TspecObject;
import org.opendaylight.yangtools.concepts.Registration;
-public class RSVPActivator extends AbstractRSVPExtensionProviderActivator {
+@MetaInfServices(value = RSVPExtensionProviderActivator.class)
+public final class RSVPActivator extends AbstractRSVPExtensionProviderActivator {
+
@Override
protected List<Registration> startImpl(final RSVPExtensionProviderContext context) {
final List<Registration> regs = new ArrayList<>();
+++ /dev/null
-# Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
-#
-# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
-# accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-org.opendaylight.protocol.rsvp.parser.impl.RSVPActivator