remove ANR xapp 47/1647/4
authorNicolas Hu <jh245g@att.com>
Mon, 18 Nov 2019 17:59:47 +0000 (12:59 -0500)
committerNicolas Hu <jh245g@att.com>
Mon, 18 Nov 2019 18:56:08 +0000 (13:56 -0500)
Change-Id: Ia35c87dfee93d92cbdadb236d6070085eaac8d1d
Signed-off-by: Jun (Nicolas) Hu <jh245g@att.com>
29 files changed:
anr-xapp-client/.gitignore [deleted file]
anr-xapp-client/README.md [deleted file]
anr-xapp-client/pom.xml [deleted file]
anr-xapp-client/src/main/resources/anr_swagger_0.0.8.yaml [deleted file]
anr-xapp-client/src/test/java/org/oransc/ric/portal/dashboard/anrxapp/client/test/AnrXappClientTest.java [deleted file]
docs/release-notes.rst
pom.xml
webapp-backend/pom.xml
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappConfiguration.java [deleted file]
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/WebSecurityConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java [deleted file]
webapp-backend/src/main/resources/application.properties
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java [deleted file]
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AppManagerMockConfiguration.java
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AnrXappControllerTest.java [deleted file]
webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.html [deleted file]
webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.scss [deleted file]
webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.ts [deleted file]
webapp-frontend/src/app/anr-xapp/anr-xapp.component.html [deleted file]
webapp-frontend/src/app/anr-xapp/anr-xapp.component.scss [deleted file]
webapp-frontend/src/app/anr-xapp/anr-xapp.component.spec.ts [deleted file]
webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts [deleted file]
webapp-frontend/src/app/anr-xapp/anr-xapp.datasource.ts [deleted file]
webapp-frontend/src/app/app-control/app-control.component.ts
webapp-frontend/src/app/rd-routing.module.ts
webapp-frontend/src/app/rd.module.ts
webapp-frontend/src/app/services/anr-xapp/anr-xapp.service.spec.ts [deleted file]
webapp-frontend/src/app/services/anr-xapp/anr-xapp.service.ts [deleted file]
webapp-frontend/src/app/ui/catalog-card/catalog-card.component.html

diff --git a/anr-xapp-client/.gitignore b/anr-xapp-client/.gitignore
deleted file mode 100644 (file)
index 10d81e8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/.classpath
-/.project
-/.settings/
-/target/
diff --git a/anr-xapp-client/README.md b/anr-xapp-client/README.md
deleted file mode 100644 (file)
index 658849a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# ANR xApp Client Generator
-
-This projects generates a REST client library from the Swagger specification
-file stored here and packages it in a jar.
-
-## Eclipse and STS Users
-
-The Swagger Codegen maven plugin is not supported in Eclipse/STS. You can
-limp along by taking these steps:
-
-1. Generate the code using maven:
-    mvn install
-2. Add this folder to the project build path:
-    target/generated-sources/swagger/src/main/java
-
-## License
-
-Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
-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.
diff --git a/anr-xapp-client/pom.xml b/anr-xapp-client/pom.xml
deleted file mode 100644 (file)
index 5d6eced..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--<![CDATA[
-========================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===================================
-]]>-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
-               <artifactId>ric-dash-parent</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
-       </parent>
-       <!-- This groupId will NOT allow deployment in LF -->
-       <groupId>org.o-ran-sc.ric.xapp.anr.client</groupId>
-       <artifactId>anr-xapp-client</artifactId>
-       <name>RIC ANR xApp client</name>
-       <version>0.0.8-SNAPSHOT</version>
-       <properties>
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <!-- Jenkins invokes maven with -Dbuild.number=.. -->
-               <build.number>0</build.number>
-               <!-- same as groupId BUT without hyphens -->
-               <client.base.package.name>org.oransc.ric.anrxapp.client</client.base.package.name>
-       </properties>
-       <!-- Successful compilation requires generated code dependencies -->
-       <dependencies>
-               <!-- Required for Java 9 and later -->
-               <dependency>
-                       <groupId>javax.annotation</groupId>
-                       <artifactId>javax.annotation-api</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>io.swagger</groupId>
-                       <artifactId>swagger-annotations</artifactId>
-                       <version>1.5.15</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.springframework</groupId>
-                       <artifactId>spring-context</artifactId>
-               </dependency>
-               <!-- HTTP client: Spring RestTemplate -->
-               <dependency>
-                       <groupId>org.springframework</groupId>
-                       <artifactId>spring-web</artifactId>
-               </dependency>
-               <!-- JSON processing: jackson -->
-               <dependency>
-                       <groupId>com.fasterxml.jackson.core</groupId>
-                       <artifactId>jackson-core</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.fasterxml.jackson.core</groupId>
-                       <artifactId>jackson-annotations</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.fasterxml.jackson.core</groupId>
-                       <artifactId>jackson-databind</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.fasterxml.jackson.jaxrs</groupId>
-                       <artifactId>jackson-jaxrs-json-provider</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.fasterxml.jackson.datatype</groupId>
-                       <artifactId>jackson-datatype-jsr310</artifactId>
-               </dependency>
-               <!-- test dependencies -->
-               <dependency>
-                       <groupId>org.junit.jupiter</groupId>
-                       <artifactId>junit-jupiter-api</artifactId>
-                       <scope>test</scope>
-               </dependency>
-       </dependencies>
-       <build>
-               <plugins>
-                       <plugin>
-                               <!-- This version works fine on Swagger 2.0 -->
-                               <groupId>io.swagger</groupId>
-                               <artifactId>swagger-codegen-maven-plugin</artifactId>
-                               <version>2.4.5</version>
-                               <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>generate</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <inputSpec>${project.basedir}/src/main/resources/anr_swagger_0.0.8.yaml</inputSpec>
-                                                       <language>java</language>
-                                                       <configOptions>
-                                                               <groupId>${project.groupId}</groupId>
-                                                               <artifactId>${project.artifactId}</artifactId>
-                                                               <artifactVersion>${project.version}</artifactVersion>
-                                                               <library>resttemplate</library>
-                                                               <java8>true</java8>
-                                                               <dateLibrary>java8</dateLibrary>
-                                                               <licenseName>Apache 2.0</licenseName>
-                                                               <licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
-                                                       </configOptions>
-                                                       <packageName>${client.base.package.name}</packageName>
-                                                       <modelPackage>${client.base.package.name}.model</modelPackage>
-                                                       <apiPackage>${client.base.package.name}.api</apiPackage>
-                                                       <invokerPackage>${client.base.package.name}.invoker</invokerPackage>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <!-- add build information to manifest. Java provides access to the implementation 
-                               version for a package, so cram the build number into there. -->
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-jar-plugin</artifactId>
-                               <configuration>
-                                       <archive>
-                                               <manifest>
-                                                       <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                               </manifest>
-                                               <manifestEntries>
-                                                       <Implementation-Version>${project.version}-b${build.number}</Implementation-Version>
-                                               </manifestEntries>
-                                       </archive>
-                               </configuration>
-                       </plugin>
-               </plugins>
-               <pluginManagement>
-                       <plugins>
-                               <!--This plugin's configuration is used to store Eclipse m2e settings 
-                                       only. It has no influence on the Maven build itself. -->
-                               <plugin>
-                                       <groupId>org.eclipse.m2e</groupId>
-                                       <artifactId>lifecycle-mapping</artifactId>
-                                       <version>1.0.0</version>
-                                       <configuration>
-                                               <lifecycleMappingMetadata>
-                                                       <pluginExecutions>
-                                                               <pluginExecution>
-                                                                       <pluginExecutionFilter>
-                                                                               <groupId>io.swagger</groupId>
-                                                                               <artifactId>swagger-codegen-maven-plugin</artifactId>
-                                                                               <versionRange>[1.0,)</versionRange>
-                                                                               <goals>
-                                                                                       <goal>generate</goal>
-                                                                               </goals>
-                                                                       </pluginExecutionFilter>
-                                                                       <action>
-                                                                               <ignore />
-                                                                       </action>
-                                                               </pluginExecution>
-                                                       </pluginExecutions>
-                                               </lifecycleMappingMetadata>
-                                       </configuration>
-                               </plugin>
-                       </plugins>
-               </pluginManagement>
-       </build>
-</project>
diff --git a/anr-xapp-client/src/main/resources/anr_swagger_0.0.8.yaml b/anr-xapp-client/src/main/resources/anr_swagger_0.0.8.yaml
deleted file mode 100644 (file)
index 8080b63..0000000
+++ /dev/null
@@ -1,239 +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===================================
-swagger : '2.0'
-info :
-  description : REST API specification for RIC ANR closed xAPP
-  version     : 0.0.8
-  title       : RIC ANR
-  license:
-    name : Nokia Closed App
-    url  : 'http://www.nokia.com'
-host     : anr-service
-basePath : /ric/v1
-schemes :
-  - http
-paths :
-  /health/alive :
-    get :
-      summary     : Health check of ANR - Liveness probe
-      tags        : 
-        - health
-      operationId : getHealthAlive
-      responses   :
-        '200' :
-          description : Status of ANR xApp is ok
-  /health/ready :
-    get :
-      summary     : Health check of ANR - Readiness probe
-      tags        : 
-        - health
-      operationId : getHealthReady
-      responses   :
-        '200':
-          description : ANR xApp is ready to serve
-  /ncrt/gnodebs :
-    get :
-      summary     : Returns list of gNodeB IDs based on NCRT in ANR
-      tags        : 
-        - ncrt
-      operationId : getgNodeB
-      produces  :
-        - application/json
-      responses :
-        '200' :
-          description : successful operation
-          schema      :
-            $ref : '#/definitions/ggNodeBTable'
-        '500' :
-          description : Unable to retrieve gNodeBs
-  /ncrt/servingcells :
-    get :
-      summary     : Returns neighbor cell relation table for all gNodeBs or based on query string
-      tags        : 
-        - ncrt
-      operationId : getNcrt
-      parameters :
-        - $ref : '#/parameters/ggnodeb'
-        - $ref : '#/parameters/servingCellNrcgi'
-        - $ref : '#/parameters/neighborCellNrpci'
-      produces  :
-        - application/json
-      responses :
-        '200' :
-          description : successful operation
-          schema      :
-            $ref : '#/definitions/neighborCellRelationTable'
-        '500' :
-          description : Unable to retrieve NCRT
-  /ncrt/servingcells/{servCellNrcgi}/neighborcells/{neighCellNrpci} :
-    parameters :
-      - $ref : '#/parameters/servCellNrcgi'
-      - $ref : '#/parameters/neighCellNrpci'
-    put :
-      summary     : Modify neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI
-      tags        : 
-        - ncrt
-      operationId : modifyNcrt
-      consumes   :
-        - application/json
-      produces   :
-        - application/json
-      parameters :
-        - name        : NcrtModificationParameters
-          in          : body
-          description : Parameters to modify neighbor cell relation
-          required    : true
-          schema :
-            $ref : '#/definitions/neighborCellRelationMod'
-      responses :
-        '200' :
-          description : Successfully modified neighbor cell relation
-        '400' :
-          description : Modification failed.
-                        { 
-                          Non-existent servCellNrcgi in request. |
-                          Non-existent neighCellNrpci in request.
-                        }
-        '405' :
-          description : Modification failed.
-                        {
-                          No data to udpate. | 
-                          Invalid data in BODY. |
-                          Parameter missing in BODY.
-                        }
-        '500' :
-          description : Modification failed.
-    delete :
-      summary     : Delete neighbor cell relation based on Source Cell NRCGI and Neighbor Cell NRPCI
-      tags        : 
-        - ncrt
-      operationId : deleteNcrt
-      responses :
-        '204' :
-          description : Successfully deleted neighbor cell relation
-        '400' :
-          description : Deletion failed.
-                        { 
-                          Non-existent servCellNrcgi in request. |
-                          Non-existent neighCellNrpci in request.
-                        }
-        '500' :
-          description : Deletion failed.
-parameters :
-  ggnodeb :
-    type        : string
-    name        : ggnodeb
-    description : Global gNodeB Identifier
-    in          : query
-  servingCellNrcgi :
-    type        : string
-    name        : servingCellNrcgi
-    description : Serving Cell Identifier (NR CGI)
-    in          : query
-  neighborCellNrpci :
-    type        : string
-    name        : neighborCellNrpci
-    description : Neighbor Cell Identifier (NR PCI)
-    in          : query
-  servCellNrcgi :
-    type        : string
-    name        : servCellNrcgi
-    description : Serving Cell Identifier (NR CGI)
-    in          : path
-    required   : true    
-  neighCellNrpci :
-    type        : string
-    name        : neighCellNrpci
-    description : Neighbor Cell Identifier (NR PCI)
-    in          : path
-    required    : true
-definitions :
-  ggNodeBTable :
-    type : object
-    properties : 
-      gNodeBIds : 
-        type   : array
-        items  :
-          $ref : '#/definitions/ggnodebId'
-  neighborCellRelationTable :
-    type : object
-    properties : 
-      ncrtRelations : 
-        type   : array
-        items  :
-          $ref : '#/definitions/neighborCellRelation'
-  ggnodebId :
-    type        : string
-    description : Global gNodeB Identifier
-    example     : ABCDE, EFGHI
-  neighborCellRelation :
-    type  : object
-    required : 
-      - servingCellNrcgi
-      - neighborCellNrpci
-      - neighborCellNrcgi
-      - flagNoHo
-      - flagNoXn
-      - flagNoRemove
-    properties :
-      servingCellNrcgi :
-        type        : string
-        description : Serving Cell Identifier (NR CGI)
-        example     : E12345
-      neighborCellNrpci :
-        type        : string
-        description : Neighbor Cell Identifier (NR PCI)
-        example     : E12345
-      neighborCellNrcgi :
-        type        : string
-        description : Neighbor Cell Identifier (NR CGI)
-        example     : E12345
-      flagNoHo :
-        type        : boolean
-        description : Flag for HANDOVER NOT ALLOWED
-        example     : True
-      flagNoXn :
-        type        : boolean
-        description : Flag for Xn CONNECTION NOT ALLOWED
-        example     : True
-      flagNoRemove :
-        type        : boolean
-        description : Flag for DELETION NOT ALLOWED
-        example     : True
-  neighborCellRelationMod :
-    type      : object
-    required  :
-      - neighborCellIdentifierType
-      - action
-    properties :
-      neighborCellNrcgi :
-        type        : string
-        description : Neighbor Cell Identifier (NR CGI)
-        example     : E12345
-      flagNoHo :
-        type        : boolean
-        description : Flag for HANDOVER NOT ALLOWED
-        example     : True
-      flagNoXn :
-        type        : boolean
-        description : Flag for Xn CONNECTION NOT ALLOWED
-        example     : True
-      flagNoRemove :
-        type        : boolean
-        description : Flag for DELETION NOT ALLOWED
-        example     : True
diff --git a/anr-xapp-client/src/test/java/org/oransc/ric/portal/dashboard/anrxapp/client/test/AnrXappClientTest.java b/anr-xapp-client/src/test/java/org/oransc/ric/portal/dashboard/anrxapp/client/test/AnrXappClientTest.java
deleted file mode 100644 (file)
index c9b435e..0000000
+++ /dev/null
@@ -1,49 +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===================================
- */
-package org.oransc.ric.portal.dashboard.anrxapp.client.test;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.oransc.ric.anrxapp.client.api.HealthApi;
-import org.oransc.ric.anrxapp.client.invoker.ApiClient;
-import org.springframework.web.client.RestClientException;
-
-/**
- * Demonstrates use of the generated ANR xApp client.
- * 
- * The test fails because no server is available.
- */
-public class AnrXappClientTest {
-
-       @Test
-       public void demo() {
-               ApiClient apiClient = new ApiClient();
-               apiClient.setBasePath("http://localhost:30099/");
-               HealthApi healthApi = new HealthApi(apiClient);
-               try {
-                       healthApi.getHealthAlive();
-                       System.out.println("getHealthAlive answered: " + apiClient.getStatusCode().toString());
-                       Assertions.assertTrue(apiClient.getStatusCode().is2xxSuccessful());
-               } catch (RestClientException e) {
-                       System.err.println("getHealthAlive failed: " + e.toString());
-               }
-       }
-
-}
index 34f8c85..9ea7c75 100644 (file)
@@ -30,6 +30,7 @@ Version 1.2.4, 24 Oct 2019
 * Repair bug that omitted slashes in CAAS-Ingress URL builder
 * Improve the dark mode
 * Show container ready count with total count
+* Remove ANR xApp
 
 Version 1.2.3, 4 Oct 2019
 -------------------------
diff --git a/pom.xml b/pom.xml
index 03f8a10..1fbfa42 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -46,10 +46,9 @@ limitations under the License.
        </properties>
        <modules>
                <module>a1-med-client</module>
-               <module>anr-xapp-client</module>
                <module>app-mgr-client</module>
-               <module>e2-mgr-client</module>
-               <module>webapp-frontend</module>
+    <module>e2-mgr-client</module>
+    <module>webapp-frontend</module>
                <module>webapp-backend</module>
        </modules>
        <build>
index 3b56e68..892ca6f 100644 (file)
@@ -43,11 +43,6 @@ limitations under the License.
        </repositories>
        <dependencies>
                <!-- xApps -->
-               <dependency>
-                       <groupId>org.o-ran-sc.ric.xapp.anr.client</groupId>
-                       <artifactId>anr-xapp-client</artifactId>
-                       <version>0.0.8-SNAPSHOT</version>
-               </dependency>
                <!-- Platform components -->
                <dependency>
                        <groupId>org.o-ran-sc.ric.plt.a1med.client</groupId>
diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappConfiguration.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/AnrXappConfiguration.java
deleted file mode 100644 (file)
index dbb78c7..0000000
+++ /dev/null
@@ -1,76 +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===================================
- */
-package org.oransc.ric.portal.dashboard.config;
-
-import java.lang.invoke.MethodHandles;
-
-import org.oransc.ric.anrxapp.client.api.HealthApi;
-import org.oransc.ric.anrxapp.client.api.NcrtApi;
-import org.oransc.ric.anrxapp.client.invoker.ApiClient;
-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.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.util.DefaultUriBuilderFactory;
-
-/**
- * Creates instances of the ANR xApp client APIs.
- */
-@Configuration
-@Profile("!test")
-public class AnrXappConfiguration {
-
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-       // Populated by the autowired constructor
-       private final String anrXappUrl;
-
-       @Autowired
-       public AnrXappConfiguration(@Value("${anrxapp.url.prefix}") final String urlPrefix,
-                       @Value("${anrxapp.url.suffix}") final String urlSuffix) {
-               logger.debug("ctor prefix '{}' suffix '{}'", urlPrefix, urlSuffix);
-               anrXappUrl = new DefaultUriBuilderFactory(urlPrefix.trim()).builder().path(urlSuffix.trim()).build().normalize()
-                               .toString();
-               logger.info("Configuring ANR client at URL {}", anrXappUrl);
-       }
-
-       private ApiClient apiClient() {
-               ApiClient apiClient = new ApiClient(new RestTemplate());
-               apiClient.setBasePath(anrXappUrl);
-               return apiClient;
-       }
-
-       @Bean
-       // The bean (method) name must be globally unique
-       public HealthApi anrHealthApi() {
-               return new HealthApi(apiClient());
-       }
-
-       @Bean
-       // The bean (method) name must be globally unique
-       public NcrtApi anrNcrtApi() {
-               return new NcrtApi(apiClient());
-       }
-
-}
index 0d90e6f..f4819d3 100644 (file)
@@ -26,7 +26,6 @@ import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
 import org.oransc.ric.portal.dashboard.DashboardUserManager;
 import org.oransc.ric.portal.dashboard.controller.A1MediatorController;
 import org.oransc.ric.portal.dashboard.controller.AdminController;
-import org.oransc.ric.portal.dashboard.controller.AnrXappController;
 import org.oransc.ric.portal.dashboard.controller.AppManagerController;
 import org.oransc.ric.portal.dashboard.controller.E2ManagerController;
 import org.oransc.ric.portal.dashboard.controller.SimpleErrorController;
@@ -96,9 +95,6 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
                        A1MediatorController.CONTROLLER_PATH + "/" + A1MediatorController.VERSION_METHOD, //
                        AdminController.CONTROLLER_PATH + "/" + AdminController.HEALTH_METHOD, //
                        AdminController.CONTROLLER_PATH + "/" + AdminController.VERSION_METHOD, //
-                       AnrXappController.CONTROLLER_PATH + "/" + AnrXappController.HEALTH_ALIVE_METHOD, //
-                       AnrXappController.CONTROLLER_PATH + "/" + AnrXappController.HEALTH_READY_METHOD, //
-                       AnrXappController.CONTROLLER_PATH + "/" + AnrXappController.VERSION_METHOD, //
                        AppManagerController.CONTROLLER_PATH + "/" + AppManagerController.HEALTH_ALIVE_METHOD, //
                        AppManagerController.CONTROLLER_PATH + "/" + AppManagerController.HEALTH_READY_METHOD, //
                        AppManagerController.CONTROLLER_PATH + "/" + AppManagerController.VERSION_METHOD, //
diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java
deleted file mode 100644 (file)
index 3d32415..0000000
+++ /dev/null
@@ -1,165 +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===================================
- */
-package org.oransc.ric.portal.dashboard.controller;
-
-import java.lang.invoke.MethodHandles;
-
-import javax.servlet.http.HttpServletResponse;
-
-import org.oransc.ric.anrxapp.client.api.HealthApi;
-import org.oransc.ric.anrxapp.client.api.NcrtApi;
-import org.oransc.ric.anrxapp.client.model.GgNodeBTable;
-import org.oransc.ric.anrxapp.client.model.NeighborCellRelationMod;
-import org.oransc.ric.anrxapp.client.model.NeighborCellRelationTable;
-import org.oransc.ric.portal.dashboard.DashboardApplication;
-import org.oransc.ric.portal.dashboard.DashboardConstants;
-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.context.annotation.Configuration;
-import org.springframework.http.MediaType;
-import org.springframework.security.access.annotation.Secured;
-import org.springframework.util.Assert;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import io.swagger.annotations.ApiOperation;
-
-/**
- * Proxies calls from the front end to the ANR xApp, which manages a Neighbor
- * Cell Relation Table (NCRT).
- * 
- * If a method throws RestClientResponseException, it is handled by
- * {@link CustomResponseEntityExceptionHandler#handleProxyMethodException(Exception, org.springframework.web.context.request.WebRequest)}
- * which returns status 502. All other exceptions are handled by Spring which
- * returns status 500.
- */
-@Configuration
-@RestController
-@RequestMapping(value = AnrXappController.CONTROLLER_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
-public class AnrXappController {
-
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-       // Publish paths in constants so tests are easy to write
-       public static final String CONTROLLER_PATH = DashboardConstants.ENDPOINT_PREFIX + "/xapp/anr";
-       // Endpoints
-       public static final String HEALTH_ALIVE_METHOD = "/health/alive";
-       public static final String HEALTH_READY_METHOD = "/health/ready";
-       public static final String GNODEBS_METHOD = "/gnodebs";
-       public static final String NCRT_METHOD = "/ncrt";
-       public static final String VERSION_METHOD = DashboardConstants.VERSION_METHOD;
-
-       // Path parameters
-       public static final String PP_SERVING = "servingcells";
-       public static final String PP_NEIGHBOR = "neighborcells";
-
-       // Populated by the autowired constructor
-       private final HealthApi healthApi;
-       private final NcrtApi ncrtApi;
-
-       @Autowired
-       public AnrXappController(final HealthApi anrHealthApi, final NcrtApi anrNcrtApi) {
-               Assert.notNull(anrHealthApi, "API must not be null");
-               Assert.notNull(anrNcrtApi, "API must not be null");
-               this.healthApi = anrHealthApi;
-               this.ncrtApi = anrNcrtApi;
-               if (logger.isDebugEnabled())
-                       logger.debug("ctor: configured with client types {} and {}", anrHealthApi.getClass().getName(),
-                                       anrNcrtApi.getClass().getName());
-       }
-
-       @ApiOperation(value = "Gets the ANR client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
-       @GetMapping(VERSION_METHOD)
-       // No role required
-       public SuccessTransport getClientVersion() {
-               return new SuccessTransport(200, DashboardApplication.getImplementationVersion(HealthApi.class));
-       }
-
-       @ApiOperation(value = "Performs a liveness probe on the ANR xApp, result expressed as the response code.")
-       @GetMapping(HEALTH_ALIVE_METHOD)
-       // No role required
-       public void getHealthAlive(HttpServletResponse response) {
-               logger.debug("getHealthAlive");
-               healthApi.getHealthAlive();
-               response.setStatus(healthApi.getApiClient().getStatusCode().value());
-       }
-
-       @ApiOperation(value = "Performs a readiness probe on the ANR xApp, result expressed as the response code.")
-       @GetMapping(HEALTH_READY_METHOD)
-       // No role required
-       public void getHealthReady(HttpServletResponse response) {
-               logger.debug("getHealthReady");
-               healthApi.getHealthReady();
-               response.setStatus(healthApi.getApiClient().getStatusCode().value());
-       }
-
-       @ApiOperation(value = "Returns list of gNodeB IDs based on NCRT in ANR", response = GgNodeBTable.class)
-       @GetMapping(GNODEBS_METHOD)
-       @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-       public GgNodeBTable getGnodebs() {
-               logger.debug("getGnodebs");
-               return ncrtApi.getgNodeB();
-       }
-
-       @ApiOperation(value = "Returns neighbor cell relation table for all gNodeBs or based on query parameters", response = NeighborCellRelationTable.class)
-       @GetMapping(NCRT_METHOD)
-       @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-       public NeighborCellRelationTable getNcrt( //
-                       @RequestParam(required = false) String ggnodeb, //
-                       @RequestParam(required = false) String servingCellNrcgi, //
-                       @RequestParam(required = false) String neighborCellNrpci) {
-               logger.debug("getNcrt: ggnbid {}, servingCellNrpci {}, neighborCellNrcgi {}", ggnodeb, servingCellNrcgi,
-                               neighborCellNrpci);
-               return ncrtApi.getNcrt(ggnodeb, servingCellNrcgi, neighborCellNrpci);
-       }
-
-       // /ncrt/servingcells/{servCellNrcgi}/neighborcells/{neighCellNrpci} :
-       @ApiOperation(value = "Modify neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI")
-       @PutMapping(NCRT_METHOD + "/" + PP_SERVING + "/{" + PP_SERVING + "}/" + PP_NEIGHBOR + "/{" + PP_NEIGHBOR + "}")
-       @Secured({ DashboardConstants.ROLE_ADMIN })
-       public void modifyNcrt(@PathVariable(PP_SERVING) String servingCellNrcgi, //
-                       @PathVariable(PP_NEIGHBOR) String neighborCellNrpci, //
-                       @RequestBody NeighborCellRelationMod ncrMod, HttpServletResponse response) {
-               logger.debug("modifyNcrt: servingCellNrcgi {}, neighborCellNrpci {}, ncrMod {}", servingCellNrcgi,
-                               neighborCellNrpci, ncrMod);
-               ncrtApi.modifyNcrt(servingCellNrcgi, neighborCellNrpci, ncrMod);
-               response.setStatus(ncrtApi.getApiClient().getStatusCode().value());
-       }
-
-       @ApiOperation(value = "Delete neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI")
-       @DeleteMapping(NCRT_METHOD + "/" + PP_SERVING + "/{" + PP_SERVING + "}/" + PP_NEIGHBOR + "/{" + PP_NEIGHBOR + "}")
-       @Secured({ DashboardConstants.ROLE_ADMIN })
-       public void deleteNcrt(@PathVariable(PP_SERVING) String servingCellNrcgi, //
-                       @PathVariable(PP_NEIGHBOR) String neighborCellNrpci, //
-                       HttpServletResponse response) {
-               logger.debug("deleteNcrt: servingCellNrcgi {}, neighborCellNrpci {}", servingCellNrcgi, neighborCellNrpci);
-               ncrtApi.deleteNcrt(servingCellNrcgi, neighborCellNrpci);
-               response.setStatus(ncrtApi.getApiClient().getStatusCode().value());
-       }
-
-}
index a740652..a497f09 100644 (file)
@@ -44,9 +44,6 @@ portalapi.password =
 # A1 Mediator
 a1med.url.prefix = http://jar-app-props-default-A1-URL-prefix
 a1med.url.suffix =
-# ANR xApp
-anrxapp.url.prefix = http://jar-app-props-default-ANR-URL-prefix
-anrxapp.url.suffix =
 # App Manager
 appmgr.url.prefix = http://jar-app-props-default-Xapp-Mgr-URL
 appmgr.url.suffix = /ric/v1
diff --git a/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java b/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AnrXappMockConfiguration.java
deleted file mode 100644 (file)
index dac3ff6..0000000
+++ /dev/null
@@ -1,207 +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===================================
- */
-package org.oransc.ric.portal.dashboard.config;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.ArgumentMatchers.isNull;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.lang.invoke.MethodHandles;
-
-import org.oransc.ric.anrxapp.client.api.HealthApi;
-import org.oransc.ric.anrxapp.client.api.NcrtApi;
-import org.oransc.ric.anrxapp.client.invoker.ApiClient;
-import org.oransc.ric.anrxapp.client.model.GgNodeBTable;
-import org.oransc.ric.anrxapp.client.model.NeighborCellRelation;
-import org.oransc.ric.anrxapp.client.model.NeighborCellRelationMod;
-import org.oransc.ric.anrxapp.client.model.NeighborCellRelationTable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.http.HttpStatus;
-
-/**
- * Creates a mock implementation of the ANR xApp client APIs.
- */
-@Configuration
-@Profile("test")
-public class AnrXappMockConfiguration {
-
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-       // Simulate remote method delay for UI testing
-       @Value("${mock.config.delay:0}")
-       private int delayMs;
-
-       private static final String GNODEB1 = "001EF5:0045FE50";
-       private static final String GNODEB2 = "001EF6:0045FE51";
-       private static final String GNODEB3 = "001EF7:0045FE52";
-
-       // Sonar wants separate declarations
-       private final NeighborCellRelationTable ncrt;
-       private final NeighborCellRelationTable ncrtNodeB1;
-       private final NeighborCellRelationTable ncrtNodeB2;
-       private final NeighborCellRelationTable ncrtNodeB3;
-       private final GgNodeBTable gNodebTable;
-
-       public AnrXappMockConfiguration() {
-               logger.info("Configuring mock ANR xApp client");
-               gNodebTable = new GgNodeBTable();
-               gNodebTable.addGNodeBIdsItem(GNODEB1).addGNodeBIdsItem(GNODEB2).addGNodeBIdsItem(GNODEB3);
-               ncrtNodeB1 = new NeighborCellRelationTable();
-               ncrtNodeB2 = new NeighborCellRelationTable();
-               ncrtNodeB3 = new NeighborCellRelationTable();
-               ncrt = new NeighborCellRelationTable();
-               String[] neighbors1 = { "1104", "1105", "1106" };
-               for (String n : neighbors1)
-                       ncrtNodeB1.addNcrtRelationsItem(
-                                       new NeighborCellRelation().servingCellNrcgi(GNODEB1 + ":1100").neighborCellNrpci(n)
-                                                       .neighborCellNrcgi(GNODEB1 + ":" + n).flagNoHo(true).flagNoXn(true).flagNoRemove(true));
-               String[] neighbors2 = { "1471", "1472", "1473" };
-               for (String n : neighbors2)
-                       ncrtNodeB2.addNcrtRelationsItem(
-                                       new NeighborCellRelation().servingCellNrcgi(GNODEB2 + ":1400").neighborCellNrpci(n)
-                                                       .neighborCellNrcgi(GNODEB2 + ":" + n).flagNoHo(false).flagNoXn(false).flagNoRemove(false));
-               String[] neighbors3 = { "3601", "3601", "3602" };
-               for (String n : neighbors3)
-                       ncrtNodeB3.addNcrtRelationsItem(
-                                       new NeighborCellRelation().servingCellNrcgi(GNODEB3 + ":3600").neighborCellNrpci(n)
-                                                       .neighborCellNrcgi(GNODEB3 + ":" + n).flagNoHo(true).flagNoXn(true).flagNoRemove(true));
-               for (NeighborCellRelation ncr : ncrtNodeB1.getNcrtRelations())
-                       ncrt.addNcrtRelationsItem(ncr);
-               for (NeighborCellRelation ncr : ncrtNodeB2.getNcrtRelations())
-                       ncrt.addNcrtRelationsItem(ncr);
-               for (NeighborCellRelation ncr : ncrtNodeB3.getNcrtRelations())
-                       ncrt.addNcrtRelationsItem(ncr);
-       }
-
-       private ApiClient apiClient() {
-               ApiClient mockClient = mock(ApiClient.class);
-               when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
-               return mockClient;
-       }
-
-       @Bean
-       // Use the same name as regular configuration
-       public HealthApi anrHealthApi() {
-               ApiClient apiClient = apiClient();
-               HealthApi mockApi = mock(HealthApi.class);
-               when(mockApi.getApiClient()).thenReturn(apiClient);
-               doAnswer(i -> null).when(mockApi).getHealthAlive();
-               doAnswer(i -> null).when(mockApi).getHealthReady();
-               return mockApi;
-       }
-
-       @Bean
-       // Use the same name as regular configuration
-       public NcrtApi anrNcrtApi() {
-               ApiClient apiClient = apiClient();
-               NcrtApi mockApi = mock(NcrtApi.class);
-               when(mockApi.getApiClient()).thenReturn(apiClient);
-               doAnswer(inv -> {
-                       if (delayMs > 0) {
-                               logger.debug("getgNodeB sleeping {}", delayMs);
-                               Thread.sleep(delayMs);
-                       }
-                       return gNodebTable;
-               }).when(mockApi).getgNodeB();
-               // Swagger sends nulls; front end sends empty strings
-               doAnswer(inv -> {
-                       if (delayMs > 0) {
-                               logger.debug("getNcrt (1) sleeping {}", delayMs);
-                               Thread.sleep(delayMs);
-                       }
-                       return ncrt;
-               }).when(mockApi).getNcrt((String) isNull(), (String) isNull(), (String) isNull());
-               doAnswer(inv -> {
-                       if (delayMs > 0) {
-                               logger.debug("getNcrt (2) sleeping {}", delayMs);
-                               Thread.sleep(delayMs);
-                       }
-                       return ncrt;
-               }).when(mockApi).getNcrt(eq(""), any(String.class), any(String.class));
-               doAnswer(inv -> {
-                       if (delayMs > 0) {
-                               logger.debug("getNcrt (3) sleeping {}", delayMs);
-                               Thread.sleep(delayMs);
-                       }
-                       return ncrtNodeB1;
-               }).when(mockApi).getNcrt(eq(GNODEB1), any(String.class), any(String.class));
-               doAnswer(inv -> {
-                       if (delayMs > 0) {
-                               logger.debug("getNcrt (4) sleeping {}", delayMs);
-                               Thread.sleep(delayMs);
-                       }
-                       return ncrtNodeB2;
-               }).when(mockApi).getNcrt(eq(GNODEB2), any(String.class), any(String.class));
-               doAnswer(inv -> {
-                       if (delayMs > 0) {
-                               logger.debug("getNcrt (5) sleeping {}", delayMs);
-                               Thread.sleep(delayMs);
-                       }
-                       return ncrtNodeB3;
-               }).when(mockApi).getNcrt(eq(GNODEB3), any(String.class), any(String.class));
-               doAnswer(inv -> {
-                       if (delayMs > 0) {
-                               logger.debug("deleteNcrt sleeping {}", delayMs);
-                               Thread.sleep(delayMs);
-                       }
-                       String servCellNrcgi = inv.<String>getArgument(0);
-                       String neighCellNrpci = inv.<String>getArgument(1);
-                       for (NeighborCellRelation ncr : ncrt.getNcrtRelations()) {
-                               if (servCellNrcgi.equals(ncr.getServingCellNrcgi())
-                                               && neighCellNrpci.equals(ncr.getNeighborCellNrpci())) {
-                                       logger.debug("deleteNcrt: removing {}", ncr);
-                                       ncrt.getNcrtRelations().remove(ncr);
-                                       break;
-                               }
-                       }
-                       return null;
-               }).when(mockApi).deleteNcrt(any(String.class), any(String.class));
-               doAnswer(inv -> {
-                       if (delayMs > 0) {
-                               logger.debug("modifyNcrt sleeping {}", delayMs);
-                               Thread.sleep(delayMs);
-                       }
-                       String servCellNrcgi = inv.<String>getArgument(0);
-                       String neighCellNrpci = inv.<String>getArgument(1);
-                       NeighborCellRelationMod mod = inv.<NeighborCellRelationMod>getArgument(2);
-                       for (NeighborCellRelation ncr : ncrt.getNcrtRelations()) {
-                               if (servCellNrcgi.equals(ncr.getServingCellNrcgi())
-                                               && neighCellNrpci.equals(ncr.getNeighborCellNrpci())) {
-                                       logger.debug("modifyNcrt: modifying {} to {}", ncr, mod);
-                                       ncr.setFlagNoHo(mod.isFlagNoHo());
-                                       ncr.setFlagNoRemove(mod.isFlagNoRemove());
-                                       ncr.setFlagNoXn(mod.isFlagNoXn());
-                                       break;
-                               }
-                       }
-                       return null;
-               }).when(mockApi).modifyNcrt(any(String.class), any(String.class), any(NeighborCellRelationMod.class));
-               return mockApi;
-       }
-
-}
index 09a9d09..ba84fd4 100644 (file)
@@ -69,7 +69,7 @@ public class AppManagerMockConfiguration {
 
        public AppManagerMockConfiguration() {
                logger.info("Configuring mock xApp Manager");
-               final String[] appNames = { "AdmissionControl", "Automatic Neighbor Relation", "UE Event Collector" };
+               final String[] appNames = { "AdmissionControl", "UE Event Collector" };
                final String configJson = " { \"config\" : \"example\" }";
                final String descriptorJson = " { \"descriptor\" : \"example\" }";
                allXappConfigs = new AllXappConfig();
diff --git a/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AnrXappControllerTest.java b/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AnrXappControllerTest.java
deleted file mode 100644 (file)
index e0bfde3..0000000
+++ /dev/null
@@ -1,103 +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===================================
- */
-package org.oransc.ric.portal.dashboard.controller;
-
-import java.lang.invoke.MethodHandles;
-import java.net.URI;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.oransc.ric.anrxapp.client.model.GgNodeBTable;
-import org.oransc.ric.anrxapp.client.model.NeighborCellRelationMod;
-import org.oransc.ric.anrxapp.client.model.NeighborCellRelationTable;
-import org.oransc.ric.portal.dashboard.model.SuccessTransport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-
-public class AnrXappControllerTest extends AbstractControllerTest {
-
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-       @Test
-       public void versionTest() {
-               URI uri = buildUri(null, AnrXappController.CONTROLLER_PATH, AnrXappController.VERSION_METHOD);
-               logger.info("Invoking {}", uri);
-               SuccessTransport st = restTemplate.getForObject(uri, SuccessTransport.class);
-               Assertions.assertFalse(st.getData().toString().isEmpty());
-       }
-
-       @Test
-       public void healthAliveTest() {
-               URI uri = buildUri(null, AnrXappController.CONTROLLER_PATH, AnrXappController.HEALTH_ALIVE_METHOD);
-               logger.info("Invoking {}", uri);
-               ResponseEntity<Void> voidResponse = restTemplate.getForEntity(uri, Void.class);
-               Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful());
-       }
-
-       @Test
-       public void healthReadyTest() {
-               URI uri = buildUri(null, AnrXappController.CONTROLLER_PATH, AnrXappController.HEALTH_READY_METHOD);
-               logger.info("Invoking {}", uri);
-               ResponseEntity<Void> voidResponse = restTemplate.getForEntity(uri, Void.class);
-               Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful());
-       }
-
-       @Test
-       public void gnodebsTest() {
-               URI uri = buildUri(null, AnrXappController.CONTROLLER_PATH, AnrXappController.GNODEBS_METHOD);
-               logger.info("Invoking {}", uri);
-               GgNodeBTable list = testRestTemplateStandardRole().getForObject(uri, GgNodeBTable.class);
-               Assertions.assertFalse(list.getGNodeBIds().isEmpty());
-       }
-
-       @Test
-       public void ncrtGetTest() {
-               URI uri = buildUri(null, AnrXappController.CONTROLLER_PATH, AnrXappController.NCRT_METHOD);
-               logger.info("Invoking {}", uri);
-               NeighborCellRelationTable table = testRestTemplateStandardRole().getForObject(uri,
-                               NeighborCellRelationTable.class);
-               Assertions.assertFalse(table.getNcrtRelations().isEmpty());
-       }
-
-       @Test
-       public void ncrtPutTest() {
-               URI uri = buildUri(null, AnrXappController.CONTROLLER_PATH, AnrXappController.NCRT_METHOD,
-                               AnrXappController.PP_SERVING, "serving", AnrXappController.PP_NEIGHBOR, "neighbor");
-               logger.info("Invoking {}", uri);
-               HttpEntity<NeighborCellRelationMod> entity = new HttpEntity<>(new NeighborCellRelationMod());
-               ResponseEntity<Void> voidResponse = testRestTemplateAdminRole().exchange(uri, HttpMethod.PUT, entity,
-                               Void.class);
-               Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful());
-       }
-
-       @Test
-       public void ncrtDeleteTest() {
-               URI uri = buildUri(null, AnrXappController.CONTROLLER_PATH, AnrXappController.NCRT_METHOD,
-                               AnrXappController.PP_SERVING, "serving", AnrXappController.PP_NEIGHBOR, "neighbor");
-               logger.info("Invoking {}", uri);
-               ResponseEntity<Void> voidResponse = testRestTemplateAdminRole().exchange(uri, HttpMethod.DELETE, null,
-                               Void.class);
-               Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful());
-       }
-
-}
diff --git a/webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.html b/webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.html
deleted file mode 100644 (file)
index d4b35c5..0000000
+++ /dev/null
@@ -1,53 +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>
-    Edit Neighbor Cell Relation
-</div>
-
-<form [formGroup]="ncrDialogForm" novalidate autocomplete="off" (ngSubmit)="modifyNcr(ncrDialogForm.value)">
-  <div mat-dialog-content>
-    <mat-form-field class="input-display-block">
-      <input matInput readonly type="text" placeholder="Serving cell NRCGI" formControlName="servingCellNrcgi">
-    </mat-form-field>
-    <mat-form-field class="input-display-block">
-      <input matInput readonly type="text" placeholder="Neighbor cell NRPCI" formControlName="neighborCellNrpci">
-    </mat-form-field>
-    <mat-form-field class="input-display-block">
-      <input matInput type="text" placeholder="Neighbor cell NRCGI" formControlName="neighborCellNrcgi">
-      <mat-hint align="end">Example: A12345</mat-hint>
-      <mat-error *ngIf="validateControl('neighborCellNrcgi') && hasError('neighborCellNrcgi', 'required')">Neighbor cell identifier is required</mat-error>
-      <mat-error *ngIf="hasError('neighborCellNrcgi', 'pattern')">Valid NRCGI is required</mat-error>
-    </mat-form-field>
-    <div name="flagNoHo">
-        <mat-checkbox formControlName="flagNoHo">Flag No Handover</mat-checkbox>
-    </div>
-    <div name="flagNoXn">
-        <mat-checkbox formControlName="flagNoXn">Flag No Xn</mat-checkbox>
-    </div>
-    <div name="flagNoRemove">
-      <mat-checkbox formControlName="flagNoRemove">Flag No Remove</mat-checkbox>
-    </div>
-</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]="!ncrDialogForm.valid">Save</button>
-  </div>
-</form>
diff --git a/webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.scss b/webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.scss
deleted file mode 100644 (file)
index 9171531..0000000
+++ /dev/null
@@ -1,24 +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;
-}
diff --git a/webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.ts b/webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.ts
deleted file mode 100644 (file)
index 9987ac3..0000000
+++ /dev/null
@@ -1,93 +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 { Component, OnInit, Inject } from '@angular/core';
-import { FormGroup, FormControl, Validators } from '@angular/forms';
-import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import { ANRXappService } from '../services/anr-xapp/anr-xapp.service';
-import { ErrorDialogService } from '../services/ui/error-dialog.service';
-import { ANRNeighborCellRelation, ANRNeighborCellRelationMod } from '../interfaces/anr-xapp.types';
-
-@Component({
-    selector: 'rd-ncr-edit-dialog',
-    templateUrl: './anr-edit-ncr-dialog.component.html',
-    styleUrls: ['./anr-edit-ncr-dialog.component.scss']
-})
-
-export class AnrEditNcrDialogComponent implements OnInit {
-
-    private ncrDialogForm: FormGroup;
-
-    constructor(
-        private dialogRef: MatDialogRef<AnrEditNcrDialogComponent>,
-        private dataService: ANRXappService,
-        private errorService: ErrorDialogService,
-        @Inject(MAT_DIALOG_DATA) private data: ANRNeighborCellRelation) { }
-
-    ngOnInit() {
-        this.ncrDialogForm = new FormGroup({
-            servingCellNrcgi: new FormControl(this.data.servingCellNrcgi), // readonly
-            neighborCellNrpci: new FormControl(this.data.neighborCellNrpci), // readonly
-            neighborCellNrcgi: new FormControl(this.data.neighborCellNrcgi, [Validators.required]),
-            flagNoHo: new FormControl(this.data.flagNoHo),
-            flagNoXn: new FormControl(this.data.flagNoXn),
-            flagNoRemove: new FormControl(this.data.flagNoRemove)
-        });
-    }
-
-    onCancel() {
-        this.dialogRef.close();
-    }
-
-    modifyNcr = (ncrFormValue: ANRNeighborCellRelation) => {
-        if (this.ncrDialogForm.valid) {
-            const ncrm = {} as ANRNeighborCellRelationMod;
-            // there must be a better way to build the struct
-            ncrm.neighborCellNrcgi = ncrFormValue.neighborCellNrcgi;
-            ncrm.neighborCellNrpci = ncrFormValue.neighborCellNrpci;
-            ncrm.flagNoHo = ncrFormValue.flagNoHo;
-            ncrm.flagNoXn = ncrFormValue.flagNoXn;
-            ncrm.flagNoRemove = ncrFormValue.flagNoRemove;
-            this.dataService.modifyNcr(ncrFormValue.servingCellNrcgi, ncrFormValue.neighborCellNrpci, ncrm).subscribe(
-                (val: any[]) => {
-                    // Success
-                },
-                (error => {
-                    this.errorService.displayError('NCR update failed: ' + error.message);
-                })
-            );
-            this.dialogRef.close();
-        }
-    }
-
-    hasError(controlName: string, errorName: string) {
-        if (this.ncrDialogForm.controls[controlName].hasError(errorName)) {
-            return true;
-        }
-        return false;
-    }
-
-    validateControl(controlName: string) {
-        if (this.ncrDialogForm.controls[controlName].invalid && this.ncrDialogForm.controls[controlName].touched) {
-            return true;
-        }
-        return false;
-    }
-
-}
diff --git a/webapp-frontend/src/app/anr-xapp/anr-xapp.component.html b/webapp-frontend/src/app/anr-xapp/anr-xapp.component.html
deleted file mode 100644 (file)
index 9bf24a0..0000000
+++ /dev/null
@@ -1,96 +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 class="anr__section" >
-  <h3 class="rd-global-page-title">ANR xApp Neighbor Cell Relation Table</h3>
-
-  <mat-form-field class="input-width">
-    <mat-label>GgNodeB</mat-label>
-    <!-- use a native selection widget -->
-    <select matNativeControl #ggNodeB (change)="loadNcrtPage()">
-      <option value="" selected>Select..</option>
-      <option *ngFor="let g of gNodeBIds" [value]="g">{{g}}</option>
-    </select>
-  </mat-form-field>
-  <mat-form-field class="input-width input-pad-left">
-    <input matInput placeholder="Serving Cell NRCGI" #servingCellNrcgi>
-  </mat-form-field>
-  <mat-form-field class="input-width input-pad-left">
-      <input matInput placeholder="Neighbor Cell NRPCI" #neighborCellNrpci>
-  </mat-form-field>
-
-  <table mat-table class="ncr-table mat-elevation-z8" [dataSource]="dataSource" matSort>
-
-    <ng-container matColumnDef="cellIdentifierNrcgi">
-        <mat-header-cell *matHeaderCellDef mat-sort-header>Serving Cell NRCGI</mat-header-cell>
-        <mat-cell *matCellDef="let ncr">{{ncr.servingCellNrcgi}}</mat-cell>
-    </ng-container>
-
-    <ng-container matColumnDef="neighborCellNrpci">
-        <mat-header-cell *matHeaderCellDef mat-sort-header>Neighbor Cell NRPCI</mat-header-cell>
-        <mat-cell *matCellDef="let ncr">{{ncr.neighborCellNrpci}}</mat-cell>
-    </ng-container>
-    <ng-container matColumnDef="neighborCellNrcgi">
-        <mat-header-cell *matHeaderCellDef mat-sort-header>Neighbor Cell NRCGI</mat-header-cell>
-        <mat-cell *matCellDef="let ncr">{{ncr.neighborCellNrcgi}}</mat-cell>
-    </ng-container>
-
-    <ng-container matColumnDef="flagNoHo">
-        <mat-header-cell *matHeaderCellDef mat-sort-header>Flag No Handover</mat-header-cell>
-        <mat-cell *matCellDef="let ncr">{{ncr.flagNoHo}}</mat-cell>
-    </ng-container>
-
-    <ng-container matColumnDef="flagNoXn">
-        <mat-header-cell *matHeaderCellDef mat-sort-header>Flag No Xn</mat-header-cell>
-        <mat-cell *matCellDef="let ncr">{{ncr.flagNoXn}}</mat-cell>
-    </ng-container>
-
-    <ng-container matColumnDef="flagNoRemove">
-        <mat-header-cell *matHeaderCellDef mat-sort-header>Flag No Remove</mat-header-cell>
-        <mat-cell *matCellDef="let ncr">{{ncr.flagNoRemove}}</mat-cell>
-    </ng-container>
-
-    <ng-container matColumnDef="action">
-      <mat-header-cell *matHeaderCellDef>Action</mat-header-cell>
-      <mat-cell class="action-cell" *matCellDef="let ncr">
-        <button mat-icon-button (click)="modifyNcr(ncr)">
-          <mat-icon>edit</mat-icon>
-        </button>
-        <button mat-icon-button color="warn" (click)="deleteNcr(ncr)">
-          <mat-icon>delete</mat-icon>
-             </button>
-           </mat-cell>
-         </ng-container>
-
-    <ng-container matColumnDef="noRecordsFound">
-      <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell>
-    </ng-container>
-
-    <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>
-
-  </table>
-
-  <div class="spinner-container" *ngIf="dataSource.loading$ | async">
-    <mat-spinner></mat-spinner>
-  </div>
-
-</div>
diff --git a/webapp-frontend/src/app/anr-xapp/anr-xapp.component.scss b/webapp-frontend/src/app/anr-xapp/anr-xapp.component.scss
deleted file mode 100644 (file)
index 2307f8c..0000000
+++ /dev/null
@@ -1,77 +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===================================
- */
- .anr__section {
-}
-
-.spinner-container {
-    height: 100px;
-    width: 100px;
-  }
-
-.spinner-container mat-spinner {
-    margin: 130px auto 0 auto;
-}
-
-.input-pad-left {
-    padding-left: 10px;
-}
-
-.input-width {
-    min-width: 250px;
-}
-
-.ncr-table {
-    width: 99%; /* 100% triggers horiz scroll bar */
-    min-height: 150px;
-    margin-top: 10px;
-    background-color:transparent;
-}
-
-.ncr-table__bg-dark {
-    color: white;
-}
-
-/* column classes are magically defined by Angular */
-.mat-column-neighborCellNrpci {
-    max-width: 150px;
-}
-.mat-column-flagNoHo {
-    max-width: 75px;
-}
-.mat-column-flagNoXn {
-    max-width: 75px;
-}
-.mat-column-flagNoRemove {
-    max-width: 75px;
-}
-.mat-column-action {
-    max-width: 85px;
-}
-
-.version__text {
-    color: gray;
-    letter-spacing: 0.1rem;
-    font-size: 10px;
-}
-
-.display-none {
-    display: none;
-  }
-  
\ No newline at end of file
diff --git a/webapp-frontend/src/app/anr-xapp/anr-xapp.component.spec.ts b/webapp-frontend/src/app/anr-xapp/anr-xapp.component.spec.ts
deleted file mode 100644 (file)
index 49c60b7..0000000
+++ /dev/null
@@ -1,44 +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 { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { AnrXappComponent } from './anr-xapp.component';
-
-describe('AnrXappComponent', () => {
-  let component: AnrXappComponent;
-  let fixture: ComponentFixture<AnrXappComponent>;
-
-  beforeEach(async(() => {
-    TestBed.configureTestingModule({
-      declarations: [ AnrXappComponent ]
-    })
-    .compileComponents();
-  }));
-
-  beforeEach(() => {
-    fixture = TestBed.createComponent(AnrXappComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});
diff --git a/webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts b/webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts
deleted file mode 100644 (file)
index 98728b2..0000000
+++ /dev/null
@@ -1,151 +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 { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
-import { MatSort } from '@angular/material/sort';
-import { MatDialog } from '@angular/material/dialog';
-import { fromEvent } from 'rxjs/observable/fromEvent';
-import { debounceTime, distinctUntilChanged, finalize, tap } from 'rxjs/operators';
-import { ANRNeighborCellRelation } from '../interfaces/anr-xapp.types';
-import { ANRXappService } from '../services/anr-xapp/anr-xapp.service';
-import { ErrorDialogService } from '../services/ui/error-dialog.service';
-import { LoadingDialogService } from '../services/ui/loading-dialog.service';
-import { ConfirmDialogService } from './../services/ui/confirm-dialog.service';
-import { NotificationService } from './../services/ui/notification.service';
-import { AnrEditNcrDialogComponent } from './anr-edit-ncr-dialog.component';
-import { ANRXappDataSource } from './anr-xapp.datasource';
-import { UiService } from '../services/ui/ui.service';
-
-@Component({
-  selector: 'rd-anr',
-  templateUrl: './anr-xapp.component.html',
-  styleUrls: ['./anr-xapp.component.scss']
-})
-export class AnrXappComponent implements AfterViewInit, OnInit {
-
-  darkMode: boolean;
-  panelClass: string = "";
-  dataSource: ANRXappDataSource;
-  gNodeBIds: string[];
-  @ViewChild('ggNodeB', { static: true }) ggNodeB: ElementRef;
-  @ViewChild('servingCellNrcgi', { static: true }) servingCellNrcgi: ElementRef;
-  @ViewChild('neighborCellNrpci', { static: true }) neighborCellNrpci: ElementRef;
-  @ViewChild(MatSort, { static: true }) sort: MatSort;
-
-  displayedColumns = ['cellIdentifierNrcgi', 'neighborCellNrpci', 'neighborCellNrcgi',
-    'flagNoHo', 'flagNoXn', 'flagNoRemove', 'action'];
-
-  constructor(
-    private anrXappService: ANRXappService,
-    private dialog: MatDialog,
-    private confirmDialogService: ConfirmDialogService,
-    private errorDialogService: ErrorDialogService,
-    private loadingDialogService: LoadingDialogService,
-    private notificationService: NotificationService,
-    public ui: UiService) { }
-
-  ngOnInit() {
-    this.dataSource = new ANRXappDataSource(this.anrXappService, this.sort, this.notificationService);
-    this.dataSource.loadTable();
-    // Empty string occurs first in the array of gNodeBIds
-    this.anrXappService.getgNodeBs().subscribe((res: string[]) => this.gNodeBIds = res);
-    this.ui.darkModeState.subscribe((isDark) => {
-      this.darkMode = isDark;
-    });
-  }
-
-  ngAfterViewInit() {
-    // the selector event calls loadNcrtPage() directly.
-    fromEvent(this.servingCellNrcgi.nativeElement, 'keyup')
-      .pipe(
-        debounceTime(150),
-        distinctUntilChanged(),
-        tap(() => {
-          this.loadNcrtPage();
-        })
-      )
-      .subscribe();
-    fromEvent(this.neighborCellNrpci.nativeElement, 'keyup')
-      .pipe(
-        debounceTime(150),
-        distinctUntilChanged(),
-        tap(() => {
-          this.loadNcrtPage();
-        })
-      )
-      .subscribe();
-  }
-
-  loadNcrtPage() {
-    this.dataSource.loadTable(
-      this.ggNodeB.nativeElement.value,
-      this.servingCellNrcgi.nativeElement.value,
-      this.neighborCellNrpci.nativeElement.value);
-  }
-
-  modifyNcr(ncr: ANRNeighborCellRelation): void {
-    if (this.darkMode) {
-      this.panelClass = "dark-theme";
-    } else {
-      this.panelClass = "";
-    }
-    const dialogRef = this.dialog.open(AnrEditNcrDialogComponent, {
-      panelClass: this.panelClass,
-      width: '300px',
-      data: ncr
-    });
-    dialogRef.afterClosed().subscribe(
-      (result: any) => {
-        this.loadNcrtPage();
-      }
-    );
-  }
-
-  deleteNcr(ncr: ANRNeighborCellRelation): void {
-    this.confirmDialogService
-      .openConfirmDialog('Are you sure you want to delete this relation?')
-      .afterClosed().subscribe(
-        (res: any) => {
-          if (res) {
-            this.loadingDialogService.startLoading("Deleting");
-            this.anrXappService.deleteNcr(ncr.servingCellNrcgi, ncr.neighborCellNrpci)
-              .pipe(
-                finalize(() => this.loadingDialogService.stopLoading())
-              )
-              .subscribe(
-                (response: HttpResponse<Object>) => {
-                  switch (response.status) {
-                    case 200:
-                      this.notificationService.success('Delete succeeded!');
-                      this.loadNcrtPage();
-                      break;
-                    default:
-                      this.notificationService.warn('Delete failed.');
-                  }
-                },
-                (error: HttpErrorResponse) => {
-                  this.errorDialogService.displayError(error.message);
-                });
-          }
-        });
-  }
-
-}
diff --git a/webapp-frontend/src/app/anr-xapp/anr-xapp.datasource.ts b/webapp-frontend/src/app/anr-xapp/anr-xapp.datasource.ts
deleted file mode 100644 (file)
index b31ad03..0000000
+++ /dev/null
@@ -1,102 +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 { CollectionViewer, DataSource } from '@angular/cdk/collections';
-import { HttpErrorResponse } from '@angular/common/http';
-import { MatSort } from '@angular/material/sort';
-import { Observable } from 'rxjs/Observable';
-import { BehaviorSubject } from 'rxjs/BehaviorSubject';
-import { of } from 'rxjs/observable/of';
-import { merge } from 'rxjs';
-import { catchError, finalize, map } from 'rxjs/operators';
-import { ANRNeighborCellRelation } from '../interfaces/anr-xapp.types';
-import { ANRXappService } from '../services/anr-xapp/anr-xapp.service';
-import { NotificationService } from '../services/ui/notification.service';
-
-export class ANRXappDataSource extends DataSource<ANRNeighborCellRelation> {
-
-  private relationsSubject = new BehaviorSubject<ANRNeighborCellRelation[]>([]);
-
-  private loadingSubject = new BehaviorSubject<boolean>(false);
-
-  public loading$ = this.loadingSubject.asObservable();
-
-  public rowCount = 1; // hide footer during intial load
-
-  constructor(private anrXappService: ANRXappService,
-    private sort: MatSort,
-    private notificationService: NotificationService) {
-    super();
-  }
-
-  loadTable(ggnodeb: string = '', servingCellNrcgi: string = '', neighborCellNrpci: string = '') {
-    this.loadingSubject.next(true);
-    this.anrXappService.getNcrtInfo(ggnodeb, servingCellNrcgi, neighborCellNrpci)
-      .pipe(
-        catchError( (her: HttpErrorResponse) => {
-          console.log('ANRXappDataSource failed: ' + her.message);
-          this.notificationService.error('Failed to get data: ' + her.message);
-          return of([]);
-        }),
-        finalize(() => this.loadingSubject.next(false))
-      )
-      .subscribe( (ncrt: ANRNeighborCellRelation[]) => {
-        this.rowCount = ncrt.length;
-        this.relationsSubject.next(ncrt);
-      });
-  }
-
-  connect(collectionViewer: CollectionViewer): Observable<ANRNeighborCellRelation[]> {
-    const dataMutations = [
-      this.relationsSubject.asObservable(),
-      this.sort.sortChange
-    ];
-    return merge(...dataMutations).pipe(map(() => {
-      return this.getSortedData([...this.relationsSubject.getValue()]);
-    }));
-  }
-
-  disconnect(collectionViewer: CollectionViewer): void {
-    this.relationsSubject.complete();
-    this.loadingSubject.complete();
-  }
-
-  private getSortedData(data: ANRNeighborCellRelation[]) {
-    if (!this.sort.active || this.sort.direction === '') {
-      return data;
-    }
-    return data.sort((a: ANRNeighborCellRelation, b: ANRNeighborCellRelation) => {
-      const isAsc = this.sort.direction === 'asc';
-      switch (this.sort.active) {
-        case 'cellIdentifierNrcgi': return compare(a.servingCellNrcgi, b.servingCellNrcgi, isAsc);
-        case 'neighborCellNrpci': return compare(a.neighborCellNrpci, b.neighborCellNrpci, isAsc);
-        case 'neighborCellNrcgi': return compare(a.neighborCellNrcgi, b.neighborCellNrcgi, isAsc);
-        case 'flagNoHo': return compare(a.flagNoHo, b.flagNoHo, isAsc);
-        case 'flagNoXn': return compare(a.flagNoXn, b.flagNoXn, isAsc);
-        case 'flagNoRemove': return compare(a.flagNoRemove, b.flagNoRemove, isAsc);
-        default: return 0;
-      }
-    });
-  }
-}
-
-function compare(a: any, b: any, isAsc: boolean) {
-  return (a < b ? -1 : 1) * (isAsc ? 1 : -1);
-}
index 07b931d..c97a195 100644 (file)
@@ -60,14 +60,9 @@ export class AppControlComponent implements OnInit {
     // TODO: identify apps without hardcoding to names
     const acAppPattern0 =  /[Aa][Dd][Mm][Ii][Nn]/;
     const acAppPattern1 =  /[Aa][Dd][Mm][Ii][Ss]{2}[Ii][Oo][Nn]/;
-    const anrAppPattern0 = /ANR/;
-    const anrAppPattern1 = /[Aa][Uu][Tt][Oo][Mm][Aa][Tt][Ii][Cc]/;
-    const anrAppPattern2 = /[Nn][Ee][Ii][Gg][Hh][Bb][Oo][Rr]/;
     if (acAppPattern0.test(app.xapp) || acAppPattern1.test(app.xapp)) {
       this.router.navigate(['/ac']);
-    } else if (anrAppPattern0.test(app.xapp) || (anrAppPattern1.test(app.xapp) && anrAppPattern2.test(app.xapp))) {
-      this.router.navigate(['/anr']);
-    } else {
+    }  else {
       this.errorDialogService.displayError('No control available for ' + app.xapp + ' (yet)');
     }
   }
index b82f53d..af8ec2e 100644 (file)
@@ -22,7 +22,6 @@ import { CommonModule } from '@angular/common';
 import { Routes, RouterModule } from '@angular/router';
 
 import { AcXappComponent } from './ac-xapp/ac-xapp.component';
-import { AnrXappComponent } from './anr-xapp/anr-xapp.component';
 import { CatalogComponent } from './catalog/catalog.component';
 import { ControlComponent } from './control/control.component';
 import { MainComponent } from './main/main.component';
@@ -35,7 +34,6 @@ const routes: Routes = [
     {path: 'catalog', component: CatalogComponent},
     {path: 'control', component: ControlComponent},
     {path: 'ac', component: AcXappComponent},
-    {path: 'anr', component: AnrXappComponent},
     {path: 'stats', component: StatsComponent},
     {path: 'platform', component: PlatformComponent},
     {path: 'user', component: UserComponent},
index e533701..440184f 100644 (file)
@@ -50,8 +50,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { ToastrModule } from 'ngx-toastr';
 import { AcXappComponent } from './ac-xapp/ac-xapp.component';
 import { AddDashboardUserDialogComponent } from './user/add-dashboard-user-dialog/add-dashboard-user-dialog.component';
-import { AnrEditNcrDialogComponent } from './anr-xapp/anr-edit-ncr-dialog.component';
-import { AnrXappComponent } from './anr-xapp/anr-xapp.component';
 import { AppConfigurationComponent } from './app-configuration/app-configuration.component';
 import { AppControlComponent } from './app-control/app-control.component';
 import { AppMgrService } from './services/app-mgr/app-mgr.service';
@@ -86,8 +84,6 @@ import { UserComponent } from './user/user.component';
   declarations: [
     AcXappComponent,
     AddDashboardUserDialogComponent,
-    AnrEditNcrDialogComponent,
-    AnrXappComponent,
     AppConfigurationComponent,
     AppControlComponent,
     CaasIngressComponent,
@@ -167,7 +163,6 @@ import { UserComponent } from './user/user.component';
   ],
   entryComponents: [
     AddDashboardUserDialogComponent,
-    AnrEditNcrDialogComponent,
     AppConfigurationComponent,
     ConfirmDialogComponent,
     EditDashboardUserDialogComponent,
diff --git a/webapp-frontend/src/app/services/anr-xapp/anr-xapp.service.spec.ts b/webapp-frontend/src/app/services/anr-xapp/anr-xapp.service.spec.ts
deleted file mode 100644 (file)
index c47dcd8..0000000
+++ /dev/null
@@ -1,32 +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 { TestBed } from '@angular/core/testing';
-
-import { ANRXappService } from './anr-xapp.service';
-
-describe('ANRXappService', () => {
-  beforeEach(() => TestBed.configureTestingModule({}));
-
-  it('should be created', () => {
-    const service: ANRXappService = TestBed.get(ANRXappService);
-    expect(service).toBeTruthy();
-  });
-});
diff --git a/webapp-frontend/src/app/services/anr-xapp/anr-xapp.service.ts b/webapp-frontend/src/app/services/anr-xapp/anr-xapp.service.ts
deleted file mode 100644 (file)
index e06b708..0000000
+++ /dev/null
@@ -1,136 +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 { Injectable } from '@angular/core';
-import { HttpClient, HttpParams } from '@angular/common/http';
-import { Observable } from 'rxjs';
-import { map } from 'rxjs/operators';
-import { DashboardSuccessTransport } from '../../interfaces/dashboard.types';
-import { ANRNeighborCellRelation, ANRNeighborCellRelationMod } from '../../interfaces/anr-xapp.types';
-
-@Injectable({
-  providedIn: 'root'
-})
-export class ANRXappService {
-
-  // Trailing slashes are confusing so omit them here
-  private basePath = 'api/xapp/anr';
-  private ncrtPath = 'ncrt';
-  private servingPath = 'servingcells';
-  private neighborPath = 'neighborcells';
-
-  constructor(private httpClient: HttpClient) {
-    // injects to variable httpClient
-  }
-
-  private buildPath(...args: any[]) {
-    let result = this.basePath;
-    args.forEach(part => {
-      result = result + '/' + part;
-    });
-    return result;
-  }
-
-  /**
-   * Gets ANR xApp client version details
-   * @returns Observable that should yield a String
-   */
-  getVersion(): Observable<string> {
-    const url = this.buildPath('version');
-    return this.httpClient.get<DashboardSuccessTransport>(url).pipe(
-      // Extract the string here
-      map(res => res['data'])
-    );
-  }
-
-  /**
-   * Performs a liveness probe
-   * @returns Observable that should yield a response code (no data)
-   */
-  getHealthAlive(): Observable<any> {
-    const url = this.buildPath('health/alive');
-    return this.httpClient.get(url, { observe: 'response' });
-  }
-
-  /**
-   * Performs a readiness probe
-   * @returns Observable that should yield a response code (no data)
-   */
-  getHealthReady(): Observable<any> {
-    const url = this.buildPath('health/ready');
-    return this.httpClient.get(url, { observe: 'response' });
-  }
-
-/**
- * Gets array of gNodeB IDs
- * @returns Observable that should yield a string array
- */
-  getgNodeBs(): Observable<string[]> {
-    const url = this.buildPath('gnodebs');
-    return this.httpClient.get<string[]>(url).pipe(
-      // Extract the array of IDs here
-      map(res => res['gNodeBIds'])
-    );
-  }
-
-  /**
-   * Gets the neighbor cell relation table for all gNodeBs or based on query parameters
-   * @param ggnbId Optional parameter for the gNB ID
-   * @param servingCellNrcgi Serving cell NRCGI
-   * @param neighborCellNrpci Neighbor cell NRPCI
-   * @returns Observable of ANR neighbor cell relation array
-   */
-  getNcrtInfo(ggnodeb: string = '', servingCellNrcgi: string = '', neighborCellNrpci: string = ''): Observable<ANRNeighborCellRelation[]> {
-    const url = this.buildPath(this.ncrtPath);
-    return this.httpClient.get<ANRNeighborCellRelation[]>(url, {
-      params: new HttpParams()
-        .set('ggnodeb', ggnodeb)
-        .set('servingCellNrcgi', servingCellNrcgi)
-        .set('neighborCellNrpci', neighborCellNrpci)
-    }).pipe(
-      // Extract the array of relations here
-      map(res => res['ncrtRelations'])
-    );
-  }
-
-  /**
-   * Modify neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI
-   * @param servingCellNrcgi Serving cell NRCGI
-   * @param neighborCellNrpci Neighbor cell NRPCI
-   * @param mod Values to store in the specified relation
-   * @returns Observable that yields a response code only, no data
-   */
-  modifyNcr(servingCellNrcgi: string, neighborCellNrpci: string, mod: ANRNeighborCellRelationMod): Observable<Object> {
-    const url = this.buildPath(this.ncrtPath, this.servingPath, servingCellNrcgi, this.neighborPath, neighborCellNrpci);
-    return this.httpClient.put(url, mod, { observe: 'response' });
-  }
-
-  /**
-   * Deletes neighbor cell relation based on Serving Cell NRCGI and Neighbor Cell NRPCI
-   * @param servingCellNrcgi Serving cell NRCGI
-   * @param neighborCellNrpci Neighbor cell NRPCI
-   * @returns Observable that yields a response code only, no data
-   */
-  deleteNcr(servingCellNrcgi: string, neighborCellNrpci: string): Observable<Object> {
-    const url = this.buildPath(this.ncrtPath, this.servingPath, servingCellNrcgi, this.neighborPath, neighborCellNrpci);
-    return this.httpClient.delete(url, { observe: 'response' });
-  }
-
-}
index 3309871..2587df1 100644 (file)
@@ -26,9 +26,6 @@
     <div class="card_item">
       <mat-icon>check_box</mat-icon> Admission Control
     </div>
-    <div class="card_item">
-      <mat-icon>settings_input_antenna</mat-icon> ANR
-    </div>
     <div class="card_item">
       <mat-icon>open_in_new</mat-icon> Deploy
     </div>