2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.protocol.bgp.flowspec;
10 import java.util.List;
11 import javax.inject.Inject;
12 import javax.inject.Singleton;
13 import org.kohsuke.MetaInfServices;
14 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
15 import org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv4.FlowspecL3vpnIpv4RIBSupport;
16 import org.opendaylight.protocol.bgp.flowspec.l3vpn.ipv6.FlowspecL3vpnIpv6RIBSupport;
17 import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderActivator;
18 import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecL3vpnSubsequentAddressFamily;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecSubsequentAddressFamily;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
23 import org.opendaylight.yangtools.concepts.Registration;
24 import org.osgi.service.component.annotations.Component;
27 @Component(immediate = true, property = "type=org.opendaylight.protocol.bgp.flowspec.RIBActivator")
29 public final class RIBActivator implements RIBExtensionProviderActivator {
31 public RIBActivator() {
36 public List<Registration> startRIBExtensionProvider(final RIBExtensionProviderContext context,
37 final BindingNormalizedNodeSerializer mappingService) {
39 context.registerRIBSupport(Ipv4AddressFamily.VALUE, FlowspecSubsequentAddressFamily.VALUE,
40 new FlowspecIpv4RIBSupport(mappingService)),
41 context.registerRIBSupport(Ipv6AddressFamily.VALUE, FlowspecSubsequentAddressFamily.VALUE,
42 new FlowspecIpv6RIBSupport(mappingService)),
43 context.registerRIBSupport(Ipv4AddressFamily.VALUE, FlowspecL3vpnSubsequentAddressFamily.VALUE,
44 new FlowspecL3vpnIpv4RIBSupport(mappingService)),
45 context.registerRIBSupport(Ipv6AddressFamily.VALUE, FlowspecL3vpnSubsequentAddressFamily.VALUE,
46 new FlowspecL3vpnIpv6RIBSupport(mappingService)));