From b7c9d29d2b472e63bbe0331a413da0e7cd492aee Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Thu, 20 Jun 2019 07:52:19 -0400 Subject: [PATCH] Upgrade to E2 API with disconnect-all method New API spec dated 20190620 adds method nodebDelete() Change-Id: I1f2d92b56c3cf3c46df09a399046a5846ff64236 Signed-off-by: Lott, Christopher (cl778h) --- docs/release-notes.rst | 6 ++- e2-mgr-client/pom.xml | 4 +- ...9-06-11.yaml => E2_Manager_API_2019-06-20.yaml} | 20 +++++++-- webapp-backend/pom.xml | 51 +++++++++++++++++----- .../config/E2ManagerMockConfiguration.java | 4 ++ .../dashboard/controller/E2ManagerController.java | 11 ++--- .../app/ran-connection/ran-connection.component.ts | 2 +- .../src/app/services/e2-mgr/e2-mgr.service.ts | 8 +++- 8 files changed, 81 insertions(+), 25 deletions(-) rename e2-mgr-client/src/main/resources/{E2_Manager_API_2019-06-11.yaml => E2_Manager_API_2019-06-20.yaml} (98%) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 94c3e86f..7202a322 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -20,21 +20,23 @@ 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 -------------------------- diff --git a/e2-mgr-client/pom.xml b/e2-mgr-client/pom.xml index a3fd0f28..335f3ccb 100644 --- a/e2-mgr-client/pom.xml +++ b/e2-mgr-client/pom.xml @@ -31,7 +31,7 @@ limitations under the License. org.o-ran-sc.ric.e2mgr.client e2-mgr-client RIC E2 Manager client - 20190611-SNAPSHOT + 20190620-SNAPSHOT UTF-8 UTF-8 @@ -104,7 +104,7 @@ limitations under the License. generate - ${project.basedir}/src/main/resources/E2_Manager_API_2019-06-11.yaml + ${project.basedir}/src/main/resources/E2_Manager_API_2019-06-20.yaml java ${client.base.package.name} ${client.base.package.name}.model diff --git a/e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-11.yaml b/e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-20.yaml similarity index 98% rename from e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-11.yaml rename to e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-20.yaml index b6381eb7..76588dc5 100644 --- a/e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-11.yaml +++ b/e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-20.yaml @@ -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: diff --git a/webapp-backend/pom.xml b/webapp-backend/pom.xml index 37a85953..fac2743a 100644 --- a/webapp-backend/pom.xml +++ b/webapp-backend/pom.xml @@ -32,6 +32,8 @@ limitations under the License. 1.8 2.9.2 + + 0 @@ -47,7 +49,7 @@ limitations under the License. org.o-ran-sc.ric.e2mgr.client e2-mgr-client - 20190611-SNAPSHOT + 20190620-SNAPSHOT org.o-ran-sc.ric.xappmgr.client @@ -94,15 +96,6 @@ limitations under the License. - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - org.codehaus.mojo license-maven-plugin @@ -128,6 +121,35 @@ limitations under the License. org.springframework.boot spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + + + 1.8 + 1.8 + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + + true + + + ${project.version}-b${build.number} + + + + maven-resources-plugin @@ -149,6 +171,15 @@ limitations under the License. + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + io.fabric8 diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java index 334915c8..a03b33e5 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java @@ -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)); diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java index ba98aed6..a088af39 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java @@ -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(); } diff --git a/webapp-frontend/src/app/ran-connection/ran-connection.component.ts b/webapp-frontend/src/app/ran-connection/ran-connection.component.ts index 932bca6f..ac77c37f 100644 --- a/webapp-frontend/src/app/ran-connection/ran-connection.component.ts +++ b/webapp-frontend/src/app/ran-connection/ran-connection.component.ts @@ -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!'); diff --git a/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts b/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts index f08facee..75105675 100644 --- a/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts +++ b/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts @@ -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' }); } } -- 2.16.6