Upgrade to E2 API with disconnect-all method 89/389/3
authorLott, Christopher (cl778h) <cl778h@att.com>
Thu, 20 Jun 2019 11:52:19 +0000 (07:52 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Thu, 20 Jun 2019 14:56:16 +0000 (10:56 -0400)
New API spec dated 20190620 adds method nodebDelete()

Change-Id: I1f2d92b56c3cf3c46df09a399046a5846ff64236
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
docs/release-notes.rst
e2-mgr-client/pom.xml
e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-20.yaml [moved from e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-11.yaml with 98% similarity]
webapp-backend/pom.xml
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java
webapp-frontend/src/app/ran-connection/ran-connection.component.ts
webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts

index 94c3e86..7202a32 100644 (file)
 RIC Dashboard Release Notes
 ===========================
 
-Version 1.0.4, 19 June 2019
+Version 1.0.4, 20 June 2019
 ---------------------------
 * Add AC xApp neighbor control screen
 * Add ANR xApp neighbor cell relation table
 * Drop the pendulum xApp control screen
 * Add column sorting on xApp catalog, xApp control, ANR
 * Add disconnect-all button to RAN connection screen
+* Extend E2 service with disconnect-all method
 * Update ANR xApp client to spec version 0.0.8
-* Update E2 manager client to spec version 20190611
+* Update E2 manager client to spec version 20190620
 * Adjust CSS and HTML for main container positioning
 * Revise config property keys to use URL (not basepath)
 * Left menu overlap main content fix
 * Extend back-end controllers to return error details
 * Add feature resilient to malformed instance data
 * Extend Xapp Controller with config endpoints
+* Add build number to dashboard version string
 
 Version 1.0.3, 28 May 2019
 --------------------------
index a3fd0f2..335f3cc 100644 (file)
@@ -31,7 +31,7 @@ limitations under the License.
        <groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
        <artifactId>e2-mgr-client</artifactId>
        <name>RIC E2 Manager client</name>
-       <version>20190611-SNAPSHOT</version>
+       <version>20190620-SNAPSHOT</version>
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -104,7 +104,7 @@ limitations under the License.
                                                        <goal>generate</goal>
                                                </goals>
                                                <configuration>
-                                                       <inputSpec>${project.basedir}/src/main/resources/E2_Manager_API_2019-06-11.yaml</inputSpec>
+                                                       <inputSpec>${project.basedir}/src/main/resources/E2_Manager_API_2019-06-20.yaml</inputSpec>
                                                        <language>java</language>
                                                        <packageName>${client.base.package.name}</packageName>
                                                        <modelPackage>${client.base.package.name}.model</modelPackage>
@@ -1,8 +1,8 @@
 # ========================LICENSE_START=================================
 # O-RAN-SC
-# %%
+#
 # Copyright (C) 2019 AT&T Intellectual Property and Nokia
-# %%
+#
 # 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
@@ -117,7 +117,21 @@ paths:
           content:
             application/problem+json:
               schema:
-                $ref: '#/components/schemas/ErrorResponse'
+                $ref: '#/components/schemas/ErrorResponse'  
+  '/nodeb':
+    delete:
+      tags:
+        - nodeb
+      summary: Close all connections to the RANs and delete the data from the nodeb-rnib DB
+      responses:
+        '204':
+          description: Successful operation
+        '500':
+          description: Internal Error
+          content:
+            application/problem+json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'  
   /health:
     get:
       tags:
index 37a8595..fac2743 100644 (file)
@@ -32,6 +32,8 @@ limitations under the License.
        <properties>
                <java.version>1.8</java.version>
                <springfox.version>2.9.2</springfox.version>
+               <!-- Set by Jenkins -->
+               <build.number>0</build.number>
        </properties>
        <dependencies>
                <dependency>
@@ -47,7 +49,7 @@ limitations under the License.
                <dependency>
                        <groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
                        <artifactId>e2-mgr-client</artifactId>
-                       <version>20190611-SNAPSHOT</version>
+                       <version>20190620-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>org.o-ran-sc.ric.xappmgr.client</groupId>
@@ -94,15 +96,6 @@ limitations under the License.
        </dependencies>
        <build>
                <plugins>
-                       <!-- do not deploy a jar or pom file -->
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-deploy-plugin</artifactId>
-                               <!-- spring sets the <version>2.8</version> -->
-                               <configuration>
-                                       <skip>true</skip>
-                               </configuration>
-                       </plugin>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>license-maven-plugin</artifactId>
@@ -128,6 +121,35 @@ limitations under the License.
                                <groupId>org.springframework.boot</groupId>
                                <artifactId>spring-boot-maven-plugin</artifactId>
                        </plugin>
+                       <!-- Require Java 1.8 -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <!-- Spring sets the <version></version> -->
+                               <configuration>
+                                       <source>1.8</source>
+                                       <target>1.8</target>
+                               </configuration>
+                       </plugin>
+                       <!-- Add the build number to the jar manifest. Spring-Boot uses a complex 
+                               packaging process that makes access to the original Manifest.MF very difficult. 
+                               However, Java provides access to the implementation version for a package, 
+                               so cram the build number into there. -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <!-- Spring sets the <version>2.5</version> -->
+                               <configuration>
+                                       <archive>
+                                               <manifest>
+                                                       <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                                               </manifest>
+                                               <manifestEntries>
+                                                       <Implementation-Version>${project.version}-b${build.number}</Implementation-Version>
+                                               </manifestEntries>
+                                       </archive>
+                               </configuration>
+                       </plugin>
                        <plugin>
                                <artifactId>maven-resources-plugin</artifactId>
                                <!-- spring-boot sets the <version>3.1.0</version> -->
@@ -149,6 +171,15 @@ limitations under the License.
                                        </execution>
                                </executions>
                        </plugin>
+                       <!-- do not deploy a jar or pom file -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-deploy-plugin</artifactId>
+                               <!-- spring sets the <version>2.8</version> -->
+                               <configuration>
+                                       <skip>true</skip>
+                               </configuration>
+                       </plugin>
                        <!-- https://stackoverflow.com/questions/39126226/fabric8-springboot-full-example -->
                        <plugin>
                                <groupId>io.fabric8</groupId>
index 334915c..a03b33e 100644 (file)
@@ -82,6 +82,10 @@ public class E2ManagerMockConfiguration {
                NodebApi mockApi = mock(NodebApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
 
+               doAnswer(i -> {
+                       return null;
+               }).when(mockApi).nodebDelete();
+
                doAnswer(i -> {
                        return nodebResponse;
                }).when(mockApi).getNb(any(String.class));
index ba98aed..a088af3 100644 (file)
@@ -135,11 +135,12 @@ public class E2ManagerController {
                }
        }
 
-       // TODO replace with actual functionality
-       @ApiOperation(value = "Disconnect all RAN Connections.")
-       @RequestMapping(value = "/disconnectAllRAN", method = RequestMethod.DELETE)
-       public void disconnectAllRANConnections() {
-               logger.debug("disconnectAllRANConnections");
+       @ApiOperation(value = "Close all connections to the RANs and delete the data from the nodeb-rnib DB.")
+       @RequestMapping(value = "/nodeb", method = RequestMethod.DELETE)
+       public void nodebDelete() {
+               logger.debug("nodebDelete");
+               e2NodebApi.nodebDelete();
+               // TODO: remove this mock functionality
                responses.clear();
        }
 
index 932bca6..ac77c37 100644 (file)
@@ -63,7 +63,7 @@ export class RANConnectionComponent implements OnInit {
     this.confirmDialogService.openConfirmDialog('Are you sure you want to disconnect all RAN connections?')
       .afterClosed().subscribe(res => {
         if (res) {
-          this.e2MgrSvc.disconnectAllRAN().subscribe(
+          this.e2MgrSvc.nodebDelete().subscribe(
             response => {
               if (response.status === 200) {
                 this.notification.success('Disconnect all RAN Connections Succeeded!');
index f08face..7510567 100644 (file)
@@ -62,8 +62,12 @@ export class E2ManagerService {
     return this.httpClient.post(this.basePath + 'x2Setup', req);
   }
 
-  disconnectAllRAN() {
-    return this.httpClient.delete((this.basePath + 'disconnectAllRAN'), { observe: 'response' });
+  /**
+   * Sends a request to drop all RAN connections
+   * @returns Observable
+   */
+  nodebDelete() {
+    return this.httpClient.delete((this.basePath + 'nodeb'), { observe: 'response' });
   }
 
 }