Drop e2.mock.rannames feature 03/503/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Thu, 11 Jul 2019 19:52:27 +0000 (15:52 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Thu, 11 Jul 2019 19:52:27 +0000 (15:52 -0400)
This mocked a list of RAN names to support testing in R1.
Remove because the latest e2mgr provides a list of names.

Change-Id: I467c9ec33b53ea524ace97eab4c87c4f0bbbf6b9
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
docs/release-notes.rst
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java
webapp-backend/src/main/resources/application.properties

index c81ca59..bb84273 100644 (file)
 RIC Dashboard Release Notes
 ===========================
 
-Version 1.2.0, 10 July 2019
+Version 1.2.0, 11 July 2019
 ---------------------------
 * Split URL properties into prefix/suffix parts
 * Add jacoco plugin to back-end for code coverage
 * Compile with Java version 11, run with image openjdk:11
 * Clean code of issues reported by Sonar
+* Drop mock RAN names feature that supported R1 testing
 
 Version 1.0.5, 5 July 2019
 --------------------------
index ad75c88..e252398 100644 (file)
@@ -29,7 +29,6 @@ import org.oransc.ric.e2mgr.client.api.HealthCheckApi;
 import org.oransc.ric.e2mgr.client.api.NodebApi;
 import org.oransc.ric.e2mgr.client.model.GetNodebResponse;
 import org.oransc.ric.e2mgr.client.model.NodebIdentity;
-import org.oransc.ric.e2mgr.client.model.NodebIdentityGlobalNbId;
 import org.oransc.ric.e2mgr.client.model.SetupRequest;
 import org.oransc.ric.portal.dashboard.DashboardApplication;
 import org.oransc.ric.portal.dashboard.DashboardConstants;
@@ -38,7 +37,6 @@ import org.oransc.ric.portal.dashboard.model.SuccessTransport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.http.MediaType;
 import org.springframework.util.Assert;
@@ -58,9 +56,6 @@ import io.swagger.annotations.ApiOperation;
  * 502 on failure and wrap the remote details: <blockquote>HTTP server received
  * an invalid response from a server it consulted when acting as a proxy or
  * gateway.</blockquote>
- * 
- * In R1 the E2 interface does not yet implement the get-ID-list method, so this
- * class mocks up some functionality.
  */
 @Configuration
 @RestController
@@ -86,24 +81,12 @@ public class E2ManagerController {
        private final HealthCheckApi e2HealthCheckApi;
        private final NodebApi e2NodebApi;
 
-       // TODO: remove this when E2 delivers the feature
-       private final List<NodebIdentity> mockNodebIdList;
-
        @Autowired
-       public E2ManagerController(final HealthCheckApi e2HealthCheckApi, final NodebApi e2NodebApi,
-                       @Value("${e2mgr.mock.rannames:#{null}}") final String mockRanNames) {
+       public E2ManagerController(final HealthCheckApi e2HealthCheckApi, final NodebApi e2NodebApi) {
                Assert.notNull(e2HealthCheckApi, "API must not be null");
                Assert.notNull(e2NodebApi, "API must not be null");
                this.e2HealthCheckApi = e2HealthCheckApi;
                this.e2NodebApi = e2NodebApi;
-               mockNodebIdList = new ArrayList<>();
-               if (mockRanNames != null) {
-                       logger.debug("ctor: Mocking RAN names: {}", mockRanNames);
-                       for (String id : mockRanNames.split(",")) {
-                               NodebIdentityGlobalNbId globalNbId = new NodebIdentityGlobalNbId().nbId("mockNbId").plmnId("mockPlmId");
-                               mockNodebIdList.add(new NodebIdentity().globalNbId(globalNbId).inventoryName(id.trim()));
-                       }
-               }
        }
 
        @ApiOperation(value = "Gets the E2 manager client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
@@ -125,8 +108,7 @@ public class E2ManagerController {
        @GetMapping(RAN_METHOD)
        public List<RanDetailsTransport> getRanDetails() {
                logger.debug("getRanDetails");
-               // TODO: remove mock when e2mgr delivers the getNodebIdList() method
-               List<NodebIdentity> nodebIdList = mockNodebIdList.isEmpty() ? e2NodebApi.getNodebIdList() : mockNodebIdList;
+               List<NodebIdentity> nodebIdList = e2NodebApi.getNodebIdList();
                List<RanDetailsTransport> details = new ArrayList<>();
                for (NodebIdentity nbid : nodebIdList) {
                        GetNodebResponse nbResp = null;
index db5d5b0..382cd19 100644 (file)
@@ -39,6 +39,3 @@ appmgr.url.suffix = /ric/v1
 # E2 Manager
 e2mgr.url.prefix = http://jar-app-props-default-E2-URL
 e2mgr.url.suffix = /v1
-# Supply CSV to  mock the get-list API for testing e2mgr in R1;
-# missing key or empty value disables the mock behavior
-# e2mgr.mock.rannames = RANONE, RANTWO