Drop A1 mediator and AC xApp 20/2620/5
authorLott, Christopher (cl778h) <cl778h@att.com>
Fri, 28 Feb 2020 20:00:18 +0000 (15:00 -0500)
committerLott, Christopher (cl778h) <cl778h@att.com>
Wed, 4 Mar 2020 19:03:01 +0000 (14:03 -0500)
Drop AC xApp control/config screen from front-end.
Drop A1 Mediator controller and tests from back-end.
Change AC metrics tab to Machine Learning (ML).

Issue-ID: OAM-56
Change-Id: I0e9958212c230d417131519f5f69023dc2a0720e
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
36 files changed:
.gitmodules
dashboard/a1-med-client/.gitignore [deleted file]
dashboard/a1-med-client/README.md [deleted file]
dashboard/a1-med-client/pom.xml [deleted file]
dashboard/a1-med-client/ric-plt-a1 [deleted submodule]
dashboard/a1-med-client/src/test/java/org/oransc/ric/portal/dashboard/a1med/client/test/A1MediatorClientTest.java [deleted file]
dashboard/pom.xml
dashboard/webapp-backend/pom.xml
dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/DashboardConstants.java
dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/A1MediatorApiBuilder.java [deleted file]
dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/A1MediatorConfiguration.java [deleted file]
dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/WebSecurityConfiguration.java
dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/A1MediatorController.java [deleted file]
dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AdminController.java
dashboard/webapp-backend/src/main/resources/application.yaml
dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/A1MediatorMockConfiguration.java [deleted file]
dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AppManagerMockConfiguration.java
dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/test/A1MediatorConfigTest.java [deleted file]
dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/A1MediatorControllerTest.java [deleted file]
dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AdminControllerTest.java
dashboard/webapp-backend/src/test/resources/rate-control-policy-instance.json [deleted file]
dashboard/webapp-backend/src/test/resources/rate-control-policy-type.json [deleted file]
dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.html [deleted file]
dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.scss [deleted file]
dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.spec.ts [deleted file]
dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.ts [deleted file]
dashboard/webapp-frontend/src/app/app-control/app-control.component.ts
dashboard/webapp-frontend/src/app/interfaces/ac-xapp.types.ts [deleted file]
dashboard/webapp-frontend/src/app/rd-routing.module.ts
dashboard/webapp-frontend/src/app/rd.module.ts
dashboard/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.spec.ts [deleted file]
dashboard/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts [deleted file]
dashboard/webapp-frontend/src/app/stats/stats.component.html
dashboard/webapp-frontend/src/app/stats/stats.component.ts
dashboard/webapp-frontend/src/app/ui/catalog-card/catalog-card.component.html
docs/release-notes.rst

index e4d0c77..3f35354 100644 (file)
@@ -1,6 +1,3 @@
-[submodule "dashboard/a1-med-client/ric-plt-a1"]
-       path = dashboard/a1-med-client/ric-plt-a1
-       url = ../../ric-plt/a1
 [submodule "dashboard/app-mgr-client/ric-plt-appmgr"]
        path = dashboard/app-mgr-client/ric-plt-appmgr
        url = ../../ric-plt/appmgr
diff --git a/dashboard/a1-med-client/.gitignore b/dashboard/a1-med-client/.gitignore
deleted file mode 100644 (file)
index 27fd461..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-*.class
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.ear
-
-# exclude jar for gradle wrapper
-!gradle/wrapper/*.jar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-
-# build files
-**/target
-target
-.gradle
-build
-
-logs/
diff --git a/dashboard/a1-med-client/README.md b/dashboard/a1-med-client/README.md
deleted file mode 100644 (file)
index beaff1b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# A1 Mediator Client Generator
-
-This projects generates a REST client library from the OpenAPI specification
-file obtained from the ric-plt/a1 project, available here as a git submodule
-with a pinned version, and packages it in a jar.
-
-## Eclipse and STS Users
-
-The source folder should be generated automatically by the Swagger Codegen maven
-plugin and should also appear on the build path in Eclipse/STS, but if not,
-follow 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-2020 AT&T Intellectual Property & Nokia. 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/dashboard/a1-med-client/pom.xml b/dashboard/a1-med-client/pom.xml
deleted file mode 100644 (file)
index 34ee440..0000000
+++ /dev/null
@@ -1,193 +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>2.0.1-SNAPSHOT</version>
-       </parent>
-       <!-- This groupId will NOT allow deployment in LF -->
-       <groupId>org.o-ran-sc.ric-plt.a1.client</groupId>
-       <artifactId>a1-med-client</artifactId>
-       <name>RIC A1 Mediator Client</name>
-       <!-- Update to match submodule tag -->
-       <version>2.1.0-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.ricplt.a1.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.core.v3</groupId>
-                       <artifactId>swagger-annotations</artifactId>
-                       <version>2.0.8</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 2019 version is required for OpenAPI 3 -->
-                               <groupId>io.swagger.codegen.v3</groupId>
-                               <artifactId>swagger-codegen-maven-plugin</artifactId>
-                               <version>3.0.8</version>
-                               <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>generate</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <inputSpec>${project.basedir}/ric-plt-a1/a1/openapi.yaml</inputSpec>
-                                                       <language>java</language>
-                                                       <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>
-                                                       <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>
-                                               </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>
-                       <!-- Add generated source folder to Eclipse build path -->
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>build-helper-maven-plugin</artifactId>
-                               <!--  version>1.7</version> -->
-                               <executions>
-                                       <execution>
-                                               <phase>generate-sources</phase>
-                                               <goals>
-                                                       <goal>add-source</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <sources>
-                                                               <source>target/generated-sources/swagger/src/main/java</source>
-                                                       </sources>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </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.codegen.v3</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/dashboard/a1-med-client/ric-plt-a1 b/dashboard/a1-med-client/ric-plt-a1
deleted file mode 160000 (submodule)
index ccb4a69..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ccb4a69e473cab6db7e8d52a04f9b4922528e24f
diff --git a/dashboard/a1-med-client/src/test/java/org/oransc/ric/portal/dashboard/a1med/client/test/A1MediatorClientTest.java b/dashboard/a1-med-client/src/test/java/org/oransc/ric/portal/dashboard/a1med/client/test/A1MediatorClientTest.java
deleted file mode 100644 (file)
index 8e5cef4..0000000
+++ /dev/null
@@ -1,58 +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.a1med.client.test;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.oransc.ricplt.a1.client.api.A1MediatorApi;
-import org.oransc.ricplt.a1.client.invoker.ApiClient;
-import org.springframework.web.client.RestClientException;
-
-/**
- * Demonstrates use of the generated A1 mediator client.
- * 
- * The tests fail because no server is available.
- */
-public class A1MediatorClientTest {
-
-       @Test
-       public void demo() {
-               ApiClient apiClient = new ApiClient();
-               apiClient.setBasePath("http://localhost:30099/");
-               A1MediatorApi a1Api = new A1MediatorApi(apiClient);
-               try {
-                       Object o = a1Api.a1ControllerGetPolicyInstance(1, "policyInstanceId");
-                       System.out.println("a1ControllerGetPolicyInstance answered code {} " + apiClient.getStatusCode().toString()
-                                       + ", content " + o.toString());
-                       Assertions.assertTrue(apiClient.getStatusCode().is2xxSuccessful());
-               } catch (RestClientException e) {
-                       System.err.println("a1ControllerGetPolicyInstance failed: " + e.toString());
-               }
-               try {
-                       String policy = "{}";
-                       a1Api.a1ControllerCreateOrReplacePolicyInstance(1, "policyInstanceId", policy);
-                       System.out.println(
-                                       "a1ControllerCreateOrReplacePolicyInstance answered: " + apiClient.getStatusCode().toString());
-                       Assertions.assertTrue(apiClient.getStatusCode().is2xxSuccessful());
-               } catch (RestClientException e) {
-                       System.err.println("a1ControllerCreateOrReplacePolicyInstance failed: " + e.toString());
-               }
-       }
-}
index b61a4b0..75b587b 100644 (file)
@@ -44,7 +44,6 @@ limitations under the License.
                <lmp.process.end.tag>========================LICENSE_END===================================</lmp.process.end.tag>
        </properties>
        <modules>
-               <module>a1-med-client</module>
                <module>app-mgr-client</module>
                <module>e2-mgr-client</module>
                <module>webapp-frontend</module>
index 5e94421..ed1da94 100644 (file)
@@ -44,11 +44,6 @@ limitations under the License.
        </repositories>
        <dependencies>
                <!-- Platform components -->
-               <dependency>
-                       <groupId>org.o-ran-sc.ric-plt.a1.client</groupId>
-                       <artifactId>a1-med-client</artifactId>
-                       <version>2.1.0-SNAPSHOT</version>
-               </dependency>
                <dependency>
                        <groupId>org.o-ran-sc.ric-plt.appmgr.client</groupId>
                        <artifactId>app-mgr-client</artifactId>
index 6f02a22..6f124ed 100644 (file)
@@ -31,8 +31,8 @@ public abstract class DashboardConstants {
        // Factor out method names used in multiple controllers
        public static final String VERSION_METHOD = "version";
        // Apps with metric panels
-       public static final String APP_NAME_AC = "AC";
        public static final String APP_NAME_MC = "MC";
+       public static final String APP_NAME_ML = "ML";
        // The role names are defined by ONAP Portal.
        // The prefix "ROLE_" is required by Spring.
        // These are used in Java code annotations that require constants.
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/A1MediatorApiBuilder.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/A1MediatorApiBuilder.java
deleted file mode 100644 (file)
index 4604e3c..0000000
+++ /dev/null
@@ -1,65 +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.portal.dashboard.model.RicInstance;
-import org.oransc.ric.portal.dashboard.model.RicRegionList;
-import org.oransc.ricplt.a1.client.api.A1MediatorApi;
-import org.oransc.ricplt.a1.client.invoker.ApiClient;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.util.DefaultUriBuilderFactory;
-
-/**
- * The OpenAPI generated API client code using Spring RestTemplate is not thread
- * safe according to https://github.com/swagger-api/swagger-codegen/issues/9222
- *
- * As a workaround this builder creates a new client at every request. If this
- * proves to be too slow then clients could be cached for each thread.
- */
-public class A1MediatorApiBuilder {
-
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-       private final String urlSuffix;
-       private final RicRegionList instanceConfig;
-
-       public A1MediatorApiBuilder(final RicRegionList instanceConfig, final String urlSuffix) {
-               logger.debug("ctor: suffix {}", urlSuffix);
-               this.instanceConfig = instanceConfig;
-               this.urlSuffix = urlSuffix;
-       }
-
-       private ApiClient apiClient(String instanceKey) {
-               RicInstance instance = instanceConfig.getInstance(instanceKey);
-               String url = new DefaultUriBuilderFactory(instance.getPltUrlPrefix().trim()).builder()
-                               .path(this.urlSuffix.trim()).build().normalize().toString();
-               logger.debug("apiClient URL {}", url);
-               return new ApiClient(new RestTemplate()).setBasePath(url);
-       }
-
-       public A1MediatorApi getA1MediatorApi(String instanceKey) {
-               return new A1MediatorApi(apiClient(instanceKey));
-       }
-
-}
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/A1MediatorConfiguration.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/A1MediatorConfiguration.java
deleted file mode 100644 (file)
index 2e8efb2..0000000
+++ /dev/null
@@ -1,61 +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.portal.dashboard.model.RicRegionList;
-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;
-
-/**
- * Creates an A1 mediator client builder as a bean to be managed by the Spring
- * container.
- */
-@Configuration
-@Profile("!test")
-public class A1MediatorConfiguration {
-
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-       // Populated by the autowired constructor
-       private final String urlSuffix;
-       private final RicRegionList instanceConfig;
-
-       @Autowired
-       public A1MediatorConfiguration(@Value("${a1med.url.suffix}") final String urlSuffix,
-                       final RicRegionList instanceConfig) {
-               logger.info("ctor: URL suffix {}", urlSuffix);
-               this.urlSuffix = urlSuffix;
-               this.instanceConfig = instanceConfig;
-       }
-
-       @Bean
-       // The bean (method) name must be globally unique
-       public A1MediatorApiBuilder a1MediatorApiBuilder() {
-               return new A1MediatorApiBuilder(instanceConfig, urlSuffix);
-       }
-
-}
index f1438d7..471002a 100644 (file)
@@ -25,7 +25,6 @@ import java.lang.reflect.InvocationTargetException;
 import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
 import org.oransc.ric.portal.dashboard.DashboardConstants;
 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.AppManagerController;
 import org.oransc.ric.portal.dashboard.controller.E2ManagerController;
@@ -93,7 +92,6 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
                        "/swagger-ui.html", //
                        "/webjars/**", //
                        PortalApiConstants.API_PREFIX + "/**", //
-                       A1MediatorController.CONTROLLER_PATH + "/" + DashboardConstants.VERSION_METHOD, //
                        AdminController.CONTROLLER_PATH + "/" + AdminController.HEALTH_METHOD, //
                        AdminController.CONTROLLER_PATH + "/" + AdminController.VERSION_METHOD, //
                        AppManagerController.CONTROLLER_PATH + "/" + DashboardConstants.RIC_INSTANCE_KEY + "/*/"
diff --git a/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/A1MediatorController.java b/dashboard/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/A1MediatorController.java
deleted file mode 100644 (file)
index c31fc0b..0000000
+++ /dev/null
@@ -1,138 +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.util.List;
-
-import org.oransc.ric.portal.dashboard.DashboardApplication;
-import org.oransc.ric.portal.dashboard.DashboardConstants;
-import org.oransc.ric.portal.dashboard.config.A1MediatorApiBuilder;
-import org.oransc.ric.portal.dashboard.model.SuccessTransport;
-import org.oransc.ricplt.a1.client.api.A1MediatorApi;
-import org.oransc.ricplt.a1.client.model.PolicyTypeSchema;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.annotation.Secured;
-import org.springframework.util.Assert;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-/**
- * Proxies calls from the front end to the A1 Mediator API to get and put
- * policies. All methods are deliberately kept ignorant of the data format.
- * 
- * 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.
- */
-@RestController
-@RequestMapping(value = A1MediatorController.CONTROLLER_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
-public class A1MediatorController {
-
-       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 + "/a1-p";
-       public static final String PP_TYPE_ID = "poltype";
-       public static final String PP_INST_ID = "polinst";
-       // The get- and put-instance methods use the same path
-       private static final String POLICY_INSTANCE_METHOD_PATH = /* controller path + */ DashboardConstants.RIC_INSTANCE_KEY
-                       + "/{" + DashboardConstants.RIC_INSTANCE_KEY + "}/" + PP_TYPE_ID + "/{" + PP_TYPE_ID + "}/" + PP_INST_ID
-                       + "/{" + PP_INST_ID + "}";
-
-       // Populated by the autowired constructor
-       private final A1MediatorApiBuilder a1MediatorClientBuilder;
-
-       @Autowired
-       public A1MediatorController(final A1MediatorApiBuilder a1MediatorApiBuilder) {
-               Assert.notNull(a1MediatorApiBuilder, "builder must not be null");
-               this.a1MediatorClientBuilder = a1MediatorApiBuilder;
-               if (logger.isDebugEnabled())
-                       logger.debug("ctor: configured with builder type {}", a1MediatorApiBuilder.getClass().getName());
-       }
-
-       @ApiOperation(value = "Gets the A1 client library MANIFEST.MF property Implementation-Version.", response = SuccessTransport.class)
-       @GetMapping(DashboardConstants.VERSION_METHOD)
-       // No role required
-       public SuccessTransport getA1MediatorClientVersion() {
-               return new SuccessTransport(200, DashboardApplication.getImplementationVersion(A1MediatorApi.class));
-       }
-
-       @ApiOperation(value = "Gets the registered policy type IDs from the A1 Mediator", response = Integer.class, responseContainer = "List")
-       @GetMapping(DashboardConstants.RIC_INSTANCE_KEY + "/{" + DashboardConstants.RIC_INSTANCE_KEY + "}/" + PP_TYPE_ID)
-       @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-       public List<Integer> getAllPolicyTypes(@PathVariable(DashboardConstants.RIC_INSTANCE_KEY) String instanceKey) {
-               logger.debug("getAllPolicyTypes: instance {}", instanceKey);
-               Object result = a1MediatorClientBuilder.getA1MediatorApi(instanceKey).a1ControllerGetAllPolicyTypes();
-               @SuppressWarnings("unchecked")
-               List<Integer> result2 = (List<Integer>) result;
-               return result2;
-       }
-
-       @ApiOperation(value = "Gets the specified policy type from the A1 Mediator", response = PolicyTypeSchema.class)
-       @GetMapping(DashboardConstants.RIC_INSTANCE_KEY + "/{" + DashboardConstants.RIC_INSTANCE_KEY + "}/" + PP_TYPE_ID
-                       + "/{" + PP_TYPE_ID + "}")
-       @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-       public PolicyTypeSchema getPolicyType(@PathVariable(DashboardConstants.RIC_INSTANCE_KEY) String instanceKey,
-                       @PathVariable(PP_TYPE_ID) Integer policyTypeId) {
-               logger.debug("getPolicyType: instance {} typeId {}", instanceKey, policyTypeId);
-               return a1MediatorClientBuilder.getA1MediatorApi(instanceKey).a1ControllerGetPolicyType(policyTypeId);
-       }
-
-       @ApiOperation(value = "Gets the specified policy instance from the A1 Mediator")
-       @GetMapping(POLICY_INSTANCE_METHOD_PATH)
-       @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
-       public Object getPolicyInstance(@PathVariable(DashboardConstants.RIC_INSTANCE_KEY) String instanceKey,
-                       @PathVariable(PP_TYPE_ID) Integer policyTypeId, //
-                       @PathVariable(PP_INST_ID) String policyInstanceId) {
-               logger.debug("getPolicyInstance: instance {} typeId {} instanceId {}", instanceKey, policyTypeId,
-                               policyInstanceId);
-               return a1MediatorClientBuilder.getA1MediatorApi(instanceKey).a1ControllerGetPolicyInstance(policyTypeId,
-                               policyInstanceId);
-       }
-
-       @ApiOperation(value = "Creates or replaces the specified policy instance at the A1 Mediator")
-       @PutMapping(POLICY_INSTANCE_METHOD_PATH)
-       @Secured({ DashboardConstants.ROLE_ADMIN })
-       public ResponseEntity<String> createPolicyInstance(
-                       @PathVariable(DashboardConstants.RIC_INSTANCE_KEY) String instanceKey,
-                       @PathVariable(PP_TYPE_ID) Integer policyTypeId, //
-                       @PathVariable(PP_INST_ID) String policyInstanceId,
-                       @ApiParam(value = "Policy body") @RequestBody String policyBody) {
-               logger.debug("createPolicyInstance: instance {} typeId {} instanceId {}", instanceKey, policyTypeId,
-                               policyInstanceId);
-               A1MediatorApi api = a1MediatorClientBuilder.getA1MediatorApi(instanceKey);
-               api.a1ControllerCreateOrReplacePolicyInstance(policyTypeId, policyInstanceId, policyBody);
-               return ResponseEntity.status(api.getApiClient().getStatusCode().value()).body(null);
-       }
-
-}
index 58e9481..1285a0b 100644 (file)
@@ -62,12 +62,12 @@ public class AdminController {
        public static final String VERSION_METHOD = DashboardConstants.VERSION_METHOD;
        public static final String XAPPMETRICS_METHOD = "metrics";
 
-       @Value("${metrics.url.ac}")
-       private String acAppMetricsUrl;
-
        @Value("${metrics.url.mc}")
        private String mcAppMetricsUrl;
 
+       @Value("${metrics.url.ml}")
+       private String mlAppMetricsUrl;
+
        @Autowired
        private DashboardUserManager dashboardUserManager;
 
@@ -114,10 +114,10 @@ public class AdminController {
        @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD })
        public ResponseEntity<Object> getAppMetricsUrl(@RequestParam String app) {
                String metricsUrl = null;
-               if (DashboardConstants.APP_NAME_AC.equals(app))
-                       metricsUrl = acAppMetricsUrl;
-               else if (DashboardConstants.APP_NAME_MC.equals(app))
+               if (DashboardConstants.APP_NAME_MC.equals(app))
                        metricsUrl = mcAppMetricsUrl;
+               else if (DashboardConstants.APP_NAME_ML.equals(app))
+                       metricsUrl = mlAppMetricsUrl;
                logger.debug("getAppMetricsUrl: app {} metricsurl {}", app, metricsUrl);
                if (metricsUrl != null)
                        return new ResponseEntity<>(new SuccessTransport(HttpStatus.OK.ordinal(), metricsUrl), HttpStatus.OK);
index da8fe99..9a327eb 100644 (file)
@@ -82,8 +82,8 @@ mock:
 # Kibana report on metrics
 metrics:
     url:
-        ac: http://jar-app-props-kibana-url-ac
         mc: http://jar-app-props-kibana-url-mc
+        ml: http://jar-app-props-kibana-url-ml
 
 # Regions and instances
 # The regions are a just convenience for users,
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/A1MediatorMockConfiguration.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/A1MediatorMockConfiguration.java
deleted file mode 100644 (file)
index b1ff3f9..0000000
+++ /dev/null
@@ -1,152 +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.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-import java.lang.invoke.MethodHandles;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.oransc.ric.portal.dashboard.TestUtils;
-import org.oransc.ricplt.a1.client.api.A1MediatorApi;
-import org.oransc.ricplt.a1.client.invoker.ApiClient;
-import org.oransc.ricplt.a1.client.model.PolicyTypeSchema;
-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;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-/**
- * Creates a mock implementation of the A1 mediator client builder with mock
- * methods that answer Admission Control mock data.
- */
-@Configuration
-@Profile("test")
-public class A1MediatorMockConfiguration {
-
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-       // A "control" is an element in the XApp descriptor
-       public static final String AC_CONTROL_NAME = "admission_control_policy";
-       public static final Integer ADMISSION_CONTROL_POLICY_ID = 21000;
-
-       // Simulate remote method delay for UI testing
-       private final int delayMs;
-
-       // Mock values
-       private final List<Integer> policyTypeIds;
-       private final PolicyTypeSchema rateControlPolicyType;
-       private final Map<String, String> appPolicyMap;
-
-       public A1MediatorMockConfiguration(@Value("${mock.config.delay:0}") int delayMs)
-                       throws IOException, JsonParseException, JsonMappingException {
-               logger.debug("ctor: configured with delay {}", delayMs);
-               this.delayMs = delayMs;
-               policyTypeIds = new ArrayList<>();
-               policyTypeIds.add(ADMISSION_CONTROL_POLICY_ID);
-               ObjectMapper mapper = new ObjectMapper();
-               final String policyType = TestUtils.readDataFromPath("rate-control-policy-type.json");
-               rateControlPolicyType = mapper.readValue(policyType, PolicyTypeSchema.class);
-               final String policyInstance = TestUtils.readDataFromPath("rate-control-policy-instance.json");
-               appPolicyMap = new HashMap<>();
-               appPolicyMap.put(AC_CONTROL_NAME, policyInstance);
-       }
-
-       private void delay() throws InterruptedException {
-               if (delayMs > 0) {
-                       logger.debug("delay: sleeping {}", delayMs);
-                       Thread.sleep(delayMs);
-               }
-       }
-
-       private ApiClient apiClient() {
-               ApiClient mockClient = mock(ApiClient.class);
-               when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
-               return mockClient;
-       }
-
-       private A1MediatorApi a1MediatorApi(String instanceKey) {
-               logger.debug("a1MediatorApi: instance {}", instanceKey);
-               ApiClient apiClient = apiClient();
-               A1MediatorApi mockApi = mock(A1MediatorApi.class);
-               when(mockApi.getApiClient()).thenReturn(apiClient);
-               doAnswer(inv -> {
-                       delay();
-                       return policyTypeIds;
-               }).when(mockApi).a1ControllerGetAllPolicyTypes();
-               doAnswer(inv -> {
-                       delay();
-                       Integer policyTypeId = inv.<Integer>getArgument(0);
-                       if (policyTypeId.compareTo(ADMISSION_CONTROL_POLICY_ID) != 0)
-                               throw new IllegalArgumentException("Unexpected policy type: " + policyTypeId);
-                       return rateControlPolicyType;
-               }).when(mockApi).a1ControllerGetPolicyType(any(Integer.class));
-               doAnswer(inv -> {
-                       delay();
-                       Integer policyTypeId = inv.<Integer>getArgument(0);
-                       if (policyTypeId.compareTo(ADMISSION_CONTROL_POLICY_ID) != 0)
-                               throw new IllegalArgumentException("Unexpected policy type: " + policyTypeId);
-                       String policyInstId = inv.<String>getArgument(1);
-                       if (!AC_CONTROL_NAME.equals(policyInstId))
-                               throw new IllegalArgumentException("Unexpected policy instance: " + policyInstId);
-                       return appPolicyMap.get(policyInstId);
-               }).when(mockApi).a1ControllerGetPolicyInstance(any(Integer.class), any(String.class));
-               doAnswer(inv -> {
-                       delay();
-                       Integer policyTypeId = inv.<Integer>getArgument(0);
-                       if (policyTypeId.compareTo(ADMISSION_CONTROL_POLICY_ID) != 0)
-                               throw new IllegalArgumentException("Unexpected policy type: " + policyTypeId);
-                       String policyInstId = inv.<String>getArgument(1);
-                       if (!AC_CONTROL_NAME.equals(policyInstId))
-                               throw new IllegalArgumentException("Unexpected policy instance: " + policyInstId);
-                       String policy = inv.<String>getArgument(2);
-                       appPolicyMap.put(policyInstId, policy);
-                       return null;
-               }).when(mockApi).a1ControllerCreateOrReplacePolicyInstance(any(Integer.class), any(String.class),
-                               any(Object.class));
-               return mockApi;
-       }
-
-       @Bean
-       // Must use the same name as the non-mock configuration
-       public A1MediatorApiBuilder a1MediatorApiBuilder() {
-               final A1MediatorApiBuilder mockBuilder = mock(A1MediatorApiBuilder.class);
-               for (final String key : RICInstanceMockConfiguration.INSTANCE_KEYS) {
-                       final A1MediatorApi mockApi = a1MediatorApi(key);
-                       when(mockBuilder.getA1MediatorApi(key)).thenReturn(mockApi);
-               }
-               return mockBuilder;
-       }
-
-}
index 32a775f..341df53 100644 (file)
@@ -97,7 +97,7 @@ public class AppManagerMockConfiguration {
        private XappApi xappApi(String instanceKey) {
                logger.debug("Creating XappApi for instance {}", instanceKey);
                // Create instance-specific objects
-               String[] appNames = { "AdmissionControl " + instanceKey, "UE Event Collector " + instanceKey };
+               String[] appNames = { "Measurement Campaign " + instanceKey, "UE Event Collector " + instanceKey };
                final String configJson = " { \"config\" : \"example-" + instanceKey + "\"}";
                final ConfigValidationErrors configValErrs = new ConfigValidationErrors();
                configValErrs.add(new ConfigValidationError().field("mock error"));
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/test/A1MediatorConfigTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/test/A1MediatorConfigTest.java
deleted file mode 100644 (file)
index cdea6d4..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2020 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.test;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.oransc.ric.portal.dashboard.config.A1MediatorApiBuilder;
-import org.oransc.ric.portal.dashboard.config.RICInstanceMockConfiguration;
-import org.oransc.ricplt.a1.client.api.A1MediatorApi;
-
-public class A1MediatorConfigTest extends AbstractConfigTest {
-
-       @Test
-       public void builderTest() {
-               A1MediatorApiBuilder builder = new A1MediatorApiBuilder(instanceConfig, "suffix");
-               A1MediatorApi a1Api = builder.getA1MediatorApi(RICInstanceMockConfiguration.INSTANCE_KEY_1);
-               Assertions.assertNotNull(a1Api);
-       }
-
-}
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/A1MediatorControllerTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/A1MediatorControllerTest.java
deleted file mode 100644 (file)
index 2a9b820..0000000
+++ /dev/null
@@ -1,109 +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.io.IOException;
-import java.lang.invoke.MethodHandles;
-import java.net.URI;
-import java.util.List;
-
-import org.junit.Assert;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.oransc.ric.portal.dashboard.DashboardConstants;
-import org.oransc.ric.portal.dashboard.config.A1MediatorMockConfiguration;
-import org.oransc.ric.portal.dashboard.config.RICInstanceMockConfiguration;
-import org.oransc.ric.portal.dashboard.model.SuccessTransport;
-import org.oransc.ricplt.a1.client.model.PolicyTypeSchema;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class A1MediatorControllerTest extends AbstractControllerTest {
-
-       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-       @Test
-       public void versionTest() {
-               URI uri = buildUri(null, A1MediatorController.CONTROLLER_PATH, DashboardConstants.VERSION_METHOD);
-               logger.info("Invoking {}", uri);
-               SuccessTransport st = restTemplate.getForObject(uri, SuccessTransport.class);
-               Assertions.assertFalse(st.getData().toString().isEmpty());
-       }
-
-       @Test
-       public void getTypeIdsTest() throws IOException {
-               URI uri = buildUri(null, A1MediatorController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY,
-                               RICInstanceMockConfiguration.INSTANCE_KEY_1, A1MediatorController.PP_TYPE_ID);
-               logger.info("Invoking {}", uri);
-               ResponseEntity<List<Integer>> response = testRestTemplateStandardRole().exchange(uri, HttpMethod.GET, null,
-                               new ParameterizedTypeReference<List<Integer>>() {
-                               });
-               Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
-               Assert.assertFalse(response.getBody().isEmpty());
-       }
-
-       @Test
-       public void getPolicyTypeTest() throws IOException {
-               URI uri = buildUri(null, A1MediatorController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY,
-                               RICInstanceMockConfiguration.INSTANCE_KEY_1, A1MediatorController.PP_TYPE_ID,
-                               Integer.toString(A1MediatorMockConfiguration.ADMISSION_CONTROL_POLICY_ID));
-               logger.info("Invoking {}", uri);
-               ResponseEntity<PolicyTypeSchema> response = testRestTemplateStandardRole().exchange(uri, HttpMethod.GET, null,
-                               PolicyTypeSchema.class);
-               Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
-               Assert.assertFalse(response.getBody().getName().isEmpty());
-       }
-
-       @Test
-       public void getInstanceTest() throws IOException {
-               URI uri = buildUri(null, A1MediatorController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY,
-                               RICInstanceMockConfiguration.INSTANCE_KEY_1, A1MediatorController.PP_TYPE_ID,
-                               Integer.toString(A1MediatorMockConfiguration.ADMISSION_CONTROL_POLICY_ID),
-                               A1MediatorController.PP_INST_ID, A1MediatorMockConfiguration.AC_CONTROL_NAME);
-               logger.info("Invoking {}", uri);
-               ResponseEntity<String> response = testRestTemplateStandardRole().exchange(uri, HttpMethod.GET, null,
-                               String.class);
-               Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
-               Assert.assertFalse(response.getBody().isEmpty());
-       }
-
-       @Test
-       public void putInstanceTest() throws IOException {
-               URI uri = buildUri(null, A1MediatorController.CONTROLLER_PATH, DashboardConstants.RIC_INSTANCE_KEY,
-                               RICInstanceMockConfiguration.INSTANCE_KEY_1, A1MediatorController.PP_TYPE_ID,
-                               Integer.toString(A1MediatorMockConfiguration.ADMISSION_CONTROL_POLICY_ID),
-                               A1MediatorController.PP_INST_ID, A1MediatorMockConfiguration.AC_CONTROL_NAME);
-               ObjectMapper mapper = new ObjectMapper();
-               JsonNode body = mapper.readTree("{ \"policy\" : true }");
-               HttpEntity<JsonNode> entity = new HttpEntity<>(body);
-               logger.info("Invoking {} with body {}", uri, body);
-               ResponseEntity<Void> voidResponse = testRestTemplateAdminRole().exchange(uri, HttpMethod.PUT, entity,
-                               Void.class);
-               Assertions.assertTrue(voidResponse.getStatusCode().is2xxSuccessful());
-       }
-
-}
index fa1a832..152d14b 100644 (file)
@@ -92,7 +92,7 @@ public class AdminControllerTest extends AbstractControllerTest {
                URI uri;
 
                metricsQueryParms.clear();
-               metricsQueryParms.put("app", DashboardConstants.APP_NAME_AC);
+               metricsQueryParms.put("app", DashboardConstants.APP_NAME_MC);
                uri = buildUri(metricsQueryParms, AdminController.CONTROLLER_PATH, AdminController.XAPPMETRICS_METHOD);
                logger.debug("Invoking {}", uri);
                ResponseEntity<SuccessTransport> successResponse = testRestTemplateStandardRole().exchange(uri, HttpMethod.GET,
@@ -101,7 +101,7 @@ public class AdminControllerTest extends AbstractControllerTest {
                Assertions.assertTrue(successResponse.getStatusCode().is2xxSuccessful());
 
                metricsQueryParms.clear();
-               metricsQueryParms.put("app", DashboardConstants.APP_NAME_MC);
+               metricsQueryParms.put("app", DashboardConstants.APP_NAME_ML);
                logger.debug("Invoking {}", uri);
                successResponse = testRestTemplateStandardRole().exchange(uri, HttpMethod.GET, null, SuccessTransport.class);
                Assertions.assertFalse(successResponse.getBody().getData().toString().isEmpty());
diff --git a/dashboard/webapp-backend/src/test/resources/rate-control-policy-instance.json b/dashboard/webapp-backend/src/test/resources/rate-control-policy-instance.json
deleted file mode 100644 (file)
index d8742ff..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-       "class": 12,
-       "enforce": true,
-       "window_length": 20,
-       "blocking_rate": 20,
-       "trigger_threshold": 10
-}
diff --git a/dashboard/webapp-backend/src/test/resources/rate-control-policy-type.json b/dashboard/webapp-backend/src/test/resources/rate-control-policy-type.json
deleted file mode 100644 (file)
index 7abf932..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-       "name": "Policy for Rate Control",
-       "policy_type_id": 21000,
-       "description": "This policy is associated with rate control. An instance of the policy specifies the traffic class to which it applies and parameters to use to control how much it must be throttled in case of an overload. Each instance of the policy that is created MUST be associated with a unique class ID (identifyed by the key 'class', which is used by the xAPP to differentiate traffic. If an agent tries to create a policy with the SAME class id, it will be rejected by the xAPP, even if it has a unique policy instance id. ",
-       "create_schema": {
-               "$schema": "http://json-schema.org/draft-07/schema#",
-               "type": "object",
-               "additionalProperties": false,
-               "properties": {
-                       "class": {
-                               "type": "integer",
-                               "minimum": 1,
-                               "maximum": 256,
-                               "description": "integer id representing class to which we are applying policy"
-                       },
-                       "enforce": {
-                               "type": "boolean",
-                               "description": "Whether to enable or disable enforcement of policy on this class"
-                       },
-                       "window_length": {
-                               "type": "integer",
-                               "minimum": 15,
-                               "maximum": 300,
-                               "description": "Sliding window length in seconds"
-                       },
-                       "trigger_threshold": {
-                               "type": "integer",
-                               "minimum": 1
-                       },
-                       "blocking_rate": {
-                               "type": "number",
-                               "minimum": 0,
-                               "maximum": 100
-                       }
-               },
-               "required": [
-                       "class",
-                       "enforce",
-                       "blocking_rate",
-                       "trigger_threshold",
-                       "window_length"
-               ]
-       }
-}
\ No newline at end of file
diff --git a/dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.html b/dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.html
deleted file mode 100644 (file)
index 5b55753..0000000
+++ /dev/null
@@ -1,60 +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="ac__section">
-  <h3 class="rd-global-page-title">Admission Control xApp Policy</h3>
-
-  <form [formGroup]="acForm" novalidate autocomplete="off" (ngSubmit)="updateAc(acForm.value)">
-    <div name="enforce">
-      <mat-checkbox formControlName="enforce">Enforce</mat-checkbox>
-    </div>
-    <mat-form-field class="input-display-block">
-      <input matInput type="text" placeholder="Traffic class" formControlName="class">
-      <mat-hint align="end">Traffic class ID (1-256)</mat-hint>
-      <mat-error *ngIf="validateControl('window_length') && hasError('window_length', 'required')">Number is required
-      </mat-error>
-      <mat-error *ngIf="hasError('window_length', 'pattern')">Valid number is required</mat-error>
-    </mat-form-field>
-    <mat-form-field class="input-display-block">
-      <input matInput type="text" placeholder="Window length" formControlName="window_length">
-      <mat-hint align="end">Sliding window length in minutes (15-300)</mat-hint>
-      <mat-error *ngIf="validateControl('window_length') && hasError('window_length', 'required')">Number is required
-      </mat-error>
-      <mat-error *ngIf="hasError('window_length', 'pattern')">Valid number is required</mat-error>
-    </mat-form-field>
-    <mat-form-field class="input-display-block">
-      <input matInput type="text" placeholder="Blocking rate" formControlName="blocking_rate">
-      <mat-hint align="end">Connections to block when triggered (1-100)</mat-hint>
-      <mat-error *ngIf="validateControl('blocking_rate') && hasError('blocking_rate', 'required')">Number is required
-      </mat-error>
-      <mat-error *ngIf="hasError('blocking_rate', 'pattern')">Valid number is required</mat-error>
-    </mat-form-field>
-    <mat-form-field class="input-display-block">
-      <input matInput type="text" placeholder="Trigger threshold" formControlName="trigger_threshold">
-      <mat-hint align="end">Number of events in window to trigger blocking (min 1)</mat-hint>
-      <mat-error *ngIf="validateControl('trigger_threshold') && hasError('trigger_threshold', 'required')">Number is
-        required</mat-error>
-      <mat-error *ngIf="hasError('trigger_threshold', 'pattern')">Valid number is required</mat-error>
-    </mat-form-field>
-    <div class="input-display-block">
-      <button class="mat-raised-button mat-primary update-button" [disabled]="!acForm.valid">Update</button>
-    </div>
-</form>
-
-</div>
diff --git a/dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.scss b/dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.scss
deleted file mode 100644 (file)
index 185a48f..0000000
+++ /dev/null
@@ -1,38 +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===================================
- */
-
- .ac__section {
-}
-
- /* used to place form fields on separate lines/rows */
-.input-display-block {
-  display: block;
-  width: 400px;
-}
-
-.version__text {
-  color: gray;
-  font-size: 10px;
-}
-
-.update-button {
-  margin-top: 10px;
-  float: right;
-}
diff --git a/dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.spec.ts b/dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.spec.ts
deleted file mode 100644 (file)
index a8329a5..0000000
+++ /dev/null
@@ -1,45 +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 { AcXappComponent } from './ac-xapp.component';
-
-describe('AcXappComponent', () => {
-  let component: AcXappComponent;
-  let fixture: ComponentFixture<AcXappComponent>;
-
-  beforeEach(async(() => {
-    TestBed.configureTestingModule({
-      declarations: [ AcXappComponent ]
-    })
-    .compileComponents();
-  }));
-
-  beforeEach(() => {
-    fixture = TestBed.createComponent(AcXappComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});
diff --git a/dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.ts b/dashboard/webapp-frontend/src/app/ac-xapp/ac-xapp.component.ts
deleted file mode 100644 (file)
index 12caad7..0000000
+++ /dev/null
@@ -1,121 +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 } from '@angular/common/http';
-import { Component, OnDestroy, OnInit } from '@angular/core';
-import { FormControl, FormGroup, Validators } from '@angular/forms';
-import { Subscription } from 'rxjs';
-import { ACAdmissionIntervalControl } from '../interfaces/ac-xapp.types';
-import { RicInstance } from '../interfaces/dashboard.types';
-import { ACXappService } from '../services/ac-xapp/ac-xapp.service';
-import { InstanceSelectorService } from '../services/instance-selector/instance-selector.service';
-import { ErrorDialogService } from '../services/ui/error-dialog.service';
-import { NotificationService } from '../services/ui/notification.service';
-
-@Component({
-  selector: 'rd-ac-xapp',
-  templateUrl: './ac-xapp.component.html',
-  styleUrls: ['./ac-xapp.component.scss']
-})
-export class AcXappComponent implements OnInit, OnDestroy {
-
-  //declare acForm as Public variable. Private variables should not be used in template HTML
-  acForm: FormGroup;
-  private instanceChange: Subscription;
-  private instanceKey: string;
-
-  constructor(
-    private acXappService: ACXappService,
-    private errorDialogService: ErrorDialogService,
-    private notificationService: NotificationService,
-    public instanceSelectorService: InstanceSelectorService, ) { }
-
-  ngOnInit() {
-    this.acForm = new FormGroup({
-      // Names must match the ACAdmissionIntervalControl interface
-      enforce: new FormControl(true, [Validators.required]),
-      class: new FormControl('', [Validators.required, Validators.min(1), Validators.max(256)]),
-      window_length: new FormControl('', [Validators.required, Validators.min(15), Validators.max(300)]),
-      blocking_rate: new FormControl('', [Validators.required, Validators.min(0), Validators.max(100)]),
-      trigger_threshold: new FormControl('', [Validators.required, Validators.min(1)])
-    });
-
-    this.instanceChange = this.instanceSelectorService.getSelectedInstance().subscribe((instance: RicInstance) => {
-      if (instance.key) {
-        // TODO: show pending action indicator
-        this.instanceKey = instance.key;
-        this.acXappService.getPolicy(instance.key).subscribe((res: ACAdmissionIntervalControl) => {
-          this.acForm.controls['class'].setValue(res.class);
-          this.acForm.controls['enforce'].setValue(res.enforce);
-          this.acForm.controls['window_length'].setValue(res.window_length);
-          this.acForm.controls['blocking_rate'].setValue(res.blocking_rate);
-          this.acForm.controls['trigger_threshold'].setValue(res.trigger_threshold);
-          // TODO: clear pending action indicator
-        },
-          (error: HttpErrorResponse) => {
-            // TODO: clear pending action indicator
-            this.errorDialogService.displayError(error.message);
-          });
-      }
-    });
-  }
-
-  ngOnDestroy() {
-    this.instanceChange.unsubscribe();
-  }
-
-  updateAc = (acFormValue: ACAdmissionIntervalControl) => {
-    if (this.acForm.valid) {
-      // convert strings to numbers using the plus operator
-      const acFormValueConverted = {
-        class: +acFormValue.class,
-        enforce: acFormValue.enforce,
-        window_length: +acFormValue.window_length,
-        blocking_rate: +acFormValue.blocking_rate,
-        trigger_threshold: +acFormValue.trigger_threshold
-      };
-      this.acXappService.putPolicy(this.instanceKey, acFormValueConverted).subscribe(
-        response => {
-          if (response.status === 200) {
-            this.notificationService.success('AC update policy succeeded!');
-          }
-        },
-        (error => {
-          this.errorDialogService.displayError('AC update policy failed: ' + error.message);
-        })
-      );
-    }
-  }
-
-  hasError(controlName: string, errorName: string) {
-    if (this.acForm.controls[controlName].hasError(errorName)) {
-      return true;
-    }
-    return false;
-  }
-
-  validateControl(controlName: string) {
-    if (this.acForm.controls[controlName].invalid && this.acForm.controls[controlName].touched) {
-      return true;
-    }
-    return false;
-  }
-
-}
index fd2b26c..75044a3 100644 (file)
@@ -74,13 +74,7 @@ export class AppControlComponent implements OnInit, OnDestroy {
 
   controlApp(app: XappControlRow): void {
     // 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]/;
-    if (acAppPattern0.test(app.xapp) || acAppPattern1.test(app.xapp)) {
-      this.router.navigate(['/ac']);
-    } else {
-      this.errorDialogService.displayError('No control available for ' + app.xapp + ' (yet)');
-    }
+    this.errorDialogService.displayError('No control available for ' + app.xapp + ' (yet)');
   }
 
   onUndeployApp(app: XappControlRow): void {
diff --git a/dashboard/webapp-frontend/src/app/interfaces/ac-xapp.types.ts b/dashboard/webapp-frontend/src/app/interfaces/ac-xapp.types.ts
deleted file mode 100644 (file)
index 6609356..0000000
+++ /dev/null
@@ -1,34 +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===================================
- */
-
-// Models of data used by the AC xApp
-
-export interface ACAdmissionIntervalControl {
-  class: number;
-  enforce: boolean;
-  window_length: number;
-  blocking_rate: number;
-  trigger_threshold: number;
-}
-
-export interface ACAdmissionIntervalControlAck {
-  status: string;
-  message: string;
-}
index af8ec2e..3cc2d97 100644 (file)
@@ -21,7 +21,6 @@ import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { Routes, RouterModule } from '@angular/router';
 
-import { AcXappComponent } from './ac-xapp/ac-xapp.component';
 import { CatalogComponent } from './catalog/catalog.component';
 import { ControlComponent } from './control/control.component';
 import { MainComponent } from './main/main.component';
@@ -33,7 +32,6 @@ const routes: Routes = [
     {path: '', component: MainComponent},
     {path: 'catalog', component: CatalogComponent},
     {path: 'control', component: ControlComponent},
-    {path: 'ac', component: AcXappComponent},
     {path: 'stats', component: StatsComponent},
     {path: 'platform', component: PlatformComponent},
     {path: 'user', component: UserComponent},
index 0a1e2bf..67fc971 100644 (file)
@@ -54,7 +54,6 @@ import { NgModule } from '@angular/core';
 import { ToastrModule } from 'ngx-toastr';
 
 // RD components
-import { AcXappComponent } from './ac-xapp/ac-xapp.component';
 import { AddDashboardUserDialogComponent } from './user/add-dashboard-user-dialog/add-dashboard-user-dialog.component';
 import { AppConfigurationComponent } from './app-configuration/app-configuration.component';
 import { AppControlComponent } from './app-control/app-control.component';
@@ -92,7 +91,6 @@ import { UiService } from './services/ui/ui.service';
 
 @NgModule({
   declarations: [
-    AcXappComponent,
     AddDashboardUserDialogComponent,
     AppConfigurationComponent,
     AppControlComponent,
diff --git a/dashboard/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.spec.ts b/dashboard/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.spec.ts
deleted file mode 100644 (file)
index b3bf4d4..0000000
+++ /dev/null
@@ -1,31 +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 { ACXappService } from './ac-xapp.service';
-
-describe('ACXappService', () => {
-  beforeEach(() => TestBed.configureTestingModule({}));
-
-  it('should be created', () => {
-    const service: ACXappService = TestBed.get(ACXappService);
-    expect(service).toBeTruthy();
-  });
-});
diff --git a/dashboard/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts b/dashboard/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts
deleted file mode 100644 (file)
index dbe4cd6..0000000
+++ /dev/null
@@ -1,81 +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 { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-import { Observable } from 'rxjs';
-import { map } from 'rxjs/operators';
-import { ACAdmissionIntervalControl, ACAdmissionIntervalControlAck } from '../../interfaces/ac-xapp.types';
-import { DashboardSuccessTransport } from '../../interfaces/dashboard.types';
-import { DashboardService } from '../dashboard/dashboard.service';
-
-/**
- * Services for calling the Dashboard's A1 endpoints to get/put AC policies.
- */
-@Injectable({
-  providedIn: 'root'
-})
-export class ACXappService {
-
-  private component = 'a1-p';
-  private policyTypePath = 'poltype';
-  private policyInstPath = 'polinst';
-  private acPolicyType = '21000';
-  private acPolicyInst = 'admission_control_policy';
-
-  constructor(
-    private dashboardSvc: DashboardService,
-    private httpClient: HttpClient) {
-  }
-
-  /**
-   * Gets AC client version details
-   * @returns Observable that yields a String
-   */
-  getVersion(instanceKey: string): Observable<string> {
-    const path = this.dashboardSvc.buildPath(this.component, null, 'version');
-    return this.httpClient.get<DashboardSuccessTransport>(path).pipe(
-      // Extract the string here
-      map(res => res['data'])
-    );
-  }
-
-  /**
-   * Gets admission control policy.
-   * @returns Observable that yields an ACAdmissionIntervalControl
-   */
-  getPolicy(instanceKey: string): Observable<ACAdmissionIntervalControl> {
-    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.policyTypePath, this.acPolicyType,
-      this.policyInstPath, this.acPolicyInst);
-    return this.httpClient.get<ACAdmissionIntervalControl>(path);
-  }
-
-  /**
-   * Puts admission control policy.
-   * @param policy an instance of ACAdmissionIntervalControl
-   * @returns Observable that yields a response code, no data
-   */
-  putPolicy(instanceKey: string, policy: ACAdmissionIntervalControl): Observable<any> {
-    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.policyTypePath, this.acPolicyType,
-      this.policyInstPath, this.acPolicyInst);
-    return this.httpClient.put<ACAdmissionIntervalControlAck>(path, policy, { observe: 'response' });
-  }
-
-}
index 16d07de..798d557 100644 (file)
        <h3 class="rd-global-page-title">Platform stats</h3>
 
        <mat-tab-group>
-               <mat-tab label="AC xApp">
+               <mat-tab label="MC xApp">
                        <mat-grid-list cols="3" rowHeight="3:2">
                                <mat-grid-tile>
                                        <mat-card>
-                                               <iframe [src]="metricsUrlAc"></iframe>
+                                               <iframe [src]="metricsUrlMc"></iframe>
                                        </mat-card>
                                </mat-grid-tile>
                        </mat-grid-list>
                </mat-tab>
-               <mat-tab label="MC xApp">
+               <mat-tab label="ML xApp">
                        <mat-grid-list cols="3" rowHeight="3:2">
                                <mat-grid-tile>
                                        <mat-card>
-                                               <iframe [src]="metricsUrlMc"></iframe>
+                                               <iframe [src]="metricsUrlMl"></iframe>
                                        </mat-card>
                                </mat-grid-tile>
                        </mat-grid-list>
index 558b176..2993056 100644 (file)
@@ -21,7 +21,6 @@ import { Component, OnInit, ViewChildren, QueryList } from '@angular/core';
 import { BaseChartDirective } from 'ng2-charts/ng2-charts';
 import { StatsService } from '../services/stats/stats.service';
 import { HttpClient } from '@angular/common/http';
-import { map } from 'rxjs/operators';
 import { DashboardSuccessTransport } from '../interfaces/dashboard.types';
 import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
 
@@ -34,8 +33,8 @@ export class StatsComponent implements OnInit {
 
     @ViewChildren(BaseChartDirective) charts: QueryList<BaseChartDirective>;
     checked = false;
-    metricsUrlAc: SafeResourceUrl;
     metricsUrlMc: SafeResourceUrl;
+    metricsUrlMl: SafeResourceUrl;
 
     constructor(private service: StatsService,
         private httpClient: HttpClient,
@@ -43,12 +42,12 @@ export class StatsComponent implements OnInit {
     }
 
     ngOnInit() {
-        this.service.getAppMetricsUrl('AC').subscribe((res: DashboardSuccessTransport) => {
-            this.metricsUrlAc = this.sanitize.bypassSecurityTrustResourceUrl(res.data);
-        });
         this.service.getAppMetricsUrl('MC').subscribe((res: DashboardSuccessTransport) => {
             this.metricsUrlMc = this.sanitize.bypassSecurityTrustResourceUrl(res.data);
         });
+        this.service.getAppMetricsUrl('ML').subscribe((res: DashboardSuccessTransport) => {
+            this.metricsUrlMl = this.sanitize.bypassSecurityTrustResourceUrl(res.data);
+        });
     }
 
 }
index 2587df1..6d02d66 100644 (file)
@@ -23,9 +23,6 @@
     <div class="card_item">
       <mat-icon>wifi</mat-icon> UE Event Collector
     </div>
-    <div class="card_item">
-      <mat-icon>check_box</mat-icon> Admission Control
-    </div>
     <div class="card_item">
       <mat-icon>open_in_new</mat-icon> Deploy
     </div>
index 03c6eb7..1a30449 100644 (file)
@@ -5,9 +5,11 @@
 RIC Dashboard Release Notes
 ===========================
 
-Version 2.0.1, 26 Feb 2020
+Version 2.0.1, 28 Feb 2020
 --------------------------
 * Revise controllers to use ResponseEntity
+* Drop AC xApp control/config screen from front-end
+* Drop A1 Mediator controller and tests from back-end
 * Upgrade to Spring-Boot 2.2.4.RELEASE
 
 Version 2.0.0, 5 Feb 2020