* Extend ANR mock feature to persist edits for demos
* Block whitespace in E2 IP input field validation
* Relax validation in E2 RAN name field validation
+* Make RAN connection table robust to missing fields
Version 1.2.0, 11 Sep 2019
--------------------------
public List<RanDetailsTransport> getRanDetails() {
logger.debug("getRanDetails");
List<NodebIdentity> nodebIdList = e2NodebApi.getNodebIdList();
+ logger.debug("getRanDetails: nodebIdList {}", nodebIdList);
List<RanDetailsTransport> details = new ArrayList<>();
for (NodebIdentity nbid : nodebIdList) {
GetNodebResponse nbResp = null;
@Value("${mock.config.delay:0}")
private int delayMs;
- public static final String MOCK_RAN_NAME = "Mock RAN";
+ public static final String RAN_NAME_1 = "Connected RAN";
+ public static final String RAN_NAME_2 = "Unknown RAN";
private final List<NodebIdentity> nodebIdList;
private final Map<String, GetNodebResponse> nodebResponseMap;
globalNbId = new NodebIdentityGlobalNbId().nbId("mockNbId").plmnId("mockPlmId");
nodebIdList = new ArrayList<>();
nodebResponseMap = new HashMap<>();
- nodebIdList.add(new NodebIdentity().inventoryName(MOCK_RAN_NAME).globalNbId(globalNbId));
- nodebResponseMap.put(MOCK_RAN_NAME,
- new GetNodebResponse().connectionStatus("mockConnectionStatus").failureType("mockFailureType")
- .ip("127.0.0.1").nodeType("mockNodeType").port(123).ranName(MOCK_RAN_NAME));
+ // Complete entry
+ nodebIdList.add(new NodebIdentity().inventoryName(RAN_NAME_1).globalNbId(globalNbId));
+ nodebResponseMap.put(RAN_NAME_1, new GetNodebResponse().connectionStatus("CONNECTED").failureType("")
+ .ip("127.0.0.1").nodeType("mockNodeType").port(123).ranName(RAN_NAME_1));
+ // Partial entry
+ // [{"nodebIdentity":{"globalNbId":null,"inventoryName":"AAAA123456"},
+ // "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));
+ nodebResponseMap.put(RAN_NAME_2,
+ new GetNodebResponse().connectionStatus("CONNECTING").ip("127.0.0.2").port(456).ranName(RAN_NAME_2));
}
private ApiClient apiClient() {
private ResponseEntity<Void> endcSetup() {
URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, E2ManagerController.ENDC_SETUP_METHOD);
logger.info("Invoking {}", uri);
- SetupRequest setup = new SetupRequest().ranName(E2ManagerMockConfiguration.MOCK_RAN_NAME);
+ SetupRequest setup = new SetupRequest().ranName(E2ManagerMockConfiguration.RAN_NAME_1);
HttpEntity<SetupRequest> entity = new HttpEntity<>(setup);
return testRestTemplateAdminRole().exchange(uri, HttpMethod.POST, entity, Void.class);
}
public void nodebStatusTest() {
endcSetup();
URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, E2ManagerController.NODEB_SHUTDOWN_METHOD,
- E2ManagerMockConfiguration.MOCK_RAN_NAME);
+ E2ManagerMockConfiguration.RAN_NAME_1);
logger.info("Invoking {}", uri);
GetNodebResponse response = testRestTemplateStandardRole().getForObject(uri, GetNodebResponse.class);
Assertions.assertNotNull(response.getRanName());
public void x2SetupTest() {
URI uri = buildUri(null, E2ManagerController.CONTROLLER_PATH, E2ManagerController.X2_SETUP_METHOD);
logger.info("Invoking {}", uri);
- SetupRequest setup = new SetupRequest().ranName(E2ManagerMockConfiguration.MOCK_RAN_NAME);
+ 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);
<table mat-table class="ran-control-table mat-elevation-z8" [dataSource]="dataSource">
+ <ng-template #noValue></ng-template>
+
<ng-container matColumnDef="nbId">
<mat-header-cell *matHeaderCellDef>Nodeb ID</mat-header-cell>
- <mat-cell *matCellDef="let ran">{{ran.nodebIdentity.globalNbId.nbId}}</mat-cell>
+ <mat-cell *matCellDef="let ran">
+ <div *ngIf="ran.nodebIdentity.globalNbId; else noValue">{{ran.nodebIdentity.globalNbId.nbId}}</div>
+ </mat-cell>
</ng-container>
<ng-container matColumnDef="nodeType">
<mat-header-cell *matHeaderCellDef>Node Type</mat-header-cell>
- <mat-cell *matCellDef="let ran">{{ran.nodebStatus.nodeType}}</mat-cell>
+ <mat-cell *matCellDef="let ran">
+ <div *ngIf="ran.nodebStatus; else noValue">{{ran.nodebStatus.nodeType}}</div>
+ </mat-cell>
</ng-container>
<ng-container matColumnDef="ranName">
<mat-header-cell *matHeaderCellDef>RAN Name</mat-header-cell>
- <mat-cell *matCellDef="let ran">{{ran.nodebIdentity.inventoryName}}</mat-cell>
+ <mat-cell *matCellDef="let ran">
+ <div *ngIf="ran.nodebIdentity; else noValue">{{ran.nodebIdentity.inventoryName}}</div>
+ </mat-cell>
</ng-container>
<ng-container matColumnDef="ranIp">
<mat-header-cell *matHeaderCellDef>IP</mat-header-cell>
- <mat-cell *matCellDef="let ran">{{ran.nodebStatus.ip}}</mat-cell>
+ <mat-cell *matCellDef="let ran">
+ <div *ngIf="ran.nodebStatus; else noValue">{{ran.nodebStatus.ip}}</div>
+ </mat-cell>
</ng-container>
<ng-container matColumnDef="ranPort">
<mat-header-cell *matHeaderCellDef>Port</mat-header-cell>
- <mat-cell *matCellDef="let ran">{{ran.nodebStatus.port}}</mat-cell>
+ <mat-cell *matCellDef="let ran">
+ <div *ngIf="ran.nodebStatus; else noValue">{{ran.nodebStatus.port}}</div>
+ </mat-cell>
</ng-container>
<ng-container matColumnDef="connectionStatus">
<mat-header-cell *matHeaderCellDef>Connection Status</mat-header-cell>
- <mat-cell *matCellDef="let ran">{{ran.nodebStatus.connectionStatus}}</mat-cell>
+ <mat-cell *matCellDef="let ran">
+ <div *ngIf="ran.nodebStatus; else noValue">{{ran.nodebStatus.connectionStatus}}</div>
+ </mat-cell>
</ng-container>
<ng-container matColumnDef="noRecordsFound">
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
- <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': dataSource.rowCount > 0}"></mat-footer-row>
+ <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': dataSource.rowCount > 0}">
+ </mat-footer-row>
</table>
<mat-spinner diameter=50></mat-spinner>
</div>
-</div>
+</div>
\ No newline at end of file