import java.util.Map;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
+import org.opendaylight.protocol.bgp.flowspec.FlowspecTypeRegistries.SAFI;
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.flowspec.rev200120.bgp.rib.rib.loc.rib.tables.routes.FlowspecRoutesCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.destination.ipv4.DestinationFlowspecIpv4;
FlowspecRoute,
FlowspecRouteKey> {
private static final FlowspecRoutes EMPTY_CONTAINER = new FlowspecRoutesBuilder().build();
- private static FlowspecIpv4RIBSupport SINGLETON;
- private FlowspecIpv4RIBSupport(final SimpleFlowspecExtensionProviderContext context,
- final BindingNormalizedNodeSerializer mappingService) {
+ public FlowspecIpv4RIBSupport(final BindingNormalizedNodeSerializer mappingService) {
super(
mappingService,
FlowspecRoutesCase.class,
Ipv4AddressFamily.class,
FlowspecSubsequentAddressFamily.class,
DestinationFlowspecIpv4.QNAME,
- new SimpleFlowspecIpv4NlriParser(context
- .getFlowspecTypeRegistry(SimpleFlowspecExtensionProviderContext.AFI.IPV4,
- SimpleFlowspecExtensionProviderContext.SAFI.FLOWSPEC))
+ new SimpleFlowspecIpv4NlriParser(SAFI.FLOWSPEC)
);
}
- static synchronized FlowspecIpv4RIBSupport getInstance(
- final SimpleFlowspecExtensionProviderContext context,
- final BindingNormalizedNodeSerializer mappingService) {
- if (SINGLETON == null) {
- SINGLETON = new FlowspecIpv4RIBSupport(context, mappingService);
- }
- return SINGLETON;
- }
-
@Override
public FlowspecRoute createRoute(final FlowspecRoute route, final FlowspecRouteKey key,
final Attributes attributes) {