Drop endc/x2 connection setup support 35/2835/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Tue, 17 Mar 2020 21:28:38 +0000 (17:28 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Tue, 17 Mar 2020 21:29:05 +0000 (17:29 -0400)
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) <cl778h@att.com>
12 files changed:
dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java
dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java
dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/E2ManagerControllerTest.java
dashboard/webapp-frontend/src/app/interfaces/e2-mgr.types.ts
dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.html [deleted file]
dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.scss [deleted file]
dashboard/webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts [deleted file]
dashboard/webapp-frontend/src/app/ran-control/ran-control.component.html
dashboard/webapp-frontend/src/app/ran-control/ran-control.component.ts
dashboard/webapp-frontend/src/app/rd.module.ts
dashboard/webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts
docs/release-notes.rst

index ea0422e..349a607 100644 (file)
@@ -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<String> 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<String> 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.")
index 812ba20..192f2b0 100644 (file)
@@ -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.<SetupRequest>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.<SetupRequest>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;
        }
 
index 96ff35e..28de9da 100644 (file)
@@ -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<Void> 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<SetupRequest> entity = new HttpEntity<>(setup);
-               return testRestTemplateAdminRole().exchange(uri, HttpMethod.POST, entity, Void.class);
-       }
-
        private ResponseEntity<Void> 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<Void> voidResponse = endcSetup();
-               Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful());
-               reset();
-       }
-
        @Test
        public void resetTest() {
                ResponseEntity<Void> 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<List<RanDetailsTransport>>() {
                                });
                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<List<NodebIdentity>>() {
                                });
                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<SetupRequest> entity = new HttpEntity<>(setup);
-               ResponseEntity<Void> 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);
index f303c14..5d5bfdb 100644 (file)
 
 // 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 (file)
index 0642baa..0000000
+++ /dev/null
@@ -1,54 +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===================================
-  -->
-
-<div mat-dialog-title>
-    Setup RAN Connection
-</div>
-<form [formGroup]="ranDialogForm" novalidate autocomplete="off" (ngSubmit)="setupConnection(ranDialogForm.value)">
-  <div mat-dialog-content>
-    <div name="rantype">
-      <label id="request-type-radio-group-label">RAN type:</label>
-      <mat-radio-group aria-label="RAN Type" formControlName="ranType">
-        <mat-radio-button class="ran-type-radio-button" value="endc">EN-DC</mat-radio-button>
-        <mat-radio-button class="ran-type-radio-button" value="x2">X2</mat-radio-button>
-      </mat-radio-group>
-    </div>
-    <mat-form-field class="input-display-block">
-      <input matInput type="text" placeholder="RAN Name" formControlName="ranName">
-      <mat-hint align="end">Example: ABCD123456</mat-hint>
-      <mat-error *ngIf="validateControl('ranName') && hasError('ranName', 'required')">Name is required</mat-error>
-      <mat-error *ngIf="hasError('ranName', 'length')">Valid name is required</mat-error>
-    </mat-form-field>
-    <mat-form-field class="input-display-block">
-      <input matInput type="text" placeholder="IP" formControlName="ranIp">
-      <mat-error *ngIf="validateControl('ranIp') && hasError('ranIp', 'required')">IP is required</mat-error>
-      <mat-error *ngIf="hasError('ranIp', 'pattern')">Valid IP is required</mat-error>
-    </mat-form-field>
-    <mat-form-field class="input-display-block">
-      <input matInput type="text" placeholder="Port" formControlName="ranPort">
-      <mat-error *ngIf="validateControl('ranPort') && hasError('ranPort', 'required')">Port is required</mat-error>
-      <mat-error *ngIf="hasError('ranPort', 'pattern')">Valid port number is required</mat-error>
-    </mat-form-field>
-  </div>
-  <div mat-dialog-actions class="modal-footer justify-content-center">
-    <button class="mat-raised-button" (click)="onCancel()">Cancel</button>
-    <button class="mat-raised-button mat-primary" [disabled]="!ranDialogForm.valid || processing">Connect</button>
-  </div>
-</form>
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 (file)
index 484ceb9..0000000
+++ /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 (file)
index 58120b0..0000000
+++ /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<RanControlConnectDialogComponent>,
-    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<HttpResponse<Object>>;
-    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;
-  }
-
-}
index 01dd292..35ba4f5 100644 (file)
@@ -21,7 +21,6 @@
 <div class="ran-control__section">
   <h3 class="rd-global-page-title">RAN Connections</h3>
 
-  <button mat-raised-button (click)="setupRANConnection()">Setup Connection..</button>
   <button mat-raised-button color="warn" class="disconnect-all-button"
     (click)="disconnectAllRANConnections()">Disconnect All</button>
 
index ac995f0..ed7da9f 100644 (file)
@@ -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?')
index 67fc971..bae2721 100644 (file)
@@ -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,
index 45d7b58..3d06f0d 100644 (file)
@@ -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<Array<E2RanDetails>>(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<HttpResponse<Object>> {
-    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<HttpResponse<Object>> {
-    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.
index c9ff9c8..6468354 100644 (file)
@@ -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