From 8b0c1aa1535896ad557d5d685a031208aa1b6dfb Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Tue, 17 Mar 2020 17:28:38 -0400 Subject: [PATCH] Drop endc/x2 connection setup support Operator cannot request the RIC to connect to a e/gNodeB in the Bronze release. Change-Id: I2bd371ffdc152b3ca18806be44a163f4fae98b0a Issue-ID: OAM-65 Signed-off-by: Lott, Christopher (cl778h) --- .../dashboard/controller/E2ManagerController.java | 29 ----- .../config/E2ManagerMockConfiguration.java | 32 +----- .../controller/E2ManagerControllerTest.java | 41 +------ .../src/app/interfaces/e2-mgr.types.ts | 6 - .../ran-connection-dialog.component.html | 54 --------- .../ran-connection-dialog.component.scss | 29 ----- .../ran-control/ran-connection-dialog.component.ts | 125 --------------------- .../src/app/ran-control/ran-control.component.html | 1 - .../src/app/ran-control/ran-control.component.ts | 22 ---- dashboard/webapp-frontend/src/app/rd.module.ts | 8 +- .../src/app/services/e2-mgr/e2-mgr.service.ts | 20 +--- docs/release-notes.rst | 3 +- 12 files changed, 13 insertions(+), 357 deletions(-) delete mode 100644 dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.html delete mode 100644 dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.scss delete mode 100644 dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java index ea0422eb..349a607a 100644 --- a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java +++ b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java @@ -33,7 +33,6 @@ import org.oransc.ricplt.e2mgr.client.api.NodebApi; import org.oransc.ricplt.e2mgr.client.model.GetNodebResponse; import org.oransc.ricplt.e2mgr.client.model.NodebIdentity; import org.oransc.ricplt.e2mgr.client.model.ResetRequest; -import org.oransc.ricplt.e2mgr.client.model.SetupRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -44,7 +43,6 @@ import org.springframework.security.access.annotation.Secured; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -77,8 +75,6 @@ public class E2ManagerController { public static final String RAN_METHOD = NODEB_PREFIX + "/ran"; public static final String NODEB_SHUTDOWN_METHOD = NODEB_PREFIX + "/shutdown"; public static final String NODEB_LIST_METHOD = NODEB_PREFIX + "/ids"; - public static final String ENDC_SETUP_METHOD = NODEB_PREFIX + "/endc-setup"; - public static final String X2_SETUP_METHOD = NODEB_PREFIX + "/x2-setup"; // Reset uses prefix, adds a path parameter below public static final String RESET_METHOD = "reset"; // Path parameters @@ -157,30 +153,6 @@ public class E2ManagerController { return e2ManagerApiBuilder.getNodebApi(instanceKey).getNb(ranName); } - @ApiOperation(value = "Sets up an EN-DC RAN connection via the E2 manager.") - @PostMapping(DashboardConstants.RIC_INSTANCE_KEY + "/{" + DashboardConstants.RIC_INSTANCE_KEY + "}/" - + ENDC_SETUP_METHOD) - @Secured({ DashboardConstants.ROLE_ADMIN }) - public ResponseEntity endcSetup(@PathVariable(DashboardConstants.RIC_INSTANCE_KEY) String instanceKey, - @RequestBody SetupRequest setupRequest) { - logger.debug("endcSetup instance {} request {}", instanceKey, setupRequest); - NodebApi api = e2ManagerApiBuilder.getNodebApi(instanceKey); - api.endcSetup(setupRequest); - return ResponseEntity.status(api.getApiClient().getStatusCode().value()).body(null); - } - - @ApiOperation(value = "Sets up an X2 RAN connection via the E2 manager.") - @PostMapping(DashboardConstants.RIC_INSTANCE_KEY + "/{" + DashboardConstants.RIC_INSTANCE_KEY + "}/" - + X2_SETUP_METHOD) - @Secured({ DashboardConstants.ROLE_ADMIN }) - public ResponseEntity x2Setup(@PathVariable(DashboardConstants.RIC_INSTANCE_KEY) String instanceKey, - @RequestBody SetupRequest setupRequest) { - logger.debug("x2Setup instance {} request {}", instanceKey, setupRequest); - NodebApi api = e2ManagerApiBuilder.getNodebApi(instanceKey); - api.x2Setup(setupRequest); - return ResponseEntity.status(api.getApiClient().getStatusCode().value()).body(null); - } - @ApiOperation(value = "Close all connections to the RANs and delete the data from the nodeb-rnib DB.") @PutMapping(DashboardConstants.RIC_INSTANCE_KEY + "/{" + DashboardConstants.RIC_INSTANCE_KEY + "}/" + NODEB_SHUTDOWN_METHOD) @@ -191,7 +163,6 @@ public class E2ManagerController { NodebApi api = e2ManagerApiBuilder.getNodebApi(instanceKey); api.nodebShutdownPut(); return ResponseEntity.status(api.getApiClient().getStatusCode().value()).body(null); - } @ApiOperation(value = "Abort any other ongoing procedures over X2 between the RIC and the RAN.") diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java index 812ba203..192f2b0c 100644 --- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java +++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java @@ -37,7 +37,6 @@ import org.oransc.ricplt.e2mgr.client.model.GetNodebResponse; import org.oransc.ricplt.e2mgr.client.model.NodebIdentity; import org.oransc.ricplt.e2mgr.client.model.NodebIdentityGlobalNbId; import org.oransc.ricplt.e2mgr.client.model.ResetRequest; -import org.oransc.ricplt.e2mgr.client.model.SetupRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -104,9 +103,12 @@ public class E2ManagerMockConfiguration { // "nodebStatus":{"connectionStatus":"CONNECTING","enb":null,"failureType":null, // "globalNbId":null,"gnb":null,"ip":"10.2.0.6","nodeType":null,"port":36444, // "ranName":"AAAA123456","setupFailure":null}}] - nodebIdList.add(new NodebIdentity().inventoryName(RAN_NAME_2)); + nodebIdList.add(new NodebIdentity().inventoryName(RAN_NAME_1).globalNbId(globalNbId)); + nodebResponseMap.put(RAN_NAME_1, + new GetNodebResponse().connectionStatus("CONNECTING").ip("127.0.0.1").port(456).ranName(RAN_NAME_2).nodeType("ENDC").port(100)); + nodebIdList.add(new NodebIdentity().inventoryName(RAN_NAME_2).globalNbId(globalNbId)); nodebResponseMap.put(RAN_NAME_2, - new GetNodebResponse().connectionStatus("CONNECTING").ip("127.0.0.2").port(456).ranName(RAN_NAME_2)); + new GetNodebResponse().connectionStatus("CONNECTED").ip("127.0.0.2").port(456).ranName(RAN_NAME_2).nodeType("X2").port(200)); ApiClient apiClient = apiClient(); NodebApi mockApi = mock(NodebApi.class); @@ -141,30 +143,6 @@ public class E2ManagerMockConfiguration { } return nodebIdList; }).when(mockApi).getNodebIdList(); - doAnswer(inv -> { - if (delayMs > 0) { - logger.debug("endcSetup sleeping {}", delayMs); - Thread.sleep(delayMs); - } - SetupRequest sr = inv.getArgument(0); - nodebIdList.add(new NodebIdentity().inventoryName(sr.getRanName()).globalNbId(globalNbId)); - nodebResponseMap.put(sr.getRanName(), - new GetNodebResponse().connectionStatus("mockConnectionStatus").failureType("mockFailureType") - .ip(sr.getRanIp()).nodeType("ENDC").port(sr.getRanPort()).ranName(sr.getRanName())); - return null; - }).when(mockApi).endcSetup(any(SetupRequest.class)); - doAnswer(inv -> { - if (delayMs > 0) { - logger.debug("x2Setup sleeping {}", delayMs); - Thread.sleep(delayMs); - } - SetupRequest sr = inv.getArgument(0); - nodebIdList.add(new NodebIdentity().inventoryName(sr.getRanName()).globalNbId(globalNbId)); - nodebResponseMap.put(sr.getRanName(), - new GetNodebResponse().connectionStatus("mockConnectionStatus").failureType("mockFailureType") - .ip(sr.getRanIp()).nodeType("X2").port(sr.getRanPort()).ranName(sr.getRanName())); - return null; - }).when(mockApi).x2Setup(any(SetupRequest.class)); return mockApi; } diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/E2ManagerControllerTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/E2ManagerControllerTest.java index 96ff35e3..28de9da3 100644 --- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/E2ManagerControllerTest.java +++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/E2ManagerControllerTest.java @@ -23,6 +23,7 @@ import java.lang.invoke.MethodHandles; import java.net.URI; import java.util.List; +import org.junit.After; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.oransc.ric.portal.dashboard.DashboardConstants; @@ -33,7 +34,6 @@ import org.oransc.ric.portal.dashboard.model.SuccessTransport; import org.oransc.ricplt.e2mgr.client.model.GetNodebResponse; import org.oransc.ricplt.e2mgr.client.model.NodebIdentity; import org.oransc.ricplt.e2mgr.client.model.ResetRequest; -import org.oransc.ricplt.e2mgr.client.model.SetupRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.ParameterizedTypeReference; @@ -45,15 +45,6 @@ public class E2ManagerControllerTest extends AbstractControllerTest { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private ResponseEntity endcSetup() { - URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY, - RICInstanceMockConfiguration.INSTANCE_KEY_1, E2ManagerController.ENDC_SETUP_METHOD); - logger.info("Invoking {}", uri); - SetupRequest setup = new SetupRequest().ranName(E2ManagerMockConfiguration.RAN_NAME_1); - HttpEntity entity = new HttpEntity<>(setup); - return testRestTemplateAdminRole().exchange(uri, HttpMethod.POST, entity, Void.class); - } - private ResponseEntity reset() { URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY, RICInstanceMockConfiguration.INSTANCE_KEY_1, E2ManagerController.NODEB_PREFIX, "ignored", @@ -64,13 +55,6 @@ public class E2ManagerControllerTest extends AbstractControllerTest { return testRestTemplateAdminRole().exchange(uri, HttpMethod.PUT, entity, Void.class); } - @Test - public void endcSetupTest() { - ResponseEntity voidResponse = endcSetup(); - Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful()); - reset(); - } - @Test public void resetTest() { ResponseEntity voidResponse = reset(); @@ -97,7 +81,6 @@ public class E2ManagerControllerTest extends AbstractControllerTest { @Test public void ranDetailsTest() { - endcSetup(); URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY, RICInstanceMockConfiguration.INSTANCE_KEY_1, E2ManagerController.RAN_METHOD); logger.info("Invoking {}", uri); @@ -105,12 +88,10 @@ public class E2ManagerControllerTest extends AbstractControllerTest { HttpMethod.GET, null, new ParameterizedTypeReference>() { }); Assertions.assertFalse(response.getBody().isEmpty()); - reset(); } @Test public void nodebListTest() { - endcSetup(); URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY, RICInstanceMockConfiguration.INSTANCE_KEY_1, E2ManagerController.NODEB_LIST_METHOD); logger.info("Invoking {}", uri); @@ -118,36 +99,20 @@ public class E2ManagerControllerTest extends AbstractControllerTest { null, new ParameterizedTypeReference>() { }); Assertions.assertFalse(response.getBody().isEmpty()); - reset(); } @Test public void nodebStatusTest() { - endcSetup(); URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY, RICInstanceMockConfiguration.INSTANCE_KEY_1, E2ManagerController.NODEB_PREFIX, E2ManagerMockConfiguration.RAN_NAME_1); logger.info("Invoking {}", uri); GetNodebResponse response = testRestTemplateStandardRole().getForObject(uri, GetNodebResponse.class); Assertions.assertNotNull(response.getRanName()); - reset(); } - @Test - public void x2SetupTest() { - URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY, - RICInstanceMockConfiguration.INSTANCE_KEY_1, E2ManagerController.X2_SETUP_METHOD); - logger.info("Invoking {}", uri); - SetupRequest setup = new SetupRequest().ranName(E2ManagerMockConfiguration.RAN_NAME_1); - HttpEntity entity = new HttpEntity<>(setup); - ResponseEntity voidResponse = testRestTemplateAdminRole().exchange(uri, HttpMethod.POST, entity, - Void.class); - Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful()); - reset(); - } - - // Aka big--button test - @Test + // Aka big--button test, run this last + @After public void nodebShutdownPutTest() { URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY, RICInstanceMockConfiguration.INSTANCE_KEY_1, E2ManagerController.NODEB_SHUTDOWN_METHOD); diff --git a/dashboard/webapp-frontend/src/app/interfaces/e2-mgr.types.ts b/dashboard/webapp-frontend/src/app/interfaces/e2-mgr.types.ts index f303c14e..5d5bfdbb 100644 --- a/dashboard/webapp-frontend/src/app/interfaces/e2-mgr.types.ts +++ b/dashboard/webapp-frontend/src/app/interfaces/e2-mgr.types.ts @@ -20,12 +20,6 @@ // Models of data used by the E2 Manager -export interface E2SetupRequest { - ranName: string; - ranIp: string; - ranPort: string; -} - export interface E2ErrorResponse { errorCode: string; errorMessage: string; diff --git a/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.html b/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.html deleted file mode 100644 index 0642baab..00000000 --- a/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.html +++ /dev/null @@ -1,54 +0,0 @@ - - -
- Setup RAN Connection -
-
-
-
- - - EN-DC - X2 - -
- - - Example: ABCD123456 - Name is required - Valid name is required - - - - IP is required - Valid IP is required - - - - Port is required - Valid port number is required - -
- -
diff --git a/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.scss b/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.scss deleted file mode 100644 index 484ceb91..00000000 --- a/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.scss +++ /dev/null @@ -1,29 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * O-RAN-SC - * %% - * Copyright (C) 2019 AT&T Intellectual Property - * %% - * 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=================================== - */ - - /* used to place form fields on separate lines/rows in dialog */ -.input-display-block { - display: block; -} - -/* leave a bit of space */ -.ran-type-radio-button { - margin-left: 5px; -} diff --git a/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts b/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts deleted file mode 100644 index 58120b07..00000000 --- a/dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts +++ /dev/null @@ -1,125 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * O-RAN-SC - * %% - * Copyright (C) 2019 AT&T Intellectual Property - * %% - * 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=================================== - */ -import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; -import { Component, Inject, OnInit } from '@angular/core'; -import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { Observable } from 'rxjs'; -import { finalize } from 'rxjs/operators'; -import { E2SetupRequest, RanDialogFormData } from '../interfaces/e2-mgr.types'; -import { E2ManagerService } from '../services/e2-mgr/e2-mgr.service'; -import { ErrorDialogService } from '../services/ui/error-dialog.service'; -import { LoadingDialogService } from '../services/ui/loading-dialog.service'; -import { NotificationService } from '../services/ui/notification.service'; - -@Component({ - selector: 'rd-ran-control-connect-dialog', - templateUrl: './ran-connection-dialog.component.html', - styleUrls: ['./ran-connection-dialog.component.scss'] -}) - -export class RanControlConnectDialogComponent implements OnInit { - - public ranDialogForm: FormGroup; - public processing = false; - - constructor( - private dialogRef: MatDialogRef, - private service: E2ManagerService, - private errorService: ErrorDialogService, - private loadingDialogService: LoadingDialogService, - private notifService: NotificationService, - @Inject(MAT_DIALOG_DATA) private data) { - // opens with empty fields; accepts no data to display - } - - ngOnInit() { - const namePattern = /^([A-Z0-9])+$/; - // tslint:disable-next-line:max-line-length - const ipPattern = /((((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?$))/; - const portPattern = /^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/; - this.ranDialogForm = new FormGroup({ - ranType: new FormControl('endc'), - ranName: new FormControl('', [Validators.required, Validators.pattern(namePattern)]), - ranIp: new FormControl('', [Validators.required, Validators.pattern(ipPattern)]), - ranPort: new FormControl('', [Validators.required, Validators.pattern(portPattern)]) - }); - } - - onCancel() { - this.dialogRef.close(false); - } - - setupConnection = (ranFormValue: RanDialogFormData) => { - if (!this.ranDialogForm.valid) { - // should never happen - return; - } - this.processing = true; - const setupRequest: E2SetupRequest = { - ranName: ranFormValue.ranName.trim(), - ranIp: ranFormValue.ranIp.trim(), - ranPort: ranFormValue.ranPort.trim() - }; - this.loadingDialogService.startLoading('Setting up connection'); - let observable: Observable>; - if (ranFormValue.ranType === 'endc') { - observable = this.service.endcSetup(this.data.instanceKey, setupRequest); - } else { - observable = this.service.x2Setup(this.data.instanceKey, setupRequest); - } - observable - .pipe( - finalize(() => this.loadingDialogService.stopLoading()) - ) - .subscribe( - (response: any) => { - this.processing = false; - this.notifService.success('Connect request sent!'); - this.dialogRef.close(true); - }, - ((her: HttpErrorResponse) => { - this.processing = false; - // the error field carries the server's response - let msg = her.message; - if (her.error && her.error.message) { - msg = her.error.message; - } - this.errorService.displayError('Connect request failed: ' + msg); - // keep the dialog open - }) - ); - } - - hasError(controlName: string, errorName: string) { - if (this.ranDialogForm.controls[controlName].hasError(errorName)) { - return true; - } - return false; - } - - validateControl(controlName: string) { - if (this.ranDialogForm.controls[controlName].invalid && this.ranDialogForm.controls[controlName].touched) { - return true; - } - return false; - } - -} diff --git a/dashboard/webapp-frontend/src/app/ran-control/ran-control.component.html b/dashboard/webapp-frontend/src/app/ran-control/ran-control.component.html index 01dd2929..35ba4f59 100644 --- a/dashboard/webapp-frontend/src/app/ran-control/ran-control.component.html +++ b/dashboard/webapp-frontend/src/app/ran-control/ran-control.component.html @@ -21,7 +21,6 @@

RAN Connections

- diff --git a/dashboard/webapp-frontend/src/app/ran-control/ran-control.component.ts b/dashboard/webapp-frontend/src/app/ran-control/ran-control.component.ts index ac995f07..ed7da9f5 100644 --- a/dashboard/webapp-frontend/src/app/ran-control/ran-control.component.ts +++ b/dashboard/webapp-frontend/src/app/ran-control/ran-control.component.ts @@ -30,7 +30,6 @@ import { ErrorDialogService } from '../services/ui/error-dialog.service'; import { LoadingDialogService } from '../services/ui/loading-dialog.service'; import { NotificationService } from '../services/ui/notification.service'; import { UiService } from '../services/ui/ui.service'; -import { RanControlConnectDialogComponent } from './ran-connection-dialog.component'; import { RANControlDataSource } from './ran-control.datasource'; @Component({ @@ -75,27 +74,6 @@ export class RanControlComponent implements OnInit, OnDestroy { this.instanceChange.unsubscribe(); } - setupRANConnection() { - if (this.darkMode) { - this.panelClass = 'dark-theme'; - } else { - this.panelClass = ''; - } - const dialogRef = this.dialog.open(RanControlConnectDialogComponent, { - panelClass: this.panelClass, - width: '450px', - data: { - instanceKey: this.instanceKey - } - }); - dialogRef.afterClosed() - .subscribe((result: boolean) => { - if (result) { - this.dataSource.loadTable(this.instanceKey); - } - }); - } - disconnectAllRANConnections() { const aboutError = 'Disconnect all RAN Connections Failed: '; this.confirmDialogService.openConfirmDialog('Are you sure you want to disconnect all RAN connections?') diff --git a/dashboard/webapp-frontend/src/app/rd.module.ts b/dashboard/webapp-frontend/src/app/rd.module.ts index 67fc9717..bae27212 100644 --- a/dashboard/webapp-frontend/src/app/rd.module.ts +++ b/dashboard/webapp-frontend/src/app/rd.module.ts @@ -70,7 +70,6 @@ import { InstanceSelectorDialogComponent } from './ui/instance-selector-dialog/i import { LoadingDialogComponent } from './ui/loading-dialog/loading-dialog.component'; import { MainComponent } from './main/main.component'; import { PlatformComponent } from './platform/platform.component'; -import { RanControlConnectDialogComponent } from './ran-control/ran-connection-dialog.component'; import { RanControlComponent } from './ran-control/ran-control.component'; import { RdRoutingModule } from './rd-routing.module'; import { RdComponent } from './rd.component'; @@ -107,7 +106,6 @@ import { UiService } from './services/ui/ui.service'; MainComponent, PlatformComponent, RanControlComponent, - RanControlConnectDialogComponent, RdComponent, SidenavListComponent, StatCardComponent, @@ -167,8 +165,7 @@ import { UiService } from './services/ui/ui.service'; MatSidenavModule, MatSliderModule, MatSlideToggleModule, - MatTabsModule, - RanControlConnectDialogComponent + MatTabsModule ], entryComponents: [ AddDashboardUserDialogComponent, @@ -177,8 +174,7 @@ import { UiService } from './services/ui/ui.service'; EditDashboardUserDialogComponent, ErrorDialogComponent, InstanceSelectorDialogComponent, - LoadingDialogComponent, - RanControlConnectDialogComponent + LoadingDialogComponent ], providers: [ AppMgrService, diff --git a/dashboard/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts b/dashboard/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts index 45d7b584..3d06f0df 100644 --- a/dashboard/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts +++ b/dashboard/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts @@ -22,7 +22,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { DashboardSuccessTransport } from '../../interfaces/dashboard.types'; -import { E2RanDetails, E2SetupRequest } from '../../interfaces/e2-mgr.types'; +import { E2RanDetails } from '../../interfaces/e2-mgr.types'; import { DashboardService } from '../dashboard/dashboard.service'; @Injectable({ @@ -60,24 +60,6 @@ export class E2ManagerService { return this.httpClient.get>(path); } - /** - * Sends a request to setup an ENDC/gNodeB connection - * @returns Observable. On success there is no data, only a code. - */ - endcSetup(instanceKey: string, req: E2SetupRequest): Observable> { - const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.nodebPath, 'endc-setup'); - return this.httpClient.post(path, req, { observe: 'response' }); - } - - /** - * Sends a request to setup an X2/eNodeB connection - * @returns Observable. On success there is no data, only a code. - */ - x2Setup(instanceKey: string, req: E2SetupRequest): Observable> { - const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.nodebPath, 'x2-setup'); - return this.httpClient.post(path, req, { observe: 'response' }); - } - /** * Sends a request to drop all RAN connections * @returns Observable with body. diff --git a/docs/release-notes.rst b/docs/release-notes.rst index c9ff9c84..64683541 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,11 +5,12 @@ RIC Dashboard Release Notes =========================== -Version 2.0.1, 09 Mar 2020 +Version 2.0.1, 17 Mar 2020 -------------------------- * Revise controllers to use ResponseEntity * Drop AC xApp control/config screen from front-end * Drop A1 Mediator controller and tests from back-end +* Drop ENDC and X2 setup requests to E2 Manager * Upgrade to Spring-Boot 2.2.4.RELEASE * Set the first instance as the default one -- 2.16.6