Clean up A1 controller dependencies 66/4166/1
authorRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 16 Jun 2020 15:41:14 +0000 (17:41 +0200)
committerRehanRaza <muhammad.rehan.raza@est.tech>
Wed, 17 Jun 2020 12:38:05 +0000 (14:38 +0200)
Change-Id: Ib9b9ed150495353812b750cab2e725af753f16c5
Issue-ID: NONRTRIC-250
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
sdnc-a1-controller/northbound/features/sdnc-a1-northbound-all/pom.xml
sdnc-a1-controller/northbound/nonrt-ric-api/features/sdnc-nonrt-ric-api/pom.xml
sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml
sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/provider/NonrtRicApiProvider.java

index 6365abe..3a4d11a 100644 (file)
@@ -42,17 +42,6 @@ limitations under the License.
        <packaging>feature</packaging>
 
        <name>sdnc-a1-northbound :: features :: ${project.artifactId}</name>
-       <dependencyManagement>
-           <dependencies>
-               <dependency>
-                   <groupId>org.onap.ccsdk.sli.core</groupId>
-                   <artifactId>sli-core-artifacts</artifactId>
-                   <version>${ccsdk.sli.core.version}</version>
-                   <type>pom</type>
-                   <scope>import</scope>
-               </dependency>
-           </dependencies>
-       </dependencyManagement>
 
        <dependencies>
                <dependency>
index 83eb53e..895766d 100644 (file)
     <name>sdnc-a1-northbound :: nonrt-ric-api :: ${project.artifactId}</name>
 
     <dependencies>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>odl-mdsal-broker</artifactId>
-            <type>xml</type>
-            <classifier>features</classifier>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.ccsdk.sli.core</groupId>
-            <artifactId>ccsdk-sli</artifactId>
-            <version>${ccsdk.sli.core.version}</version>
-            <type>xml</type>
-            <classifier>features</classifier>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>nonrt-ric-api-model</artifactId>
@@ -59,6 +46,5 @@
             <artifactId>nonrt-ric-api-provider</artifactId>
             <version>${project.version}</version>
         </dependency>
-
     </dependencies>
 </project>
index 7f38d5b..8fa19ac 100644 (file)
         </plugins>
     </build>
 
-       <dependencyManagement>
-           <dependencies>
-               <dependency>
-                   <groupId>org.onap.ccsdk.sli.core</groupId>
-                   <artifactId>sli-core-artifacts</artifactId>
-                   <version>${ccsdk.sli.core.version}</version>
-                   <type>pom</type>
-                   <scope>import</scope>
-               </dependency>
-           </dependencies>
-       </dependencyManagement>
     <dependencies>
         <dependency>
             <groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
             <artifactId>nonrt-ric-api-model</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
             <artifactId>spring-web</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.onap.ccsdk.sli.core</groupId>
-            <artifactId>sli-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.ccsdk.sli.core</groupId>
-            <artifactId>sli-provider</artifactId>
-        </dependency>
-
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>sal-binding-api</artifactId>
         </dependency>
-
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-common-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-test-model</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>sal-binding-broker-impl</artifactId>
             <version>3.14.6</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.json</groupId>
-            <artifactId>json</artifactId>
-        </dependency>
     </dependencies>
 </project>
index 392b1d6..a432d0c 100644 (file)
@@ -31,8 +31,6 @@ import org.o_ran_sc.nonrtric.sdnc_a1.northbound.restadapter.RestAdapterImpl;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.yang.gen.v1.org.o_ran_sc.nonrtric.sdnc_a1.northbound.a1.adapter.rev200122.A1ADAPTERAPIService;
 import org.opendaylight.yang.gen.v1.org.o_ran_sc.nonrtric.sdnc_a1.northbound.a1.adapter.rev200122.DeleteA1PolicyInput;
@@ -86,7 +84,6 @@ public class NonrtRicApiProvider implements AutoCloseable, A1ADAPTERAPIService {
   protected DataBroker dataBroker;
   protected NotificationPublishService notificationService;
   protected RpcProviderRegistry rpcRegistry;
-  protected BindingAwareBroker.RpcRegistration<?> rpcRegistration;
   private RestAdapter restAdapter;
 
   public NonrtRicApiProvider(DataBroker dataBroker, NotificationPublishService notificationPublishService,
@@ -101,20 +98,14 @@ public class NonrtRicApiProvider implements AutoCloseable, A1ADAPTERAPIService {
 
   public void initialize() {
     log.info("Initializing provider for {}", APP_NAME);
-    createContainers();
     restAdapter = new RestAdapterImpl();
     log.info("Initialization complete for {}", APP_NAME);
   }
 
-  protected void initializeChild() {
-    // Override if you have custom initialization intelligence
-  }
-
   @Override
   public void close() throws Exception {
     log.info("Closing provider for {}", APP_NAME);
     executor.shutdown();
-    rpcRegistration.close();
     log.info("Successfully closed provider for {}", APP_NAME);
   }
 
@@ -139,21 +130,6 @@ public class NonrtRicApiProvider implements AutoCloseable, A1ADAPTERAPIService {
     }
   }
 
-  private void createContainers() {
-
-    final WriteTransaction t = dataBroker.newReadWriteTransaction();
-
-    try {
-      CheckedFuture<Void, TransactionCommitFailedException> checkedFuture = t.submit();
-      checkedFuture.get();
-      log.info("Create containers succeeded!");
-
-    } catch (InterruptedException | ExecutionException e) {
-      log.error("Create containers failed: ", e);
-      Thread.currentThread().interrupt();
-    }
-  }
-
   @Override
   public ListenableFuture<RpcResult<PutA1PolicyOutput>> putA1Policy(PutA1PolicyInput input) {
     log.info("Start of putPolicy");