From 0e4e58bf061df695341ac250beb97a978cefdaf7 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Fri, 29 Jan 2021 17:42:42 +0000 Subject: Revert "migrate sli to alu-SR1" This reverts commit ce4e5f9a00d2677495240ad367b9bfc4b74752d0. Reason for revert: ODL upgrade changes need to be backed out until issues in ccsdk/features are resolved. Change-Id: I168e2519e37f3eee61609d0da890c14db49ec49e --- .../ccsdk/sli/northbound/DataChangeProvider.java | 26 ++++++++++-------- .../OSGI-INF/blueprint/datachange-blueprint.xml | 32 ++++++++++++++++++++++ .../blueprint/datachange-blueprint.xml | 9 ++++-- 3 files changed, 52 insertions(+), 15 deletions(-) create mode 100644 northbound/dataChange/provider/src/main/resources/OSGI-INF/blueprint/datachange-blueprint.xml (limited to 'northbound/dataChange/provider/src/main') diff --git a/northbound/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java b/northbound/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java index cf4b07a70..3301ca8e0 100644 --- a/northbound/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java +++ b/northbound/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java @@ -9,9 +9,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,26 +22,28 @@ package org.onap.ccsdk.sli.northbound; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; + import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper; -import org.opendaylight.mdsal.binding.api.DataBroker; -import org.opendaylight.mdsal.binding.api.NotificationPublishService; -import org.opendaylight.mdsal.binding.api.RpcProviderService; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.datachange.rev150519.DataChangeNotificationInput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.datachange.rev150519.DataChangeNotificationInputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.datachange.rev150519.DataChangeNotificationOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.datachange.rev150519.DataChangeNotificationOutputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.datachange.rev150519.DataChangeService; -import org.opendaylight.yangtools.concepts.ObjectRegistration; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; + /** * Defines a base implementation for your provider. This class extends from a helper class * which provides storage for the most commonly used components of the MD-SAL. Additionally the @@ -58,14 +60,14 @@ public class DataChangeProvider implements AutoCloseable, DataChangeService { protected DataBroker dataBroker; protected NotificationPublishService notificationService; - protected RpcProviderService rpcRegistry; - protected ObjectRegistration rpcRegistration; + protected RpcProviderRegistry rpcRegistry; + protected BindingAwareBroker.RpcRegistration rpcRegistration; private final DataChangeClient dataChangeClient; public DataChangeProvider(final DataBroker dataBroker, final NotificationPublishService notificationPublishService, - final RpcProviderService rpcProviderRegistry, + final RpcProviderRegistry rpcProviderRegistry, final DataChangeClient dataChangeClient) { this.LOG.info( "Creating provider for {}", APPLICATION_NAME); @@ -79,7 +81,7 @@ public class DataChangeProvider implements AutoCloseable, DataChangeService { public void initialize(){ LOG.info( "Initializing provider for {}", APPLICATION_NAME); - rpcRegistration = rpcRegistry.registerRpcImplementation(DataChangeService.class, this); + rpcRegistration = rpcRegistry.addRpcImplementation(DataChangeService.class, this); LOG.info( "Initialization complete for {}", APPLICATION_NAME); } diff --git a/northbound/dataChange/provider/src/main/resources/OSGI-INF/blueprint/datachange-blueprint.xml b/northbound/dataChange/provider/src/main/resources/OSGI-INF/blueprint/datachange-blueprint.xml new file mode 100644 index 000000000..5a38c81f1 --- /dev/null +++ b/northbound/dataChange/provider/src/main/resources/OSGI-INF/blueprint/datachange-blueprint.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/northbound/dataChange/provider/src/main/resources/org/opendaylight/blueprint/datachange-blueprint.xml b/northbound/dataChange/provider/src/main/resources/org/opendaylight/blueprint/datachange-blueprint.xml index 7bc0076dd..5a38c81f1 100644 --- a/northbound/dataChange/provider/src/main/resources/org/opendaylight/blueprint/datachange-blueprint.xml +++ b/northbound/dataChange/provider/src/main/resources/org/opendaylight/blueprint/datachange-blueprint.xml @@ -11,13 +11,16 @@ + interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" + odl:type="default" /> + interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService" + odl:type="default" /> + interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry" + odl:type="default" /> -- cgit 1.2.3-korg