Upgrade ANR API to version 0.0.7 99/199/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Tue, 28 May 2019 13:17:51 +0000 (09:17 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Tue, 28 May 2019 13:17:51 +0000 (09:17 -0400)
Change-Id: I5c21964e98c5a8202dd40ed10ceca6b39f72dcf2
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
anr-xapp-client/pom.xml
anr-xapp-client/src/main/resources/anr_swagger_0.0.7.yaml [new file with mode: 0644]
docs/release-notes.rst
webapp-backend/pom.xml
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardApplication.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/HealthcheckController.java

index 168a252..83f79e2 100644 (file)
@@ -31,7 +31,7 @@ limitations under the License.
        <groupId>org.o-ran-sc.ric.anrxapp.client</groupId>
        <artifactId>anr-xapp-client</artifactId>
        <name>RIC ANR xApp client</name>
-       <version>0.0.6-SNAPSHOT</version>
+       <version>0.0.7-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/anr_swagger_0.0.6.yaml</inputSpec>
+                                                       <inputSpec>${project.basedir}/src/main/resources/anr_swagger_0.0.7.yaml</inputSpec>
                                                        <language>java</language>
                                                        <configOptions>
                                                                <groupId>${project.groupId}</groupId>
diff --git a/anr-xapp-client/src/main/resources/anr_swagger_0.0.7.yaml b/anr-xapp-client/src/main/resources/anr_swagger_0.0.7.yaml
new file mode 100644 (file)
index 0000000..2818b02
--- /dev/null
@@ -0,0 +1,228 @@
+# ========================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
+#
+#      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.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ========================LICENSE_END===================================
+swagger : '2.0'
+info :
+  description : REST API specification for RIC ANR closed xAPP
+  version     : 0.0.7
+  title       : RIC ANR
+  license:
+    name : Nokia Closed App
+    url  : 'http://www.nokia.com'
+host     : anr-service
+basePath : /ric/v1
+schemes :
+  - http
+paths :
+  /health/alive :
+    get :
+      summary     : Health check of ANR - Liveness probe
+      tags        : 
+        - health
+      operationId : getHealthAlive
+      responses   :
+        '200' :
+          description : Status of ANR xApp is ok
+  /health/ready :
+    get :
+      summary     : Health check of ANR - Readiness probe
+      tags        : 
+        - health
+      operationId : getHealthReady
+      responses   :
+        '200':
+          description : ANR xApp is ready to serve
+  /ncrt/gnodebs :
+    get :
+      summary     : Returns list of gNodeB IDs based on NCRT in ANR
+      tags        : 
+        - ncrt
+      operationId : getgNodeB
+      produces  :
+        - application/json
+      responses :
+        '200' :
+          description : successful operation
+          schema      :
+            $ref : '#/definitions/ggNodeBTable'
+        '500' :
+          description : Unable to retrieve gNodeBs
+  /ncrt/servingcells :
+    get :
+      summary     : Returns neighbor cell relation table for all gNodeBs or based on query string
+      tags        : 
+        - ncrt
+      operationId : getNcrt
+      parameters :
+        - $ref : '#/parameters/ggnodeb'
+        - $ref : '#/parameters/servingCellNrcgi'
+        - $ref : '#/parameters/neighborCellNrpci'
+      produces  :
+        - application/json
+      responses :
+        '200' :
+          description : successful operation
+          schema      :
+            $ref : '#/definitions/neighborCellRelationTable'
+        '500' :
+          description : Unable to retrieve NCRT
+  /ncrt/servingcells/{servCellNrcgi}/neighborcells/{neighCellNrpci} :
+    parameters :
+      - $ref : '#/parameters/servCellNrcgi'
+      - $ref : '#/parameters/neighCellNrpci'
+    put :
+      summary     : Modify neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI
+      tags        : 
+        - ncrt
+      operationId : modifyNcrt
+      consumes   :
+        - application/json
+      produces   :
+        - application/json
+      parameters :
+        - name        : NcrtModificationParameters
+          in          : body
+          description : Parameters to modify neighbor cell relation
+          required    : true
+          schema :
+            $ref : '#/definitions/neighborCellRelationMod'
+      responses :
+        '200' :
+          description : Successfully modified neighbor cell relation
+        '400' :
+          description : Modification failed.
+                        { Non-existent identifier {servCellNrcgi | neighCellNrpci} in request |
+                          Invalid data in body
+                        }
+        '500' :
+          description : Modification failed
+    delete :
+      summary     : Delete neighbor cell relation based on Source Cell NRCGI and Neighbor Cell NRPCI
+      tags        : 
+        - ncrt
+      operationId : deleteNcrt
+      responses :
+        '204' :
+          description : Successfully deleted neighbor cell relation
+        '400' :
+          description : Deletion failed.
+                        { Non-existent identifier {servCellNrcgi | neighCellNrpci} in request }
+        '500' :
+          description : Deletion failed
+parameters :
+  ggnodeb :
+    type        : string
+    name        : ggnodeb
+    description : Global gNodeB Identifier
+    in          : query
+  servingCellNrcgi :
+    type        : string
+    name        : servingCellNrcgi
+    description : Serving Cell Identifier (NR CGI)
+    in          : query
+  neighborCellNrpci :
+    type        : string
+    name        : neighborCellNrpci
+    description : Neighbor Cell Identifier (NR PCI)
+    in          : query
+  servCellNrcgi :
+    type        : string
+    name        : servCellNrcgi
+    description : Serving Cell Identifier (NR CGI)
+    in          : path
+    required   : true    
+  neighCellNrpci :
+    type        : string
+    name        : neighCellNrpci
+    description : Neighbor Cell Identifier (NR PCI)
+    in          : path
+    required    : true
+definitions :
+  ggNodeBTable :
+    type : object
+    properties : 
+      gNodeBIds : 
+        type   : array
+        items  :
+          $ref : '#/definitions/ggnodebId'
+  neighborCellRelationTable :
+    type : object
+    properties : 
+      ncrtRelations : 
+        type   : array
+        items  :
+          $ref : '#/definitions/neighborCellRelation'
+  ggnodebId :
+    type        : string
+    description : Global gNodeB Identifier
+    example     : ABCDE, EFGHI
+  neighborCellRelation :
+    type  : object
+    required : 
+      - servingCellNrcgi
+      - neighborCellNrpci
+      - neighborCellNrcgi
+      - flagNoHo
+      - flagNoXn
+      - flagNoRemove
+    properties :
+      servingCellNrcgi :
+        type        : string
+        description : Serving Cell Identifier (NR CGI)
+        example     : E12345
+      neighborCellNrpci :
+        type        : string
+        description : Neighbor Cell Identifier (NR PCI)
+        example     : E12345
+      neighborCellNrcgi :
+        type        : string
+        description : Neighbor Cell Identifier (NR CGI)
+        example     : E12345
+      flagNoHo :
+        type        : boolean
+        description : Flag for HANDOVER NOT ALLOWED
+        example     : True
+      flagNoXn :
+        type        : boolean
+        description : Flag for Xn CONNECTION NOT ALLOWED
+        example     : True
+      flagNoRemove :
+        type        : boolean
+        description : Flag for DELETION NOT ALLOWED
+        example     : True
+  neighborCellRelationMod :
+    type      : object
+    required  :
+      - neighborCellIdentifierType
+      - action
+    properties :
+      neighborCellNrcgi :
+        type        : string
+        description : Neighbor Cell Identifier (NR CGI)
+        example     : E12345
+      flagNoHo :
+        type        : boolean
+        description : Flag for HANDOVER NOT ALLOWED
+        example     : True
+      flagNoXn :
+        type        : boolean
+        description : Flag for Xn CONNECTION NOT ALLOWED
+        example     : True
+      flagNoRemove :
+        type        : boolean
+        description : Flag for DELETION NOT ALLOWED
+        example     : True
index a15feb5..5b453f4 100644 (file)
@@ -25,7 +25,7 @@ Version 1.0.3, 22 May 2019
 * Add AC xApp controller to backend
 * Add AC xApp interface to frontend
 * Add RAN type radio selector to connection setup
-* Update ANR xApp client to spec version 0.0.6
+* Update ANR xApp client to spec version 0.0.7
 * Update E2 manager client to spec version 20190515
 * Update xApp manager client to spec version 0.1.3
 * Add get-version methods to all controllers
index 81e332d..a042527 100644 (file)
@@ -42,7 +42,7 @@ limitations under the License.
                <dependency>
                        <groupId>org.o-ran-sc.ric.anrxapp.client</groupId>
                        <artifactId>anr-xapp-client</artifactId>
-                       <version>0.0.6-SNAPSHOT</version>
+                       <version>0.0.7-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
index c9a98e4..4cf2fd2 100644 (file)
@@ -38,7 +38,8 @@ public class DashboardApplication {
        public static void main(String[] args) {
                SpringApplication.run(DashboardApplication.class, args);
                // Force this onto the console by using level WARN
-               logger.warn("main: version '{}' successful start", getImplementationVersion(MethodHandles.lookup().lookupClass()));
+               logger.warn("main: version '{}' successful start",
+                               getImplementationVersion(MethodHandles.lookup().lookupClass()));
        }
 
        /**
index d6063ab..3a2e810 100644 (file)
@@ -21,7 +21,6 @@ package org.oransc.ric.portal.dashboard.config;
 
 import java.lang.invoke.MethodHandles;
 
-import org.oransc.ric.anrxapp.client.api.GnodebsApi;
 import org.oransc.ric.anrxapp.client.api.HealthApi;
 import org.oransc.ric.anrxapp.client.api.NcrtApi;
 import org.oransc.ric.anrxapp.client.invoker.ApiClient;
@@ -65,11 +64,6 @@ public class AnrXappConfiguration {
                return new HealthApi(apiClient());
        }
 
-       @Bean
-       public GnodebsApi anrGnodebsApi() {
-               return new GnodebsApi(apiClient());
-       }
-
        @Bean
        public NcrtApi anrNcrtApi() {
                return new NcrtApi(apiClient());
index bfaad92..578107f 100644 (file)
@@ -29,7 +29,6 @@ import static org.mockito.Mockito.when;
 
 import java.lang.invoke.MethodHandles;
 
-import org.oransc.ric.anrxapp.client.api.GnodebsApi;
 import org.oransc.ric.anrxapp.client.api.HealthApi;
 import org.oransc.ric.anrxapp.client.api.NcrtApi;
 import org.oransc.ric.anrxapp.client.invoker.ApiClient;
@@ -53,7 +52,7 @@ public class AnrXappMockConfiguration {
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
        private final NeighborCellRelationTable ncrt, ncrtNodeB1, ncrtNodeB2;
-       
+
        public AnrXappMockConfiguration() {
                logger.info("Configuring mock ANR xApp client");
                ncrtNodeB1 = new NeighborCellRelationTable();
@@ -95,15 +94,6 @@ public class AnrXappMockConfiguration {
                }).when(mockApi).getHealthReady();
                return mockApi;
        }
-       
-       @Bean
-       public GnodebsApi anrGnodebsMockApi() {
-               ApiClient mockClient = mock(ApiClient.class);
-               when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
-               GnodebsApi mockApi = mock(GnodebsApi.class);
-               
-               return mockApi;
-       }
 
        @Bean
        public NcrtApi ncrtMockApi() {
@@ -111,10 +101,10 @@ public class AnrXappMockConfiguration {
                NcrtApi mockApi = mock(NcrtApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
                // Swagger sends nulls; front end sends empty strings
-               when(mockApi.getNcrtInfo((String) isNull(), (String) isNull(), (String) isNull())).thenReturn(ncrt);
-               when(mockApi.getNcrtInfo(eq(""), any(String.class), any(String.class))).thenReturn(ncrt);
-               when(mockApi.getNcrtInfo(startsWith("A"), any(String.class), any(String.class))).thenReturn(ncrtNodeB1);
-               when(mockApi.getNcrtInfo(startsWith("B"), any(String.class), any(String.class))).thenReturn(ncrtNodeB2);
+               when(mockApi.getNcrt((String) isNull(), (String) isNull(), (String) isNull())).thenReturn(ncrt);
+               when(mockApi.getNcrt(eq(""), any(String.class), any(String.class))).thenReturn(ncrt);
+               when(mockApi.getNcrt(startsWith("A"), any(String.class), any(String.class))).thenReturn(ncrtNodeB1);
+               when(mockApi.getNcrt(startsWith("B"), any(String.class), any(String.class))).thenReturn(ncrtNodeB2);
                doAnswer(i -> {
                        return null;
                }).when(mockApi).deleteNcrt(any(String.class), any(String.class));
index 74d8c55..d6ff9b8 100644 (file)
@@ -66,7 +66,7 @@ public class E2ManagerMockConfiguration {
                doAnswer(i -> {
                        return null;
                }).when(mockApi).healthGet();
-               
+
                return mockApi;
        }
 
index b3cdcbb..7f14cde 100644 (file)
@@ -23,7 +23,6 @@ import java.lang.invoke.MethodHandles;
 
 import javax.servlet.http.HttpServletResponse;
 
-import org.oransc.ric.anrxapp.client.api.GnodebsApi;
 import org.oransc.ric.anrxapp.client.api.HealthApi;
 import org.oransc.ric.anrxapp.client.api.NcrtApi;
 import org.oransc.ric.anrxapp.client.model.GgNodeBTable;
@@ -68,16 +67,13 @@ public class AnrXappController {
 
        // Populated by the autowired constructor
        private final HealthApi healthApi;
-       private final GnodebsApi gnodebsApi;
        private final NcrtApi ncrtApi;
 
        @Autowired
-       public AnrXappController(final HealthApi healthApi, final GnodebsApi gnodebsApi, final NcrtApi ncrtApi) {
+       public AnrXappController(final HealthApi healthApi, final NcrtApi ncrtApi) {
                Assert.notNull(healthApi, "API must not be null");
-               Assert.notNull(gnodebsApi, "API must not be null");
                Assert.notNull(ncrtApi, "API must not be null");
                this.healthApi = healthApi;
-               this.gnodebsApi = gnodebsApi;
                this.ncrtApi = ncrtApi;
        }
 
@@ -107,7 +103,7 @@ public class AnrXappController {
        @ApiOperation(value = "Returns list of gNodeB IDs based on NCRT in ANR", response = GgNodeBTable.class)
        @RequestMapping(value = "/gnodebs", method = RequestMethod.GET)
        public GgNodeBTable getGnodebs() {
-               return gnodebsApi.getgNodeB();
+               return ncrtApi.getgNodeB();
        }
 
        @ApiOperation(value = "Returns neighbor cell relation table for all gNodeBs or based on query parameters", response = NeighborCellRelationTable.class)
@@ -118,7 +114,7 @@ public class AnrXappController {
                        @RequestParam(name = QP_NEIGHBOR, required = false) String neighborCellNrpci) {
                logger.debug("getNcrtInfo: ggnbid {}, servingCellNrpci {} neighborCellNrcgi {}", ggnbId, servingCellNrcgi,
                                neighborCellNrpci);
-               return ncrtApi.getNcrtInfo(ggnbId, servingCellNrcgi, neighborCellNrpci);
+               return ncrtApi.getNcrt(ggnbId, servingCellNrcgi, neighborCellNrpci);
        }
 
        // /ncrt/servingcells/{servCellNrcgi}/neighborcells/{neighCellNrpci} :
index 9509c71..f12c59a 100644 (file)
@@ -54,7 +54,8 @@ public class HealthcheckController {
        @RequestMapping(value = DashboardConstants.VERSION_PATH, method = RequestMethod.GET)
        public SuccessTransport getVersion() {
                logger.debug("getVersion enter");
-               return new SuccessTransport(200, DashboardApplication.getImplementationVersion(MethodHandles.lookup().lookupClass()));
+               return new SuccessTransport(200,
+                               DashboardApplication.getImplementationVersion(MethodHandles.lookup().lookupClass()));
        }
 
 }