Bump to odlparent 2.0.0
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / util / MdSalRegistrationUtils.java
index 317798f22b44809a4e1beeaf4bc94944a3a04ad0..f838d8f1818f0b363197da23e7d350a071098e45 100644 (file)
@@ -33,6 +33,7 @@ import org.opendaylight.openflowplugin.impl.services.sal.SalPortServiceImpl;
 import org.opendaylight.openflowplugin.impl.services.sal.SalTableServiceImpl;
 import org.opendaylight.openflowplugin.impl.datastore.MultipartWriterProvider;
 import org.opendaylight.openflowplugin.impl.datastore.MultipartWriterProviderFactory;
+import org.opendaylight.openflowplugin.extension.onf.service.SalBundleServiceImpl;
 import org.opendaylight.openflowplugin.impl.statistics.services.OpendaylightFlowStatisticsServiceImpl;
 import org.opendaylight.openflowplugin.impl.statistics.services.OpendaylightFlowTableStatisticsServiceImpl;
 import org.opendaylight.openflowplugin.impl.statistics.services.OpendaylightGroupStatisticsServiceImpl;
@@ -58,6 +59,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.SalBundleService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.SalPortService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
@@ -133,6 +135,12 @@ public class MdSalRegistrationUtils {
                 new SalExperimenterMessageServiceImpl(rpcContext, deviceContext, extensionConverterProvider));
         rpcContext.registerRpcServiceImplementation(SalExperimenterMpMessageService.class,
                 new SalExperimenterMpMessageServiceImpl(rpcContext, deviceContext, extensionConverterProvider));
+
+        //register onf extension bundles
+        rpcContext.registerRpcServiceImplementation(SalBundleService.class,
+                new SalBundleServiceImpl(new SalExperimenterMessageServiceImpl(
+                        rpcContext, deviceContext, extensionConverterProvider
+                )));
     }
 
     /**
@@ -151,7 +159,7 @@ public class MdSalRegistrationUtils {
         // pickup low statistics service
         final OpendaylightFlowStatisticsService flowStatisticsService = Preconditions.checkNotNull(
                 rpcContext.lookupRpcService(OpendaylightFlowStatisticsService.class));
-        Preconditions.checkArgument(COMPOSITE_SERVICE_TYPE_TOKEN.isAssignableFrom(flowStatisticsService.getClass()));
+        Preconditions.checkArgument(COMPOSITE_SERVICE_TYPE_TOKEN.isSubtypeOf(flowStatisticsService.getClass()));
         // attach delegate to flow statistics service (to cover all but aggregated stats with match filter input)
         final OpendaylightFlowStatisticsServiceDelegateImpl flowStatisticsDelegate =
                 new OpendaylightFlowStatisticsServiceDelegateImpl(rpcContext, deviceContext, notificationPublishService, new AtomicLong(), convertorExecutor);