<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>
<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>
--- /dev/null
+# ========================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
* 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
<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>
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()));
}
/**
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;
return new HealthApi(apiClient());
}
- @Bean
- public GnodebsApi anrGnodebsApi() {
- return new GnodebsApi(apiClient());
- }
-
@Bean
public NcrtApi anrNcrtApi() {
return new NcrtApi(apiClient());
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;
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();
}).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() {
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));
doAnswer(i -> {
return null;
}).when(mockApi).healthGet();
-
+
return mockApi;
}
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;
// 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;
}
@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)
@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} :
@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()));
}
}