Non-RT RIC Dashboard
First commit
Change-Id: I9e140d31d65d13df3ce07f6b87eac250ee952eab
Issue-ID: NONRTRIC-61
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java
new file mode 100644
index 0000000..df1a51c
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java
@@ -0,0 +1,69 @@
+/*-
+ * ========================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;
+
+import java.lang.invoke.MethodHandles;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
+
+/**
+ * This class supports front-end web development. Placing this class in the test
+ * area allows excluding the mock configuration classes and the Mockito
+ * dependencies from the packaged version of the app.
+ *
+ * To launch a development server set the environment variable as listed below.
+ * This runs a Spring-Boot server with mock back-end beans, and keeps the server
+ * alive for manual testing. Supply this JVM argument:
+ *
+ * <pre>
+ * -Dorg.oransc.ric.portal.dashboard=mock
+ * </pre>
+ */
+@ExtendWith(SpringExtension.class)
+@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
+@ActiveProfiles("test")
+public class DashboardTestServer {
+
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ /*
+ * Keeps the test server alive forever. Use a guard so this test is never run by
+ * Jenkins.
+ */
+ @EnabledIfSystemProperty(named = "org.oransc.ric.portal.dashboard", matches = "mock")
+ @Test
+ public void keepServerAlive() {
+ logger.warn("Keeping server alive!");
+ try {
+ synchronized (this) {
+ this.wait();
+ }
+ } catch (Exception ex) {
+ logger.warn(ex.toString());
+ }
+ }
+}
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/A1ControllerMockConfiguration.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/A1ControllerMockConfiguration.java
new file mode 100644
index 0000000..b056cb5
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/A1ControllerMockConfiguration.java
@@ -0,0 +1,424 @@
+/*-
+ * ========================LICENSE_START=================================
+ * O-RAN-SC
+ * %%
+ * Copyright (C) 2019 Nordix Foundation
+ * %%
+ * 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.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+import org.oransc.ric.a1controller.client.api.A1ControllerApi;
+import org.oransc.ric.a1controller.client.invoker.ApiClient;
+import org.oransc.ric.a1controller.client.model.InputNRRidPTidPIidPISchema;
+import org.oransc.ric.a1controller.client.model.InputNRRidPTidPIidSchema;
+import org.oransc.ric.a1controller.client.model.InputNRRidPTidSchema;
+import org.oransc.ric.a1controller.client.model.InputNRRidSchema;
+import org.oransc.ric.a1controller.client.model.OutputDescNamePTSchema;
+import org.oransc.ric.a1controller.client.model.OutputDescNamePTSchemaOutput;
+import org.oransc.ric.a1controller.client.model.OutputPISchema;
+import org.oransc.ric.a1controller.client.model.OutputPISchemaOutput;
+import org.oransc.ric.a1controller.client.model.OutputPIidsListSchema;
+import org.oransc.ric.a1controller.client.model.OutputPIidsListSchemaOutput;
+import org.oransc.ric.a1controller.client.model.OutputPTidsListSchema;
+import org.oransc.ric.a1controller.client.model.OutputPTidsListSchemaOutput;
+import org.oransc.ric.portal.dashboard.model.PolicyType;
+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.JsonProcessingException;
+
+/**
+ * Creates a mock implementation of the A1 controller client API.
+ */
+@Profile("test")
+@Configuration
+public class A1ControllerMockConfiguration {
+
+ 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";
+
+ // Simulate remote method delay for UI testing
+ @Value("${mock.config.delay:0}")
+ private int delayMs;
+
+ public A1ControllerMockConfiguration() {
+ logger.info("Configuring mock A1 Mediator");
+ }
+
+ 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 A1ControllerApi a1ControllerApi() {
+ ApiClient apiClient = apiClient();
+ A1ControllerApi mockApi = mock(A1ControllerApi.class);
+
+ when(mockApi.getApiClient()).thenReturn(apiClient);
+
+ doAnswer(inv -> {
+ if (delayMs > 0) {
+ logger.debug("a1ControllerGetHandler sleeping {}", delayMs);
+ Thread.sleep(delayMs);
+ }
+ List<Integer> types = database.getTypes();
+ OutputPTidsListSchemaOutput output = new OutputPTidsListSchemaOutput();
+ output.setPolicyTypeIdList(types);
+ OutputPTidsListSchema outputSchema = new OutputPTidsListSchema();
+ outputSchema.setOutput(output);
+ return outputSchema;
+ }).when(mockApi).a1ControllerGetAllPolicyTypes(any(InputNRRidSchema.class));
+
+ doAnswer(inv -> {
+ if (delayMs > 0) {
+ logger.debug("a1ControllerGetPolicyType sleeping {}", delayMs);
+ Thread.sleep(delayMs);
+ }
+ InputNRRidPTidSchema input = inv.<InputNRRidPTidSchema>getArgument(0);
+ PolicyType policyType = database.getPolicyType(input.getInput().getPolicyTypeId());
+ OutputDescNamePTSchemaOutput type = new OutputDescNamePTSchemaOutput();
+ type.setName(policyType.getName());
+ type.setDescription(policyType.getDescription());
+ type.setPolicyType(database.normalize(policyType.getCreateSchema()));
+ OutputDescNamePTSchema outputSchema = new OutputDescNamePTSchema();
+ outputSchema.setOutput(type);
+ return outputSchema;
+ }).when(mockApi).a1ControllerGetPolicyType(any(InputNRRidPTidSchema.class));
+
+ doAnswer(inv -> {
+ if (delayMs > 0) {
+ logger.debug("a1ControllerGetHandler sleeping {}", delayMs);
+ Thread.sleep(delayMs);
+ }
+ InputNRRidPTidSchema input = inv.<InputNRRidPTidSchema>getArgument(0);
+ List<String> instances = database.getInstances(Optional.of(input.getInput().getPolicyTypeId()));
+ OutputPIidsListSchemaOutput instancesOutput = new OutputPIidsListSchemaOutput();
+ instancesOutput.setPolicyInstanceIdList(instances);
+ OutputPIidsListSchema outputSchema = new OutputPIidsListSchema();
+ outputSchema.setOutput(instancesOutput);
+ return outputSchema;
+ }).when(mockApi).a1ControllerGetAllInstancesForType(any(InputNRRidPTidSchema.class));
+
+ doAnswer(inv -> {
+ if (delayMs > 0) {
+ logger.debug("a1ControllerGetHandler sleeping {}", delayMs);
+ Thread.sleep(delayMs);
+ }
+ InputNRRidPTidPIidSchema input = inv.<InputNRRidPTidPIidSchema>getArgument(0);
+ Integer polcyTypeId = input.getInput().getPolicyTypeId();
+ String instanceId = input.getInput().getPolicyInstanceId();
+ String instance = database.normalize(database.getInstance(polcyTypeId, instanceId));
+ OutputPISchemaOutput instanceOutput = new OutputPISchemaOutput();
+ instanceOutput.setPolicyInstance(instance);
+ OutputPISchema outputSchema = new OutputPISchema();
+ outputSchema.setOutput(instanceOutput);
+ return outputSchema;
+ }).when(mockApi).a1ControllerGetPolicyInstance(any(InputNRRidPTidPIidSchema.class));
+
+ doAnswer(inv -> {
+ if (delayMs > 0) {
+ logger.debug("a1ControllerGetHandler sleeping {}", delayMs);
+ Thread.sleep(delayMs);
+ }
+ InputNRRidPTidPIidPISchema input = inv.<InputNRRidPTidPIidPISchema>getArgument(0);
+ Integer polcyTypeId = input.getInput().getPolicyTypeId();
+ String instanceId = input.getInput().getPolicyInstanceId();
+ String instance = input.getInput().getPolicyInstance();
+ database.putInstance(polcyTypeId, instanceId, instance);
+ return null;
+ }).when(mockApi).a1ControllerCreatePolicyInstance(any(InputNRRidPTidPIidPISchema.class));
+
+ doAnswer(inv -> {
+ if (delayMs > 0) {
+ logger.debug("a1ControllerGetHandler sleeping {}", delayMs);
+ Thread.sleep(delayMs);
+ }
+ InputNRRidPTidPIidSchema input = inv.<InputNRRidPTidPIidSchema>getArgument(0);
+ Integer polcyTypeId = input.getInput().getPolicyTypeId();
+ String instanceId = input.getInput().getPolicyInstanceId();
+ database.deleteInstance(polcyTypeId, instanceId);
+ return null;
+ }).when(mockApi).a1ControllerDeletePolicyInstance(any(InputNRRidPTidPIidSchema.class));
+
+ return mockApi;
+ }
+
+ class Database {
+
+ private String schema1 = "{\"$schema\": " //
+ + "\"http://json-schema.org/draft-07/schema#\"," //
+ + "\"title\": \"ANR\"," //
+ + "\"description\": \"ANR Neighbour Cell Relation Policy\"," //
+ + "\"type\": \"object\"," //
+ + "\"properties\": " //
+ + "{ \"servingCellNrcgi\": {" //
+ + "\"type\": \"string\"," //
+ + "\"description\" : \"Serving Cell Identifier (NR CGI)\"}," //
+ + "\"neighborCellNrpci\": {" //
+ + "\"type\": \"string\"," //
+ + "\"description\": \"Neighbor Cell Identifier (NR PCI)\"}," //
+ + "\"neighborCellNrcgi\": {" //
+ + "\"type\": \"string\"," //
+ + "\"description\": \"Neighbor Cell Identifier (NR CGI)\"}," //
+ + "\"flagNoHo\": {" //
+ + "\"type\": \"boolean\"," //
+ + "\"description\": \"Flag for HANDOVER NOT ALLOWED\"}," //
+ + "\"flagNoXn\": {" //
+ + "\"type\": \"boolean\"," //
+ + "\"description\": \"Flag for Xn CONNECTION NOT ALLOWED\"}," //
+ + "\"flagNoRemove\": {" //
+ + "\"type\": \"boolean\"," //
+ + "\"description\": \"Flag for DELETION NOT ALLOWED\"}}, " //
+ + "\"required\": [ \"servingCellNrcgi\",\"neighborCellNrpci\",\"neighborCellNrcgi\",\"flagNoHo\",\"flagNoXn\",\"flagNoRemove\" ]}";
+ private PolicyType policy1 = new PolicyType(1, "ANR", "ANR Neighbour Cell Relation Policy", schema1);
+
+ private String policyInstance1 = "{\"servingCellNrcgi\": \"Cell1\",\r\n" + //
+ "\"neighborCellNrpci\": \"NCell1\",\r\n" + //
+ "\"neighborCellNrcgi\": \"Ncell1\",\r\n" + //
+ "\"flagNoHo\": true,\r\n" + //
+ "\"flagNoXn\": true,\r\n" + //
+ "\"flagNoRemove\": true}";
+
+ private String schema2 = "{\n" + " \"type\": \"object\",\n" + //
+ " \"title\": \"Car\",\n" + //
+ " \"properties\": {\n" + //
+ " \"make\": {\n" + //
+ " \"type\": \"string\",\n" + //
+ " \"enum\": [\n" + //
+ " \"Toyota\",\n" + //
+ " \"BMW\",\n" + //
+ " \"Honda\",\n" + //
+ " \"Ford\",\n" + //
+ " \"Chevy\",\n" + //
+ " \"VW\"\n" + //
+ " ]\n" + //
+ " },\n" + //
+ " \"model\": {\n" + //
+ " \"type\": \"string\"\n" + //
+ " },\n" + //
+ " \"year\": {\n" + //
+ " \"type\": \"integer\",\n" + //
+ " \"enum\": [\n" + //
+ " 1995,1996,1997,1998,1999,\n" + //
+ " 2000,2001,2002,2003,2004,\n" + //
+ " 2005,2006,2007,2008,2009,\n" + //
+ " 2010,2011,2012,2013,2014\n" + //
+ " ],\n" + //
+ " \"default\": 2008\n" + //
+ " },\n" + //
+ " \"safety\": {\n" + //
+ " \"type\": \"integer\",\n" + //
+ " \"format\": \"rating\",\n" + //
+ " \"maximum\": 5,\n" + //
+ " \"exclusiveMaximum\": false,\n" + //
+ " \"readonly\": false\n" + //
+ " }\n" + //
+ " }\n" + //
+ " }\n";
+ private PolicyType policy2 = new PolicyType(2, "type2", "Type2 description", schema2);
+
+ private String schema3 = "{\n" + //
+ " \"$id\": \"https://example.com/person.schema.json\",\n" + //
+ " \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n" + //
+ " \"title\": \"Person\",\n" + //
+ " \"type\": \"object\",\n" + //
+ " \"properties\": {\n" + //
+ " \"firstName\": {\n" + //
+ " \"type\": \"string\",\n" + //
+ " \"description\": \"The person's first name.\"\n" + //
+ " },\n" + //
+ " \"lastName\": {\n" + //
+ " \"type\": \"string\",\n" + //
+ " \"description\": \"The person's last name.\"\n" + //
+ " },\n" + //
+ " \"age\": {\n" + //
+ " \"description\": \"Age in years which must be equal to or greater than zero.\",\n" + //
+ " \"type\": \"integer\",\n" + //
+ " \"minimum\": 0\n" + //
+ " }\n" + //
+ " }\n" + //
+ "}";
+ private PolicyType policy3 = new PolicyType(3, "type3", "Type3 description", schema3);
+
+ private String schema4 = "{" + //
+ " \"$id\": \"https://example.com/arrays.schema.json\"," + //
+ " \"$schema\": \"http://json-schema.org/draft-07/schema#\"," + //
+ " \"description\": \"A representation of a person, company, organization, or place\"," + //
+ " \"type\": \"object\"," + //
+ " \"properties\": {" + //
+ " \"fruits\": {" + //
+ " \"type\": \"array\"," + //
+ " \"items\": {" + //
+ " \"type\": \"string\"" + //
+ " }" + //
+ " }," + //
+ " \"vegetables\": {" + //
+ " \"type\": \"array\"," + //
+ " \"items\": { \"$ref\": \"#/definitions/veggie\" }" + //
+ " }" + //
+ " }," + //
+ " \"definitions\": {" + //
+ " \"veggie\": {" + //
+ " \"type\": \"object\"," + //
+ " \"required\": [ \"veggieName\", \"veggieLike\" ]," + //
+ " \"properties\": {" + //
+ " \"veggieName\": {" + //
+ " \"type\": \"string\"," + //
+ " \"description\": \"The name of the vegetable.\"" + //
+ " }," + //
+ " \"veggieLike\": {" + //
+ " \"type\": \"boolean\"," + //
+ " \"description\": \"Do I like this vegetable?\"" + //
+ " }" + //
+ " }" + //
+ " }" + //
+ " }" + //
+ " }";
+ private PolicyType policy4 = new PolicyType(4, "type4", "Type4 description", schema4);
+
+ public class PolicyException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public PolicyException(String message) {
+ super(message);
+ System.out.println("**** Exception " + message);
+ }
+ }
+
+ private class PolicyTypeHolder {
+ PolicyTypeHolder(PolicyType pt) {
+ this.policyType = pt;
+ }
+
+ String getInstance(String instanceId) throws PolicyException {
+ String instance = instances.get(instanceId);
+ if (instance == null) {
+ throw new PolicyException("Instance not found: " + instanceId);
+ }
+ return instance;
+ }
+
+ PolicyType getPolicyType() {
+ return policyType;
+ }
+
+ void putInstance(String id, String data) {
+ instances.put(id, data);
+ }
+
+ void deleteInstance(String id) {
+ instances.remove(id);
+ }
+
+ List<String> getInstances() {
+ return new ArrayList<>(instances.keySet());
+ }
+
+ private final PolicyType policyType;
+ private Map<String, String> instances = new HashMap<>();
+ }
+
+ Database() {
+ types.put(1, new PolicyTypeHolder(policy1));
+ types.put(2, new PolicyTypeHolder(policy2));
+ types.put(3, new PolicyTypeHolder(policy3));
+ types.put(4, new PolicyTypeHolder(policy4));
+ try {
+ putInstance(1, "ANR-1", policyInstance1);
+ } catch (JsonProcessingException | PolicyException e) {
+ // Nothing
+ }
+ }
+
+ String normalize(String str) {
+ return str.replace('\n', ' ');
+ }
+
+ void putInstance(Integer typeId, String instanceId, String instanceData)
+ throws JsonProcessingException, PolicyException {
+ PolicyTypeHolder type = getTypeHolder(typeId);
+ type.putInstance(instanceId, instanceData);
+ }
+
+ void deleteInstance(Integer typeId, String instanceId) throws JsonProcessingException, PolicyException {
+ PolicyTypeHolder type = getTypeHolder(typeId);
+ type.deleteInstance(instanceId);
+ }
+
+ String getInstance(Integer typeId, String instanceId) throws JsonProcessingException, PolicyException {
+ return getTypeHolder(typeId).getInstance(instanceId);
+ }
+
+ List<Integer> getTypes() {
+ return new ArrayList<>(types.keySet());
+ }
+
+ List<String> getInstances(Optional<Integer> typeId) throws PolicyException {
+ if (typeId.isPresent()) {
+ return getTypeHolder(typeId.get()).getInstances();
+ } else {
+ Set<String> res = new HashSet<String>();
+ for (Iterator<PolicyTypeHolder> i = types.values().iterator(); i.hasNext();) {
+ res.addAll(i.next().getInstances());
+ }
+ return new ArrayList<>(res);
+ }
+ }
+
+ private PolicyTypeHolder getTypeHolder(Integer typeId) throws PolicyException {
+ PolicyTypeHolder typeHolder = types.get(typeId);
+ if (typeHolder == null) {
+ throw new PolicyException("Type not found: " + typeId);
+ }
+ return typeHolder;
+ }
+
+ private PolicyType getPolicyType(Integer typeId) throws PolicyException {
+ PolicyTypeHolder typeHolder = getTypeHolder(typeId);
+ return typeHolder.getPolicyType();
+ }
+
+ private Map<Integer, PolicyTypeHolder> types = new HashMap<>();
+
+ }
+
+ private final Database database = new Database();
+}
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PortalApIMockConfiguration.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PortalApIMockConfiguration.java
new file mode 100644
index 0000000..a3d05be
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/PortalApIMockConfiguration.java
@@ -0,0 +1,83 @@
+/*-
+ * ========================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 java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.onap.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy;
+import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.oransc.ric.portal.dashboard.portalapi.PortalAuthManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+
+@Configuration
+@Profile("test")
+public class PortalApIMockConfiguration {
+
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ // Unfortunately EPSDK-FW does not define these as constants
+ public static final String PORTAL_USERNAME_HEADER_KEY = "username";
+ public static final String PORTAL_PASSWORD_HEADER_KEY = "password";
+
+ @Bean
+ public ServletRegistrationBean<PortalRestAPIProxy> portalApiProxyServlet() {
+ PortalRestAPIProxy servlet = new PortalRestAPIProxy();
+ final ServletRegistrationBean<PortalRestAPIProxy> servletBean = new ServletRegistrationBean<>(servlet,
+ PortalApiConstants.API_PREFIX + "/*");
+ servletBean.setName("PortalRestApiProxyServlet");
+ return servletBean;
+ }
+
+ @Bean
+ public PortalAuthManager portalAuthManager() throws Exception {
+ PortalAuthManager mockManager = mock(PortalAuthManager.class);
+ final Map<String, String> credentialsMap = new HashMap<>();
+ credentialsMap.put("appName", "appName");
+ credentialsMap.put(PORTAL_USERNAME_HEADER_KEY, PORTAL_USERNAME_HEADER_KEY);
+ credentialsMap.put(PORTAL_PASSWORD_HEADER_KEY, PORTAL_PASSWORD_HEADER_KEY);
+ doAnswer(inv -> {
+ logger.debug("getAppCredentials");
+ return credentialsMap;
+ }).when(mockManager).getAppCredentials();
+ doAnswer(inv -> {
+ logger.debug("getUserId");
+ return "userId";
+ }).when(mockManager).validateEcompSso(any(HttpServletRequest.class));
+ doAnswer(inv -> {
+ logger.debug("getAppCredentials");
+ return credentialsMap;
+ }).when(mockManager).getAppCredentials();
+ return mockManager;
+ }
+
+}
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/WebSecurityMockConfiguration.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/WebSecurityMockConfiguration.java
new file mode 100644
index 0000000..80cde66
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/WebSecurityMockConfiguration.java
@@ -0,0 +1,84 @@
+/*-
+ * ========================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.DashboardConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.builders.WebSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.crypto.factory.PasswordEncoderFactories;
+import org.springframework.security.crypto.password.PasswordEncoder;
+
+@Configuration
+@EnableWebSecurity
+@EnableGlobalMethodSecurity(securedEnabled = true)
+@Profile("test")
+public class WebSecurityMockConfiguration extends WebSecurityConfigurerAdapter {
+
+ public static final String TEST_CRED_ADMIN = "admin";
+ public static final String TEST_CRED_STANDARD = "standard";
+
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ public WebSecurityMockConfiguration(@Value("${userfile}") final String userFilePath) {
+ logger.debug("ctor: user file path {}", userFilePath);
+ }
+
+ @Override
+ protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+ PasswordEncoder encoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
+ auth.inMemoryAuthentication() //
+ .passwordEncoder(encoder) //
+ // The admin user has the admin AND standard roles
+ .withUser(TEST_CRED_ADMIN) //
+ .password(encoder.encode(TEST_CRED_ADMIN))
+ .roles(DashboardConstants.ROLE_NAME_ADMIN, DashboardConstants.ROLE_NAME_STANDARD)//
+ .and()//
+ // The standard user has only the standard role
+ .withUser(TEST_CRED_STANDARD) //
+ .password(encoder.encode(TEST_CRED_STANDARD)) //
+ .roles(DashboardConstants.ROLE_NAME_STANDARD);
+ }
+
+ @Override
+ protected void configure(HttpSecurity http) throws Exception {
+ http.authorizeRequests().anyRequest().authenticated()//
+ .and().httpBasic() //
+ .and().csrf().disable();
+ }
+
+ @Override
+ public void configure(WebSecurity web) throws Exception {
+ // This disables Spring security, but not the app's filter.
+ web.ignoring().antMatchers(WebSecurityConfiguration.OPEN_PATHS);
+ web.ignoring().antMatchers("/", "/csrf"); // allow swagger-ui to load
+ }
+
+}
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AbstractControllerTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AbstractControllerTest.java
new file mode 100644
index 0000000..d4163f0
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/AbstractControllerTest.java
@@ -0,0 +1,112 @@
+/*-
+ * ========================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 java.util.Map;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.oransc.ric.portal.dashboard.config.WebSecurityMockConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
+import org.springframework.boot.test.web.client.TestRestTemplate;
+import org.springframework.boot.web.server.LocalServerPort;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
+import org.springframework.web.util.UriComponentsBuilder;
+
+@ExtendWith(SpringExtension.class)
+@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
+// Need the fake answers from the backend
+@ActiveProfiles("test")
+public class AbstractControllerTest {
+
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ // Created by Spring black magic
+ // https://spring.io/guides/gs/testing-web/
+ @LocalServerPort
+ private int localServerPort;
+
+ @Autowired
+ protected TestRestTemplate restTemplate;
+
+ /**
+ * Flexible URI builder.
+ *
+ * @param queryParams
+ * Map of string-string query parameters
+ * @param path
+ * Array of path components. If a component has an
+ * embedded slash, the string is split and each
+ * subcomponent is added individually.
+ * @return URI
+ */
+ protected URI buildUri(final Map<String, String> queryParams, final String... path) {
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:" + localServerPort + "/");
+ for (int p = 0; p < path.length; ++p) {
+ if (path[p] == null || path[p].isEmpty()) {
+ throw new IllegalArgumentException("Unexpected null or empty at path index " + Integer.toString(p));
+ } else if (path[p].contains("/")) {
+ String[] subpaths = path[p].split("/");
+ for (String s : subpaths)
+ if (!s.isEmpty())
+ builder.pathSegment(s);
+ } else {
+ builder.pathSegment(path[p]);
+ }
+ }
+ if (queryParams != null && queryParams.size() > 0) {
+ for (Map.Entry<String, String> entry : queryParams.entrySet()) {
+ if (entry.getKey() == null || entry.getValue() == null)
+ throw new IllegalArgumentException("Unexpected null key or value");
+ else
+ builder.queryParam(entry.getKey(), entry.getValue());
+ }
+ }
+ return builder.build().encode().toUri();
+ }
+
+ // Because I put the annotations on this parent class,
+ // must define at least one test here.
+ @Test
+ public void contextLoads() {
+ // Silence Sonar warning about missing assertion.
+ Assertions.assertTrue(logger.isWarnEnabled());
+ logger.info("Context loads on mock profile");
+ }
+
+ public TestRestTemplate testRestTemplateAdminRole() {
+ return restTemplate.withBasicAuth(WebSecurityMockConfiguration.TEST_CRED_ADMIN,
+ WebSecurityMockConfiguration.TEST_CRED_ADMIN);
+ }
+
+ public TestRestTemplate testRestTemplateStandardRole() {
+ return restTemplate.withBasicAuth(WebSecurityMockConfiguration.TEST_CRED_STANDARD,
+ WebSecurityMockConfiguration.TEST_CRED_STANDARD);
+ }
+
+}
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/DefaultContextTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/DefaultContextTest.java
new file mode 100644
index 0000000..48c5931
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/DefaultContextTest.java
@@ -0,0 +1,48 @@
+/*-
+ * ========================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 org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
+
+/**
+ * Tests whether the default (not mock) configuration classes run to completion.
+ */
+@ExtendWith(SpringExtension.class)
+@SpringBootTest
+public class DefaultContextTest {
+
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ @Test
+ public void contextLoads() {
+ // Silence Sonar warning about missing assertion.
+ Assertions.assertTrue(logger.isWarnEnabled());
+ logger.info("Context loads on default profile");
+ }
+
+}
diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/PortalRestCentralServiceTest.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/PortalRestCentralServiceTest.java
new file mode 100644
index 0000000..dc80968
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/controller/PortalRestCentralServiceTest.java
@@ -0,0 +1,117 @@
+/*-
+ * ========================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 java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.onap.portalsdk.core.restful.domain.EcompRole;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
+import org.oransc.ric.portal.dashboard.DashboardConstants;
+import org.oransc.ric.portal.dashboard.config.PortalApIMockConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+
+public class PortalRestCentralServiceTest extends AbstractControllerTest {
+
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ @Test
+ public void getAnalyticsTest() {
+ // paths are hardcoded here exactly like the EPSDK-FW library :(
+ URI uri = buildUri(null, PortalApiConstants.API_PREFIX, "/analytics");
+ logger.info("Invoking {}", uri);
+ ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.GET, null, String.class);
+ // No Portal is available so this always fails
+ Assertions.assertTrue(response.getStatusCode().is4xxClientError());
+ }
+
+ @Test
+ public void getErrorPageTest() {
+ // Send unauthorized request
+ URI uri = buildUri(null, "/favicon.ico");
+ logger.info("Invoking {}", uri);
+ ResponseEntity<String> response = restTemplate.exchange(uri, HttpMethod.GET, null, String.class);
+ Assertions.assertTrue(response.getStatusCode().is4xxClientError());
+ Assertions.assertTrue(response.getBody().contains("Static error page"));
+ }
+
+ private HttpEntity<Object> getEntityWithHeaders(Object body) {
+ HttpHeaders headers = new HttpHeaders();
+ headers.set(PortalApIMockConfiguration.PORTAL_USERNAME_HEADER_KEY,
+ PortalApIMockConfiguration.PORTAL_USERNAME_HEADER_KEY);
+ headers.set(PortalApIMockConfiguration.PORTAL_PASSWORD_HEADER_KEY,
+ PortalApIMockConfiguration.PORTAL_PASSWORD_HEADER_KEY);
+ HttpEntity<Object> entity = new HttpEntity<>(body, headers);
+ return entity;
+ }
+
+ private EcompUser createEcompUser(String loginId) {
+ EcompUser user = new EcompUser();
+ user.setLoginId(loginId);
+ EcompRole role = new EcompRole();
+ role.setRoleFunctions(Collections.EMPTY_SET);
+ role.setId(1L);
+ role.setName(DashboardConstants.ROLE_NAME_ADMIN);
+ Set<EcompRole> roles = new HashSet<>();
+ roles.add(role);
+ user.setRoles(roles);
+ return user;
+ }
+
+/* @Test
+ public void createUserTest() {
+ final String loginId = "login1";
+ URI create = buildUri(null, PortalApiConstants.API_PREFIX, "user");
+ logger.info("Invoking {}", create);
+ HttpEntity<Object> requestEntity = getEntityWithHeaders(createEcompUser(loginId));
+ ResponseEntity<String> response = restTemplate.exchange(create, HttpMethod.POST, requestEntity, String.class);
+ Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
+ }
+
+ @Test
+ public void updateUserTest() {
+ final String loginId = "login2";
+ URI create = buildUri(null, PortalApiConstants.API_PREFIX, "user");
+ EcompUser user = createEcompUser(loginId);
+ logger.info("Invoking {}", create);
+ HttpEntity<Object> requestEntity = getEntityWithHeaders(user);
+ // Create
+ ResponseEntity<String> response = restTemplate.exchange(create, HttpMethod.POST, requestEntity, String.class);
+ Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
+ URI update = buildUri(null, PortalApiConstants.API_PREFIX, "user", loginId);
+ user.setEmail("user@company.org");
+ requestEntity = getEntityWithHeaders(user);
+ response = restTemplate.exchange(update, HttpMethod.POST, requestEntity, String.class);
+ Assertions.assertTrue(response.getStatusCode().is2xxSuccessful());
+ }
+*/
+
+}
diff --git a/dashboard/webapp-backend/src/test/resources/anr-policy-instance.json b/dashboard/webapp-backend/src/test/resources/anr-policy-instance.json
new file mode 100644
index 0000000..0d7315e
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/anr-policy-instance.json
@@ -0,0 +1,8 @@
+{
+ "servingCellNrcgi": "Cell1",
+ "neighborCellNrpci": "NCell1",
+ "neighborCellNrcgi": "Ncell1",
+ "flagNoHo": true,
+ "flagNoXn": true,
+ "flagNoRemove": true
+}
\ No newline at end of file
diff --git a/dashboard/webapp-backend/src/test/resources/anr-policy-schema.json b/dashboard/webapp-backend/src/test/resources/anr-policy-schema.json
new file mode 100644
index 0000000..6e0263d
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/anr-policy-schema.json
@@ -0,0 +1,40 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "ANR",
+ "description": "ANR Neighbour Cell Relation Policy",
+ "type": "object",
+ "properties": {
+ "servingCellNrcgi": {
+ "type": "string",
+ "description": "Serving Cell Identifier (NR CGI)"
+ },
+ "neighborCellNrpci": {
+ "type": "string",
+ "description": "Neighbor Cell Identifier (NR PCI)"
+ },
+ "neighborCellNrcgi": {
+ "type": "string",
+ "description": "Neighbor Cell Identifier (NR CGI)"
+ },
+ "flagNoHo": {
+ "type": "boolean",
+ "description": "Flag for HANDOVER NOT ALLOWED"
+ },
+ "flagNoXn": {
+ "type": "boolean",
+ "description": "Flag for Xn CONNECTION NOT ALLOWED"
+ },
+ "flagNoRemove": {
+ "type": "boolean",
+ "description": "Flag for DELETION NOT ALLOWED"
+ }
+ },
+ "required": [
+ "servingCellNrcgi",
+ "neighborCellNrpci",
+ "neighborCellNrcgi",
+ "flagNoHo",
+ "flagNoXn",
+ "flagNoRemove"
+ ]
+}
\ No newline at end of file
diff --git a/dashboard/webapp-backend/src/test/resources/caas-ingress-ricaux-pods.json b/dashboard/webapp-backend/src/test/resources/caas-ingress-ricaux-pods.json
new file mode 100644
index 0000000..216b7db
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/caas-ingress-ricaux-pods.json
@@ -0,0 +1,9 @@
+{
+ "kind": "PodList",
+ "apiVersion": "v1",
+ "metadata": {
+ "selfLink": "/api/v1/namespaces/ricaux/pods",
+ "resourceVersion": "1594484"
+ },
+ "items": []
+}
diff --git a/dashboard/webapp-backend/src/test/resources/caas-ingress-ricplt-pods.json b/dashboard/webapp-backend/src/test/resources/caas-ingress-ricplt-pods.json
new file mode 100644
index 0000000..cf9c1a0
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/caas-ingress-ricplt-pods.json
@@ -0,0 +1,1847 @@
+{
+ "kind": "PodList",
+ "apiVersion": "v1",
+ "metadata": {
+ "selfLink": "/api/v1/namespaces/ricplt/pods",
+ "resourceVersion": "3189380"
+ },
+ "items": [
+ {
+ "metadata": {
+ "name": "deployment-ricplt-a1mediator-74d9fc4c8c-77vtp",
+ "generateName": "deployment-ricplt-a1mediator-74d9fc4c8c-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-a1mediator-74d9fc4c8c-77vtp",
+ "uid": "487c582d-36d6-406a-92a3-bfbce04b83de",
+ "resourceVersion": "2945631",
+ "creationTimestamp": "2019-10-18T16:15:04Z",
+ "labels": {
+ "app": "ricplt-a1mediator",
+ "group": "nagios",
+ "pod-template-hash": "74d9fc4c8c",
+ "release": "r1-a1mediator"
+ },
+ "annotations": {
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-a1mediator-74d9fc4c8c",
+ "uid": "84ef8695-3eb2-4dcd-b214-9d00ab5fb6b3",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "a1conf",
+ "configMap": {
+ "name": "configmap-ricplt-a1mediator-a1conf",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "default-token-5j24g",
+ "secret": {
+ "secretName": "default-token-5j24g",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-a1mediator",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-a1:0.10.3",
+ "ports": [
+ {
+ "name": "http",
+ "containerPort": 10000,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrroute",
+ "containerPort": 4561,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrdata",
+ "containerPort": 4562,
+ "protocol": "TCP"
+ }
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-a1mediator-env"
+ }
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "a1conf",
+ "mountPath": "/opt/ricmanifest.json",
+ "subPath": "ricmanifest.json"
+ },
+ {
+ "name": "a1conf",
+ "mountPath": "/opt/rmr_string_int_mapping.txt",
+ "subPath": "rmr_string_int_mapping.txt"
+ },
+ {
+ "name": "a1conf",
+ "mountPath": "/opt/route/local.rt",
+ "subPath": "local.rt"
+ },
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "livenessProbe": {
+ "httpGet": {
+ "path": "/a1-p/healthcheck",
+ "port": "http",
+ "scheme": "HTTP"
+ },
+ "timeoutSeconds": 1,
+ "periodSeconds": 10,
+ "successThreshold": 1,
+ "failureThreshold": 3
+ },
+ "readinessProbe": {
+ "httpGet": {
+ "path": "/a1-p/healthcheck",
+ "port": "http",
+ "scheme": "HTTP"
+ },
+ "timeoutSeconds": 1,
+ "periodSeconds": 10,
+ "successThreshold": 1,
+ "failureThreshold": 3
+ },
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "serviceAccountName": "default",
+ "serviceAccount": "default",
+ "nodeName": "172.29.16.202",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "hostname": "a1mediator",
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:04Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:09Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:09Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:04Z"
+ }
+ ],
+ "hostIP": "172.29.16.202",
+ "podIP": "10.244.4.71",
+ "podIPs": [
+ {
+ "ip": "10.244.4.71"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:04Z",
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-a1mediator",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:05Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-a1:0.10.3",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/ric-plt-a1@sha256:64a61ed84d4d05dfa1690bb45949da333d7b088e2e12dbba0ce60c06445f52cb",
+ "containerID": "docker://07ceed10ee2a4413c167951e458b59a505a073cce82ac543146e58b698489d59",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ },
+ {
+ "metadata": {
+ "name": "deployment-ricplt-appmgr-6ccf55b98b-kbkt4",
+ "generateName": "deployment-ricplt-appmgr-6ccf55b98b-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-appmgr-6ccf55b98b-kbkt4",
+ "uid": "4e084e8a-eb0a-4ea2-9cc1-7f812cd6bb28",
+ "resourceVersion": "2945633",
+ "creationTimestamp": "2019-10-18T16:15:01Z",
+ "labels": {
+ "app": "ricplt-appmgr",
+ "group": "nagios",
+ "pod-template-hash": "6ccf55b98b",
+ "release": "r1-appmgr"
+ },
+ "annotations": {
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-appmgr-6ccf55b98b",
+ "uid": "a169ebc4-9b7c-4b8d-81ed-6364e07df24e",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "config-volume",
+ "configMap": {
+ "name": "configmap-ricplt-appmgr-appconfig",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "cert-volume",
+ "configMap": {
+ "name": "xapp-mgr-certs",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "secret-volume",
+ "secret": {
+ "secretName": "xapp-mgr-creds",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "helm-secret-volume",
+ "emptyDir": {
+
+ }
+ },
+ {
+ "name": "appmgr-bin-volume",
+ "configMap": {
+ "name": "configmap-ricplt-appmgr-bin",
+ "defaultMode": 493
+ }
+ },
+ {
+ "name": "svcacct-ricplt-appmgr-token-kclzw",
+ "secret": {
+ "secretName": "svcacct-ricplt-appmgr-token-kclzw",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "initContainers": [
+ {
+ "name": "container-ricplt-appmgr-copy-tiller-secret",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/it-dep-init:0.0.1",
+ "command": [
+ "/appmgr-tiller-secret-copier.sh"
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-appmgr-env"
+ }
+ }
+ ],
+ "env": [
+ {
+ "name": "SVCACCT_NAME",
+ "value": "svcacct-ricplt-appmgr"
+ },
+ {
+ "name": "CLUSTER_NAME",
+ "value": "kubernetes"
+ },
+ {
+ "name": "KUBECONFIG",
+ "value": "/tmp/kubeconfig"
+ },
+ {
+ "name": "K8S_API_HOST",
+ "value": "https://10.254.0.1:443"
+ },
+ {
+ "name": "SECRET_NAMESPACE",
+ "value": "ricinfra"
+ },
+ {
+ "name": "SECRET_NAME",
+ "value": "secret-helm-client-ricxapp"
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "helm-secret-volume",
+ "mountPath": "/opt/ric/secret"
+ },
+ {
+ "name": "appmgr-bin-volume",
+ "mountPath": "/svcacct-to-kubeconfig.sh",
+ "subPath": "svcacct-to-kubeconfig.sh"
+ },
+ {
+ "name": "appmgr-bin-volume",
+ "mountPath": "/appmgr-tiller-secret-copier.sh",
+ "subPath": "appmgr-tiller-secret-copier.sh"
+ },
+ {
+ "name": "svcacct-ricplt-appmgr-token-kclzw",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-appmgr",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-appmgr:0.1.9",
+ "ports": [
+ {
+ "name": "http",
+ "containerPort": 8080,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrroute",
+ "containerPort": 4561,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrdata",
+ "containerPort": 4560,
+ "protocol": "TCP"
+ }
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-appmgr-env"
+ }
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "config-volume",
+ "mountPath": "/opt/ric/config/appmgr.yaml",
+ "subPath": "appmgr.yaml"
+ },
+ {
+ "name": "cert-volume",
+ "mountPath": "/opt/ric/certificates"
+ },
+ {
+ "name": "helm-secret-volume",
+ "mountPath": "/opt/ric/secret"
+ },
+ {
+ "name": "secret-volume",
+ "mountPath": "/opt/ric/secret/helm_repo_username",
+ "subPath": "helm_repo_username"
+ },
+ {
+ "name": "secret-volume",
+ "mountPath": "/opt/ric/secret/helm_repo_password",
+ "subPath": "helm_repo_password"
+ },
+ {
+ "name": "svcacct-ricplt-appmgr-token-kclzw",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "serviceAccountName": "svcacct-ricplt-appmgr",
+ "serviceAccount": "svcacct-ricplt-appmgr",
+ "nodeName": "172.29.16.203",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "hostname": "appmgr",
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:03Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:04Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:04Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:01Z"
+ }
+ ],
+ "hostIP": "172.29.16.203",
+ "podIP": "10.244.3.252",
+ "podIPs": [
+ {
+ "ip": "10.244.3.252"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:01Z",
+ "initContainerStatuses": [
+ {
+ "name": "container-ricplt-appmgr-copy-tiller-secret",
+ "state": {
+ "terminated": {
+ "exitCode": 0,
+ "reason": "Completed",
+ "startedAt": "2019-10-18T16:15:02Z",
+ "finishedAt": "2019-10-18T16:15:02Z",
+ "containerID": "docker://130db0adfad526204726bf11fe24741d94f11f39f97f0d826b066ec852e5a452"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/it-dep-init:0.0.1",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/it-dep-init@sha256:d3a2c02660a0b5da5a7e38626c49018ca7f5e3bc39106b0728ff72245cd20be5",
+ "containerID": "docker://130db0adfad526204726bf11fe24741d94f11f39f97f0d826b066ec852e5a452"
+ }
+ ],
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-appmgr",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:03Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-appmgr:0.1.9",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/ric-plt-appmgr@sha256:5c076f702d570b385d10200cda8d504475ce44eb1bcbb131b1d50e00eabae4d7",
+ "containerID": "docker://791f455c1974a100aaa09ab0a290e438d75aa1c3aadcb717c42d53e02cdedb83",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ },
+ {
+ "metadata": {
+ "name": "deployment-ricplt-dbaas-d4c9f7b88-7wgb9",
+ "generateName": "deployment-ricplt-dbaas-d4c9f7b88-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-dbaas-d4c9f7b88-7wgb9",
+ "uid": "e54e51fc-c4bd-4308-805e-16c2d588dacd",
+ "resourceVersion": "2945634",
+ "creationTimestamp": "2019-10-18T16:15:01Z",
+ "labels": {
+ "app": "ricplt-dbaas",
+ "group": "nagios",
+ "pod-template-hash": "d4c9f7b88",
+ "release": "r1-dbaas"
+ },
+ "annotations": {
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-dbaas-d4c9f7b88",
+ "uid": "7e8d5d34-efa9-41fe-b92f-d9b71bc40360",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "default-token-5j24g",
+ "secret": {
+ "secretName": "default-token-5j24g",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-dbaas",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-dbaas:0.1.0",
+ "ports": [
+ {
+ "name": "sql",
+ "containerPort": 6379,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 0,
+ "dnsPolicy": "ClusterFirst",
+ "serviceAccountName": "default",
+ "serviceAccount": "default",
+ "nodeName": "172.29.16.202",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:01Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:03Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:03Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:01Z"
+ }
+ ],
+ "hostIP": "172.29.16.202",
+ "podIP": "10.244.4.70",
+ "podIPs": [
+ {
+ "ip": "10.244.4.70"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:01Z",
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-dbaas",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:02Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-dbaas:0.1.0",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/ric-plt-dbaas@sha256:f63cfa353f355155ec6455a68d18c631900a2602bf7cc2ba35d6210971736b76",
+ "containerID": "docker://8972d8b61d5c3ff56b50814575647d70fb3307602506cda3e34b6734c28a3f36",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ },
+ {
+ "metadata": {
+ "name": "deployment-ricplt-e2mgr-86c76477c5-mf5t5",
+ "generateName": "deployment-ricplt-e2mgr-86c76477c5-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-e2mgr-86c76477c5-mf5t5",
+ "uid": "5f2231ea-bec0-46fc-a8f8-09b0b80e982f",
+ "resourceVersion": "2945636",
+ "creationTimestamp": "2019-10-18T16:15:02Z",
+ "labels": {
+ "app": "ricplt-e2mgr",
+ "group": "nagios",
+ "pod-template-hash": "86c76477c5",
+ "release": "r1-e2mgr"
+ },
+ "annotations": {
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-e2mgr-86c76477c5",
+ "uid": "f7dfd4a3-4eb3-4c46-a6c8-adc4ae37ef57",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "local-router-file",
+ "configMap": {
+ "name": "configmap-ricplt-e2mgr-router-configmap",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "local-configuration-file",
+ "configMap": {
+ "name": "configmap-ricplt-e2mgr-configuration-configmap",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "default-token-5j24g",
+ "secret": {
+ "secretName": "default-token-5j24g",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-e2mgr",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-e2mgr:2.0.7",
+ "ports": [
+ {
+ "name": "http",
+ "containerPort": 3800,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrroute",
+ "containerPort": 4561,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrdata",
+ "containerPort": 3801,
+ "protocol": "TCP"
+ }
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-e2mgr-env"
+ }
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "local-router-file",
+ "mountPath": "/opt/E2Manager/router.txt",
+ "subPath": "router.txt"
+ },
+ {
+ "name": "local-configuration-file",
+ "mountPath": "/opt/E2Manager/resources/configuration.yaml",
+ "subPath": "configuration.yaml"
+ },
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always",
+ "securityContext": {
+ "privileged": false
+ },
+ "stdin": true,
+ "tty": true
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "serviceAccountName": "default",
+ "serviceAccount": "default",
+ "nodeName": "172.29.16.204",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "hostname": "e2mgr",
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:02Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:05Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:05Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:02Z"
+ }
+ ],
+ "hostIP": "172.29.16.204",
+ "podIP": "10.244.2.100",
+ "podIPs": [
+ {
+ "ip": "10.244.2.100"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:02Z",
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-e2mgr",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:04Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-e2mgr:2.0.7",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/ric-plt-e2mgr@sha256:87fa19a934215bdec71a355ef08eec9e273c992bab80af727f4f1b7a74ebacfa",
+ "containerID": "docker://ff3a2fcfc72b00e3c317899f2b620da2f65e3de260623daed7825f6a74dbcb5c",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ },
+ {
+ "metadata": {
+ "name": "deployment-ricplt-e2term-5dcf8b54b-5mkxl",
+ "generateName": "deployment-ricplt-e2term-5dcf8b54b-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-e2term-5dcf8b54b-5mkxl",
+ "uid": "8fae1dcd-5e42-4a66-be6f-e893d5563689",
+ "resourceVersion": "2945639",
+ "creationTimestamp": "2019-10-18T16:15:03Z",
+ "labels": {
+ "app": "ricplt-e2term",
+ "group": "nagios",
+ "pod-template-hash": "5dcf8b54b",
+ "release": "r1-e2term"
+ },
+ "annotations": {
+ "danm.k8s.io/interfaces": "[\n {\"clusterNetwork\":\"default\", \"ip\":\"dynamic\"},\n {\"clusterNetwork\":\"ran\", \"ip\":\"dynamic\", \"ip6\":\"dynamic\"}\n]\n",
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-e2term-5dcf8b54b",
+ "uid": "cc20b8a0-6d74-4fb9-b384-bdce9c9ae184",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "local-router-file",
+ "configMap": {
+ "name": "configmap-ricplt-e2term-router-configmap",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "localtime",
+ "hostPath": {
+ "path": "/etc/localtime",
+ "type": ""
+ }
+ },
+ {
+ "name": "pizpub-config",
+ "configMap": {
+ "name": "configmap-ricplt-e2term-pizpub",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "vol-shared",
+ "persistentVolumeClaim": {
+ "claimName": "pvc-ricplt-e2term"
+ }
+ },
+ {
+ "name": "default-token-5j24g",
+ "secret": {
+ "secretName": "default-token-5j24g",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-e2term",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-e2:2.0.7.5",
+ "ports": [
+ {
+ "name": "rmrroute",
+ "containerPort": 4561,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrdata",
+ "containerPort": 38000,
+ "protocol": "TCP"
+ }
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-e2term-env"
+ }
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "local-router-file",
+ "mountPath": "/opt/e2/router.txt",
+ "subPath": "router.txt"
+ },
+ {
+ "name": "local-router-file",
+ "mountPath": "/tmp/rmr_verbose",
+ "subPath": "rmr_verbose"
+ },
+ {
+ "name": "vol-shared",
+ "mountPath": "/data/outgoing/",
+ "subPath": "outgoing"
+ },
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always",
+ "securityContext": {
+ "privileged": false
+ },
+ "stdin": true,
+ "tty": true
+ },
+ {
+ "name": "container-ricplt-e2term-pizpub",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/pizpub:0.0.5155",
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "localtime",
+ "readOnly": true,
+ "mountPath": "/etc/localtime"
+ },
+ {
+ "name": "vol-shared",
+ "mountPath": "/data"
+ },
+ {
+ "name": "pizpub-config",
+ "mountPath": "/opt/app/config/conf/"
+ },
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "lifecycle": {
+ "postStart": {
+ "exec": {
+ "command": [
+ "/bin/sh",
+ "/opt/app/config/conf/cleaner.sh",
+ "/data/sent",
+ "3"
+ ]
+ }
+ }
+ },
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirstWithHostNet",
+ "serviceAccountName": "default",
+ "serviceAccount": "default",
+ "nodeName": "172.29.16.201",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "hostname": "e2term",
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:22Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:33Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:33Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:22Z"
+ }
+ ],
+ "hostIP": "172.29.16.201",
+ "podIP": "10.244.1.90",
+ "podIPs": [
+ {
+ "ip": "10.244.1.90"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:22Z",
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-e2term",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:31Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "ranco-dev-tools.eastus.cloudapp.azure.com:10001/ric-plt-e2:2.0.7.5",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/ric-plt-e2@sha256:0ea1a356d018495a93e124ddd793e09626bf6e4d9b96355e731673ef7fab5a1f",
+ "containerID": "docker://bf9ca87dbad9436b0ed99ffe38036fb49033a9bc2cf2eb548397fbc9c48f1c3d",
+ "started": true
+ },
+ {
+ "name": "container-ricplt-e2term-pizpub",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:32Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "ranco-dev-tools.eastus.cloudapp.azure.com:10001/pizpub:0.0.5155",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/pizpub@sha256:138c2d2d25e6528c4a5a8a402c277722d1c1fd4d6792b644967acd538affb1ed",
+ "containerID": "docker://93e39661623b7afc8156008bb6fbc206458964a6eb0633f80164e4c7ef59fe76",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ },
+ {
+ "metadata": {
+ "name": "deployment-ricplt-jaegeradapter-6ff8676c7-m4qkf",
+ "generateName": "deployment-ricplt-jaegeradapter-6ff8676c7-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-jaegeradapter-6ff8676c7-m4qkf",
+ "uid": "d6a5e9e9-87d0-4d1e-b1b7-cc1a4f20dc2e",
+ "resourceVersion": "2945640",
+ "creationTimestamp": "2019-10-18T16:15:08Z",
+ "labels": {
+ "app": "ricplt-jaegeradapter",
+ "group": "nagios",
+ "pod-template-hash": "6ff8676c7",
+ "release": "r1-jaegeradapter"
+ },
+ "annotations": {
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-jaegeradapter-6ff8676c7",
+ "uid": "98bc03d7-a082-4ac1-9b89-064022a37dff",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "default-token-5j24g",
+ "secret": {
+ "secretName": "default-token-5j24g",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-jaegeradapter",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/all-in-one:1.12",
+ "ports": [
+ {
+ "name": "zipkincompact",
+ "containerPort": 5775,
+ "protocol": "UDP"
+ },
+ {
+ "name": "jaegercompact",
+ "containerPort": 6831,
+ "protocol": "UDP"
+ },
+ {
+ "name": "jaegerbinary",
+ "containerPort": 6832,
+ "protocol": "UDP"
+ },
+ {
+ "name": "httpquery",
+ "containerPort": 16686,
+ "protocol": "TCP"
+ },
+ {
+ "name": "httpconfig",
+ "containerPort": 5778,
+ "protocol": "TCP"
+ },
+ {
+ "name": "zipkinhttp",
+ "containerPort": 9411,
+ "protocol": "TCP"
+ },
+ {
+ "name": "jaegerhttp",
+ "containerPort": 14268,
+ "protocol": "TCP"
+ },
+ {
+ "name": "jaegerhttpt",
+ "containerPort": 14267,
+ "protocol": "TCP"
+ }
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-jaegeradapter"
+ }
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "livenessProbe": {
+ "httpGet": {
+ "path": "/",
+ "port": 16686,
+ "scheme": "HTTP"
+ },
+ "timeoutSeconds": 1,
+ "periodSeconds": 10,
+ "successThreshold": 1,
+ "failureThreshold": 3
+ },
+ "readinessProbe": {
+ "httpGet": {
+ "path": "/",
+ "port": 16686,
+ "scheme": "HTTP"
+ },
+ "timeoutSeconds": 1,
+ "periodSeconds": 10,
+ "successThreshold": 1,
+ "failureThreshold": 3
+ },
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "serviceAccountName": "default",
+ "serviceAccount": "default",
+ "nodeName": "172.29.16.203",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "hostname": "jaegeradapter",
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:08Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:15Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:15Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:08Z"
+ }
+ ],
+ "hostIP": "172.29.16.203",
+ "podIP": "10.244.3.254",
+ "podIPs": [
+ {
+ "ip": "10.244.3.254"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:08Z",
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-jaegeradapter",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:09Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/all-in-one:1.12",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/all-in-one@sha256:51b901b653f4a4ca5dd50be9133c08dacf2d3eb092e507c213e7955a0e132297",
+ "containerID": "docker://95013a49a1705a503f5f7dde7a38fa7277523a73cdef96d264fcefe170e8a921",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ },
+ {
+ "metadata": {
+ "name": "deployment-ricplt-rsm-88477585f-qkkj7",
+ "generateName": "deployment-ricplt-rsm-88477585f-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-rsm-88477585f-qkkj7",
+ "uid": "d4c58ff4-743e-4ed6-bd36-aeb02daa1ca6",
+ "resourceVersion": "2945642",
+ "creationTimestamp": "2019-10-18T16:15:07Z",
+ "labels": {
+ "app": "ricplt-rsm",
+ "group": "nagios",
+ "pod-template-hash": "88477585f",
+ "release": "r1-rsm"
+ },
+ "annotations": {
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-rsm-88477585f",
+ "uid": "1fe7de57-90d9-4898-9b71-1ae9c4a6f014",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "local-router-file",
+ "configMap": {
+ "name": "configmap-ricplt-rsm-router-configmap",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "local-configuration-file",
+ "configMap": {
+ "name": "configmap-ricplt-rsm",
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "default-token-5j24g",
+ "secret": {
+ "secretName": "default-token-5j24g",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-rsm",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-rsm:2.0.7",
+ "ports": [
+ {
+ "name": "http",
+ "containerPort": 4800,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrroute",
+ "containerPort": 4561,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrdata",
+ "containerPort": 4801,
+ "protocol": "TCP"
+ }
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-rsm-env"
+ }
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "local-router-file",
+ "mountPath": "/opt/RSM/router.txt",
+ "subPath": "router.txt"
+ },
+ {
+ "name": "local-configuration-file",
+ "mountPath": "/opt/RSM/resources/configuration.yaml",
+ "subPath": "configuration.yaml"
+ },
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always",
+ "securityContext": {
+ "privileged": false
+ },
+ "stdin": true,
+ "tty": true
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "serviceAccountName": "default",
+ "serviceAccount": "default",
+ "nodeName": "172.29.16.203",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "hostname": "rsm",
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:07Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:09Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:09Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:07Z"
+ }
+ ],
+ "hostIP": "172.29.16.203",
+ "podIP": "10.244.3.253",
+ "podIPs": [
+ {
+ "ip": "10.244.3.253"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:07Z",
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-rsm",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:08Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-rsm:2.0.7",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/ric-plt-rsm@sha256:e6fb3bc17fcd5a2fbc7d34eeb744fbfed4eaaaf6c669e084b379ee05368820d3",
+ "containerID": "docker://5e90673a6b2c292f2ce7c731bf8747c8a63f429eca08d08a993130001c7d6f5e",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ },
+ {
+ "metadata": {
+ "name": "deployment-ricplt-submgr-7549b87fb8-4t6mx",
+ "generateName": "deployment-ricplt-submgr-7549b87fb8-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-submgr-7549b87fb8-4t6mx",
+ "uid": "c6fbd48b-2757-421c-a534-f1931b04312b",
+ "resourceVersion": "2945646",
+ "creationTimestamp": "2019-10-18T16:15:05Z",
+ "labels": {
+ "app": "ricplt-submgr",
+ "group": "nagios",
+ "pod-template-hash": "7549b87fb8",
+ "release": "r1-submgr"
+ },
+ "annotations": {
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-submgr-7549b87fb8",
+ "uid": "e2b9dd9f-cca4-4f64-9e11-b6ee174c4f6f",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "config-volume",
+ "configMap": {
+ "name": "submgrcfg",
+ "items": [
+ {
+ "key": "submgrcfg",
+ "path": "submgr-config.yaml",
+ "mode": 420
+ }
+ ],
+ "defaultMode": 420
+ }
+ },
+ {
+ "name": "default-token-5j24g",
+ "secret": {
+ "secretName": "default-token-5j24g",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-submgr",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-submgr:0.10.5",
+ "command": [
+ "/run_submgr.sh"
+ ],
+ "ports": [
+ {
+ "name": "http",
+ "containerPort": 3800,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrroute",
+ "containerPort": 4561,
+ "protocol": "TCP"
+ },
+ {
+ "name": "rmrdata",
+ "containerPort": 4560,
+ "protocol": "TCP"
+ }
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-submgr-env"
+ }
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "config-volume",
+ "mountPath": "/cfg"
+ },
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "serviceAccountName": "default",
+ "serviceAccount": "default",
+ "nodeName": "172.29.16.205",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "hostname": "submgr",
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:05Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:07Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:07Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:05Z"
+ }
+ ],
+ "hostIP": "172.29.16.205",
+ "podIP": "10.244.0.168",
+ "podIPs": [
+ {
+ "ip": "10.244.0.168"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:05Z",
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-submgr",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:07Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-submgr:0.10.5",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/ric-plt-submgr@sha256:aa8ada253d0800a849b6124fc54793815caaf93ad46b8d47cdd1f590ef69f813",
+ "containerID": "docker://724ba7834ef80d1f3c85ae7990ead480ed5226f0275816bae358edc9ddf54da6",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ },
+ {
+ "metadata": {
+ "name": "deployment-ricplt-vespamgr-55f6484b7-g5zfw",
+ "generateName": "deployment-ricplt-vespamgr-55f6484b7-",
+ "namespace": "ricplt",
+ "selfLink": "/api/v1/namespaces/ricplt/pods/deployment-ricplt-vespamgr-55f6484b7-g5zfw",
+ "uid": "a7ae0f4a-adfa-48c6-8c41-725ba1c84b11",
+ "resourceVersion": "2945649",
+ "creationTimestamp": "2019-10-18T16:15:06Z",
+ "labels": {
+ "app": "ricplt-vespamgr",
+ "group": "nagios",
+ "pod-template-hash": "55f6484b7",
+ "release": "r1-vespamgr"
+ },
+ "annotations": {
+ "kubernetes.io/psp": "caas-default"
+ },
+ "ownerReferences": [
+ {
+ "apiVersion": "apps/v1",
+ "kind": "ReplicaSet",
+ "name": "deployment-ricplt-vespamgr-55f6484b7",
+ "uid": "dc5e0e81-23da-4fed-99da-14cb7a8fe06c",
+ "controller": true,
+ "blockOwnerDeletion": true
+ }
+ ]
+ },
+ "spec": {
+ "volumes": [
+ {
+ "name": "default-token-5j24g",
+ "secret": {
+ "secretName": "default-token-5j24g",
+ "defaultMode": 420
+ }
+ }
+ ],
+ "containers": [
+ {
+ "name": "container-ricplt-vespamgr",
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-vespamgr:0.0.5",
+ "ports": [
+ {
+ "name": "http",
+ "containerPort": 8080,
+ "protocol": "TCP"
+ }
+ ],
+ "envFrom": [
+ {
+ "configMapRef": {
+ "name": "configmap-ricplt-vespamgr"
+ }
+ },
+ {
+ "secretRef": {
+ "name": "vespa-secrets"
+ }
+ }
+ ],
+ "env": [
+ {
+ "name": "VESMGR_APPMGRDOMAIN",
+ "value": "appmgr-service"
+ }
+ ],
+ "resources": {
+
+ },
+ "volumeMounts": [
+ {
+ "name": "default-token-5j24g",
+ "readOnly": true,
+ "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
+ }
+ ],
+ "livenessProbe": {
+ "httpGet": {
+ "path": "/supervision",
+ "port": 8080,
+ "scheme": "HTTP"
+ },
+ "initialDelaySeconds": 30,
+ "timeoutSeconds": 20,
+ "periodSeconds": 60,
+ "successThreshold": 1,
+ "failureThreshold": 3
+ },
+ "terminationMessagePath": "/dev/termination-log",
+ "terminationMessagePolicy": "File",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "serviceAccountName": "default",
+ "serviceAccount": "default",
+ "nodeName": "172.29.16.204",
+ "securityContext": {
+
+ },
+ "imagePullSecrets": [
+ {
+ "name": "docker-reg-cred"
+ }
+ ],
+ "hostname": "vespamgr",
+ "schedulerName": "default-scheduler",
+ "enableServiceLinks": true
+ },
+ "status": {
+ "phase": "Running",
+ "conditions": [
+ {
+ "type": "Initialized",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:06Z"
+ },
+ {
+ "type": "Ready",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:08Z"
+ },
+ {
+ "type": "ContainersReady",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:08Z"
+ },
+ {
+ "type": "PodScheduled",
+ "status": "True",
+ "lastProbeTime": null,
+ "lastTransitionTime": "2019-10-18T16:15:06Z"
+ }
+ ],
+ "hostIP": "172.29.16.204",
+ "podIP": "10.244.2.101",
+ "podIPs": [
+ {
+ "ip": "10.244.2.101"
+ }
+ ],
+ "startTime": "2019-10-18T16:15:06Z",
+ "containerStatuses": [
+ {
+ "name": "container-ricplt-vespamgr",
+ "state": {
+ "running": {
+ "startedAt": "2019-10-18T16:15:08Z"
+ }
+ },
+ "lastState": {
+
+ },
+ "ready": true,
+ "restartCount": 0,
+ "image": "registry.kube-system.svc.rec.io:5555/ric/ric-plt-vespamgr:0.0.5",
+ "imageID": "docker-pullable://registry.kube-system.svc.rec.io:5555/ric/ric-plt-vespamgr@sha256:97753ef72471a5fddd59ff35a2fe763b041848f6e83214acb78ad73c7316b371",
+ "containerID": "docker://80884c969cbf802945c075afc47d747b5e747e4645c691d376820c9d61094e7c",
+ "started": true
+ }
+ ],
+ "qosClass": "BestEffort"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/dashboard/webapp-backend/src/test/resources/demo-policy-schema-1.json b/dashboard/webapp-backend/src/test/resources/demo-policy-schema-1.json
new file mode 100644
index 0000000..09999ef
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/demo-policy-schema-1.json
@@ -0,0 +1,53 @@
+{
+ "type": "object",
+ "title": "Car",
+ "properties": {
+ "make": {
+ "type": "string",
+ "enum": [
+ "Toyota",
+ "BMW",
+ "Honda",
+ "Ford",
+ "Chevy",
+ "VW"
+ ]
+ },
+ "model": {
+ "type": "string"
+ },
+ "year": {
+ "type": "integer",
+ "enum": [
+ 1995,
+ 1996,
+ 1997,
+ 1998,
+ 1999,
+ 2000,
+ 2001,
+ 2002,
+ 2003,
+ 2004,
+ 2005,
+ 2006,
+ 2007,
+ 2008,
+ 2009,
+ 2010,
+ 2011,
+ 2012,
+ 2013,
+ 2014
+ ],
+ "default": 2008
+ },
+ "safety": {
+ "type": "integer",
+ "format": "rating",
+ "maximum": 5,
+ "exclusiveMaximum": false,
+ "readonly": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/dashboard/webapp-backend/src/test/resources/demo-policy-schema-2.json b/dashboard/webapp-backend/src/test/resources/demo-policy-schema-2.json
new file mode 100644
index 0000000..69ec678
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/demo-policy-schema-2.json
@@ -0,0 +1,21 @@
+{
+ "$id": "https://example.com/person.schema.json",
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Person",
+ "type": "object",
+ "properties": {
+ "firstName": {
+ "type": "string",
+ "description": "The person's first name."
+ },
+ "lastName": {
+ "type": "string",
+ "description": "The person's last name."
+ },
+ "age": {
+ "description": "Age in years which must be equal to or greater than zero.",
+ "type": "integer",
+ "minimum": 0
+ }
+ }
+}
\ No newline at end of file
diff --git a/dashboard/webapp-backend/src/test/resources/demo-policy-schema-3.json b/dashboard/webapp-backend/src/test/resources/demo-policy-schema-3.json
new file mode 100644
index 0000000..3be9959
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/demo-policy-schema-3.json
@@ -0,0 +1,39 @@
+{
+ "$id": "https://example.com/arrays.schema.json",
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "description": "A representation of a person, company, organization, or place",
+ "type": "object",
+ "properties": {
+ "fruits": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "vegetables": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/veggie"
+ }
+ }
+ },
+ "definitions": {
+ "veggie": {
+ "type": "object",
+ "required": [
+ "veggieName",
+ "veggieLike"
+ ],
+ "properties": {
+ "veggieName": {
+ "type": "string",
+ "description": "The name of the vegetable."
+ },
+ "veggieLike": {
+ "type": "boolean",
+ "description": "Do I like this vegetable?"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/dashboard/webapp-backend/src/test/resources/key.properties b/dashboard/webapp-backend/src/test/resources/key.properties
new file mode 100644
index 0000000..85a5689
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/key.properties
@@ -0,0 +1,22 @@
+# ========================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===================================
+
+# Test properties for the EPSDK-FW library.
+# This file must be present on the Java classpath.
+
+cipher.enc.key = bogus
diff --git a/dashboard/webapp-backend/src/test/resources/portal.properties b/dashboard/webapp-backend/src/test/resources/portal.properties
new file mode 100644
index 0000000..326539e
--- /dev/null
+++ b/dashboard/webapp-backend/src/test/resources/portal.properties
@@ -0,0 +1,26 @@
+# ========================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===================================
+
+# Test properties for the EPSDK-FW library.
+# This file must be present on the Java classpath.
+
+portal.api.impl.class = org.oransc.ric.portal.dashboard.portalapi.PortalRestCentralServiceImpl
+role_access_centralized = remote
+ecomp_redirect_url = https://www.wikipedia.org
+ecomp_rest_url = http://localhost/portal
+ueb_app_key = abcdef1234567890