Revise front-end buildPath support 05/2105/3
authorLott, Christopher (cl778h) <cl778h@att.com>
Tue, 24 Dec 2019 14:16:04 +0000 (09:16 -0500)
committerLott, Christopher (cl778h) <cl778h@att.com>
Tue, 24 Dec 2019 15:46:42 +0000 (10:46 -0500)
Extend buildPath so the RIC instance argument is optional.
Move buildPath function to DashboardCommon, drop Common.
Revise mock answers to vary by RIC instance.

Change-Id: I58846920d7f4a47c2211f25668ce1ec32800fe36
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
18 files changed:
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/A1MediatorMockConfiguration.java
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/AppManagerMockConfiguration.java
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/CaasIngressMockConfiguration.java
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java
webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/config/RICInstanceMockConfiguration.java
webapp-backend/src/test/resources/caas-ingress-ricplt-pods-1.json [moved from webapp-backend/src/test/resources/caas-ingress-ricplt-pods.json with 100% similarity]
webapp-backend/src/test/resources/caas-ingress-ricplt-pods-2.json [new file with mode: 0644]
webapp-frontend/src/app/rd.module.ts
webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts
webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts
webapp-frontend/src/app/services/caas-ingress/caas-ingress.service.ts
webapp-frontend/src/app/services/common/common.service.spec.ts [deleted file]
webapp-frontend/src/app/services/common/common.service.ts [deleted file]
webapp-frontend/src/app/services/dashboard/dashboard.service.ts
webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts
webapp-frontend/src/app/services/instance-selector/instance-selector.service.ts
webapp-frontend/src/app/services/stats/stats.service.ts
webapp-frontend/src/app/stats/stats.component.ts

index d3ac7a7..0694fb2 100644 (file)
@@ -60,7 +60,7 @@ public class A1MediatorMockConfiguration {
        private final Map<String, String> appPolicyMap;
 
        public A1MediatorMockConfiguration(@Value("${mock.config.delay:0}") int delayMs) {
-               logger.info("ctor: mock A1 Mediator configured with delay {}", delayMs);
+               logger.debug("ctor: configured with delay {}", delayMs);
                this.delayMs = delayMs;
                appPolicyMap = new HashMap<>();
                // Define a mock AC policy
@@ -81,7 +81,7 @@ public class A1MediatorMockConfiguration {
                return mockClient;
        }
 
-       private A1MediatorApi a1MediatorApi() {
+       private A1MediatorApi a1MediatorApi(String instanceKey) {
                ApiClient apiClient = apiClient();
                A1MediatorApi mockApi = mock(A1MediatorApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
@@ -109,9 +109,11 @@ public class A1MediatorMockConfiguration {
        @Bean
        // Must use the same name as the non-mock configuration
        public A1MediatorApiBuilder a1MediatorApiBuilder() {
-               final A1MediatorApi mockApi = a1MediatorApi();
                final A1MediatorApiBuilder mockBuilder = mock(A1MediatorApiBuilder.class);
-               when(mockBuilder.getA1MediatorApi(any(String.class))).thenReturn(mockApi);
+               for (final String key : RICInstanceMockConfiguration.INSTANCE_KEYS) {
+                       final A1MediatorApi mockApi = a1MediatorApi(key);
+                       when(mockBuilder.getA1MediatorApi(key)).thenReturn(mockApi);
+               }
                return mockBuilder;
        }
 
index 6b0517e..3e27120 100644 (file)
@@ -25,6 +25,7 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 import java.lang.invoke.MethodHandles;
+import java.util.Arrays;
 
 import org.oransc.ric.plt.appmgr.client.api.HealthApi;
 import org.oransc.ric.plt.appmgr.client.api.XappApi;
@@ -42,6 +43,7 @@ import org.oransc.ric.plt.appmgr.client.model.Xapp.StatusEnum;
 import org.oransc.ric.plt.appmgr.client.model.XappInstance;
 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;
@@ -59,35 +61,20 @@ public class AppManagerMockConfiguration {
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
        // Simulate remote method delay for UI testing
-       @Value("${mock.config.delay:0}")
        private int delayMs;
 
-       private final AllDeployableXapps deployableApps;
-       private final AllDeployedXapps deployedXapps;
-       private final AllXappConfig allXappConfigs;
-       private final SubscriptionResponse subRes;
-
-       public AppManagerMockConfiguration() {
-               logger.info("Configuring mock xApp Manager");
-               final String[] appNames = { "AdmissionControl", "UE Event Collector" };
-               final String configJson = " { \"config\" : \"example\" }";
-               final String descriptorJson = " { \"descriptor\" : \"example\" }";
-               allXappConfigs = new AllXappConfig();
-               deployableApps = new AllDeployableXapps();
-               deployedXapps = new AllDeployedXapps();
-               for (String n : appNames) {
-                       ConfigMetadata metadata = new ConfigMetadata().configName("config-" + n).name(n).namespace("namespace");
-                       XAppConfig config = new XAppConfig().config(configJson).descriptor(descriptorJson).metadata(metadata);
-                       allXappConfigs.add(config);
-                       deployableApps.add(n);
-                       Xapp xapp = new Xapp().name(n).version("version").status(StatusEnum.UNKNOWN);
-                       xapp.addInstancesItem(new XappInstance().name("abcd-1234").ip("127.0.0.1").port(200)
-                                       .status(XappInstance.StatusEnum.RUNNING));
-                       deployedXapps.add(xapp);
-               }
-               subRes = new SubscriptionResponse().eventType(SubscriptionResponse.EventTypeEnum.ALL).id("subid").version(1);
+       @Autowired
+       public AppManagerMockConfiguration(@Value("${mock.config.delay:0}") int delayMs) {
+               logger.debug("ctor: configured with delay {}", delayMs);
+               this.delayMs = delayMs;
        }
 
+       /**
+        * Builds a mock HealthApi object. Does not accept an instance key because this
+        * API answers no text.
+        * 
+        * @return mock HealthApi
+        */
        private HealthApi healthApi() {
                ApiClient mockClient = mock(ApiClient.class);
                when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
@@ -98,7 +85,39 @@ public class AppManagerMockConfiguration {
                return mockApi;
        }
 
-       private XappApi xappApi() {
+       /**
+        * Builds a mock XappApi object.
+        * 
+        * @param instanceKey
+        *                        RIC instance
+        * @return Object that returns instance-specific results
+        */
+       private XappApi xappApi(String instanceKey) {
+               logger.debug("Creating XappApi for instance {}", instanceKey);
+               // Create instance-specific objects
+               String[] appNames = { "AdmissionControl " + instanceKey, "UE Event Collector " + instanceKey };
+               if (RICInstanceMockConfiguration.INSTANCE_KEY_1.equals(instanceKey)) {
+                       appNames = Arrays.copyOf(appNames, appNames.length + 1);
+                       appNames[appNames.length - 1] = "ANR " + instanceKey;
+               }
+               final String configJson = " { \"config\" : \"example-" + instanceKey + "\"}";
+               final String descriptorJson = " { \"descriptor\" : \"example-" + instanceKey + "\"}";
+               final AllXappConfig allXappConfigs = new AllXappConfig();
+               final AllDeployableXapps deployableApps = new AllDeployableXapps();
+               final AllDeployedXapps deployedXapps = new AllDeployedXapps();
+               for (String n : appNames) {
+                       ConfigMetadata metadata = new ConfigMetadata().configName("config-" + n).name(n).namespace("namespace");
+                       XAppConfig config = new XAppConfig().config(configJson).descriptor(descriptorJson).metadata(metadata);
+                       allXappConfigs.add(config);
+                       deployableApps.add(n);
+                       Xapp xapp = new Xapp().name(n).version("version").status(StatusEnum.UNKNOWN);
+                       xapp.addInstancesItem(new XappInstance().name("abcd-1234").ip("127.0.0.1").port(200)
+                                       .status(XappInstance.StatusEnum.RUNNING));
+                       deployedXapps.add(xapp);
+               }
+               final SubscriptionResponse subRes = new SubscriptionResponse().eventType(SubscriptionResponse.EventTypeEnum.ALL)
+                               .id("subid").version(1);
+               // Mock the methods to return the instance-specific objects
                ApiClient mockClient = mock(ApiClient.class);
                when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
                XappApi mockApi = mock(XappApi.class);
@@ -189,8 +208,10 @@ public class AppManagerMockConfiguration {
                final AppManagerApiBuilder mockBuilder = mock(AppManagerApiBuilder.class);
                final HealthApi mockHealthApi = healthApi();
                when(mockBuilder.getHealthApi(any(String.class))).thenReturn(mockHealthApi);
-               final XappApi mockXappApi = xappApi();
-               when(mockBuilder.getXappApi(any(String.class))).thenReturn(mockXappApi);
+               for (final String key : RICInstanceMockConfiguration.INSTANCE_KEYS) {
+                       final XappApi mockXappApi = xappApi(key);
+                       when(mockBuilder.getXappApi(key)).thenReturn(mockXappApi);
+               }
                return mockBuilder;
        }
 
index 1420086..96ccbb8 100644 (file)
@@ -32,6 +32,7 @@ import java.lang.invoke.MethodHandles;
 import org.oransc.ric.portal.dashboard.k8sapi.SimpleKubernetesClient;
 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;
@@ -48,15 +49,12 @@ public class CaasIngressMockConfiguration {
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
        // Simulate remote method delay for UI testing
-       @Value("${mock.config.delay:0}")
        private int delayMs;
 
-       private final String pltPods;
-
-       public CaasIngressMockConfiguration() throws IOException {
-               logger.info("Configuring mock CAAS-Ingres clients");
-               // Files in src/test/resources
-               pltPods = readDataFromPath("caas-ingress-ricplt-pods.json");
+       @Autowired
+       public CaasIngressMockConfiguration(@Value("${mock.config.delay:0}") int delayMs) {
+               logger.debug("ctor: configured with delay {}", delayMs);
+               this.delayMs = delayMs;
        }
 
        private String readDataFromPath(String path) throws IOException {
@@ -77,11 +75,21 @@ public class CaasIngressMockConfiguration {
                return sb.toString();
        }
 
-       private SimpleKubernetesClient simpleKubernetesClient() {
+       private SimpleKubernetesClient simpleKubernetesClient(String instanceKey) throws IOException {
+               // File in src/test/resources
+               String pltPods;
+               if (RICInstanceMockConfiguration.INSTANCE_KEY_1.equals(instanceKey))
+                       pltPods = readDataFromPath("caas-ingress-ricplt-pods-1.json");
+               else
+                       pltPods = readDataFromPath("caas-ingress-ricplt-pods-2.json");
                SimpleKubernetesClient mockClient = mock(SimpleKubernetesClient.class);
                doAnswer(inv -> {
                        String ns = inv.<String>getArgument(0);
                        logger.debug("listPods for namespace {}", ns);
+                       if (delayMs > 0) {
+                               logger.debug("listPods sleeping {}", delayMs);
+                               Thread.sleep(delayMs);
+                       }
                        if ("ricplt".equals(ns))
                                return pltPods;
                        else
@@ -92,10 +100,12 @@ public class CaasIngressMockConfiguration {
 
        @Bean
        // The bean (method) name must be globally unique
-       public SimpleKubernetesClientBuilder simpleKubernetesClientBuilder() {
+       public SimpleKubernetesClientBuilder simpleKubernetesClientBuilder() throws IOException {
                final SimpleKubernetesClientBuilder mockBuilder = mock(SimpleKubernetesClientBuilder.class);
-               SimpleKubernetesClient client = simpleKubernetesClient();
-               when(mockBuilder.getSimpleKubernetesClient(any(String.class))).thenReturn(client);
+               for (final String key : RICInstanceMockConfiguration.INSTANCE_KEYS) {
+                       SimpleKubernetesClient client = simpleKubernetesClient(key);
+                       when(mockBuilder.getSimpleKubernetesClient(key)).thenReturn(client);
+               }
                return mockBuilder;
        }
 
index 3f33f40..16d2486 100644 (file)
@@ -40,6 +40,7 @@ import org.oransc.ric.e2mgr.client.model.ResetRequest;
 import org.oransc.ric.e2mgr.client.model.SetupRequest;
 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;
@@ -55,34 +56,16 @@ public class E2ManagerMockConfiguration {
 
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-       // Simulate remote method delay for UI testing
-       @Value("${mock.config.delay:0}")
-       private int delayMs;
-
        public static final String RAN_NAME_1 = "Connected-RAN";
        public static final String RAN_NAME_2 = "Unknown-RAN";
 
-       private final List<NodebIdentity> nodebIdList;
-       private final Map<String, GetNodebResponse> nodebResponseMap;
-       private final NodebIdentityGlobalNbId globalNbId;
+       // Simulate remote method delay for UI testing
+       private int delayMs;
 
-       public E2ManagerMockConfiguration() {
-               logger.info("Configuring mock E2 Manager");
-               globalNbId = new NodebIdentityGlobalNbId().nbId("mockNbId").plmnId("mockPlmId");
-               nodebIdList = new ArrayList<>();
-               nodebResponseMap = new HashMap<>();
-               // Complete entry
-               nodebIdList.add(new NodebIdentity().inventoryName(RAN_NAME_1).globalNbId(globalNbId));
-               nodebResponseMap.put(RAN_NAME_1, new GetNodebResponse().connectionStatus("CONNECTED").failureType("")
-                               .ip("127.0.0.1").nodeType("mockNodeType").port(123).ranName(RAN_NAME_1));
-               // Partial entry
-               // [{"nodebIdentity":{"globalNbId":null,"inventoryName":"AAAA123456"},
-               // "nodebStatus":{"connectionStatus":"CONNECTING","enb":null,"failureType":null,
-               // "globalNbId":null,"gnb":null,"ip":"10.2.0.6","nodeType":null,"port":36444,
-               // "ranName":"AAAA123456","setupFailure":null}}]
-               nodebIdList.add(new NodebIdentity().inventoryName(RAN_NAME_2));
-               nodebResponseMap.put(RAN_NAME_2,
-                               new GetNodebResponse().connectionStatus("CONNECTING").ip("127.0.0.2").port(456).ranName(RAN_NAME_2));
+       @Autowired
+       public E2ManagerMockConfiguration(@Value("${mock.config.delay:0}") int delayMs) {
+               logger.debug("ctor: configured with delay {}", delayMs);
+               this.delayMs = delayMs;
        }
 
        private ApiClient apiClient() {
@@ -99,7 +82,32 @@ public class E2ManagerMockConfiguration {
                return mockApi;
        }
 
-       private NodebApi nodebApi() {
+       /**
+        * Builds a mock NodebApi object.
+        * 
+        * @param instanceKey
+        *                        RIC instance
+        * @return Object that returns instance-specific results
+        */
+       private NodebApi nodebApi(String instanceKey) {
+
+               final NodebIdentityGlobalNbId globalNbId = new NodebIdentityGlobalNbId().nbId("mockNbId-" + instanceKey)
+                               .plmnId("mockPlmId");
+               final List<NodebIdentity> nodebIdList = new ArrayList<>();
+               final Map<String, GetNodebResponse> nodebResponseMap = new HashMap<>();
+               // Complete entry
+               nodebIdList.add(new NodebIdentity().inventoryName(RAN_NAME_1).globalNbId(globalNbId));
+               nodebResponseMap.put(RAN_NAME_1, new GetNodebResponse().connectionStatus("CONNECTED").failureType("")
+                               .ip("127.0.0.1").nodeType("mockNodeType").port(123).ranName(RAN_NAME_1));
+               // Partial entry
+               // [{"nodebIdentity":{"globalNbId":null,"inventoryName":"AAAA123456"},
+               // "nodebStatus":{"connectionStatus":"CONNECTING","enb":null,"failureType":null,
+               // "globalNbId":null,"gnb":null,"ip":"10.2.0.6","nodeType":null,"port":36444,
+               // "ranName":"AAAA123456","setupFailure":null}}]
+               nodebIdList.add(new NodebIdentity().inventoryName(RAN_NAME_2));
+               nodebResponseMap.put(RAN_NAME_2,
+                               new GetNodebResponse().connectionStatus("CONNECTING").ip("127.0.0.2").port(456).ranName(RAN_NAME_2));
+
                ApiClient apiClient = apiClient();
                NodebApi mockApi = mock(NodebApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
@@ -166,8 +174,10 @@ public class E2ManagerMockConfiguration {
                final E2ManagerApiBuilder mockBuilder = mock(E2ManagerApiBuilder.class);
                final HealthCheckApi mockHealthCheckApi = healthCheckApi();
                when(mockBuilder.getHealthCheckApi(any(String.class))).thenReturn(mockHealthCheckApi);
-               final NodebApi mockNodebApi = nodebApi();
-               when(mockBuilder.getNodebApi(any(String.class))).thenReturn(mockNodebApi);
+               for (final String key : RICInstanceMockConfiguration.INSTANCE_KEYS) {
+                       final NodebApi mockNodebApi = nodebApi(key);
+                       when(mockBuilder.getNodebApi(key)).thenReturn(mockNodebApi);
+               }
                return mockBuilder;
        }
 
index 2f9e82c..4b1158e 100644 (file)
 
 package org.oransc.ric.portal.dashboard.config;
 
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.oransc.ric.portal.dashboard.model.RicInstance;
 import org.oransc.ric.portal.dashboard.model.RicInstanceList;
+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.Profile;
 import org.springframework.stereotype.Component;
@@ -36,21 +41,36 @@ import org.springframework.stereotype.Component;
 @Profile("test")
 public class RICInstanceMockConfiguration {
 
+       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
        // Publish constants for use in tests
        public static final String INSTANCE_KEY_1 = "i1";
        public static final String INSTANCE_KEY_2 = "i2";
+       public static final String[] INSTANCE_KEYS = { INSTANCE_KEY_1, INSTANCE_KEY_2 };
+
+       // Simulate remote method delay for UI testing
+       private int delayMs;
+
+       @Autowired
+       public RICInstanceMockConfiguration(@Value("${mock.config.delay:0}") int delayMs) {
+               logger.debug("ctor: configured with delay {}", delayMs);
+               this.delayMs = delayMs;
+       }
 
        @Bean
-       public RicInstanceList ricInstanceList() {
+       public RicInstanceList ricInstanceList() throws InterruptedException {
+               if (delayMs > 0) {
+                       logger.debug("ricInstanceList sleeping {}", delayMs);
+                       Thread.sleep(delayMs);
+               }
                List<RicInstance> instances = new ArrayList<>();
-               RicInstance i1 = new RicInstance().key(INSTANCE_KEY_1).name("Friendly Name One")
-                               .appUrlPrefix("http://foo.bar/app").pltUrlPrefix("http://foo.bar/plt")
-                               .caasUrlPrefix("http://foo.bar/caas");
-               instances.add(i1);
-               RicInstance i2 = new RicInstance().key(INSTANCE_KEY_2).name("Friendly Name Two")
-                               .appUrlPrefix("http://foo.bar/2/app").pltUrlPrefix("http://foo.bar/2/plt")
-                               .caasUrlPrefix("http://foo.bar/2/caas");
-               instances.add(i2);
+               for (String key : INSTANCE_KEYS) {
+                       RicInstance i = new RicInstance().key(key).name("RIC Instance " + key)
+                                       .appUrlPrefix("http://" + key + ".domain.name/app")
+                                       .pltUrlPrefix("http://" + key + ".domain.name/plt")
+                                       .caasUrlPrefix("http://" + key + ".domain.name/caas");
+                       instances.add(i);
+               }
                return new RicInstanceList(instances);
        }
 
diff --git a/webapp-backend/src/test/resources/caas-ingress-ricplt-pods-2.json b/webapp-backend/src/test/resources/caas-ingress-ricplt-pods-2.json
new file mode 100644 (file)
index 0000000..59193d5
--- /dev/null
@@ -0,0 +1,1676 @@
+{
+       "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"
+                       }
+               }
+       ]
+}
\ No newline at end of file
index e9944f1..98e50c9 100644 (file)
  * limitations under the License.
  * ========================LICENSE_END===================================
  */
-import { HttpClientModule } from '@angular/common/http';
-import { NgModule } from '@angular/core';
+
+ // Angular
+import { BrowserModule } from '@angular/platform-browser';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { ChartsModule } from 'ng2-charts';
 import { FlexLayoutModule } from '@angular/flex-layout';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { HttpClientModule } from '@angular/common/http';
+import { MDBBootstrapModule } from 'angular-bootstrap-md';
 import { MatButtonModule } from '@angular/material/button';
 import { MatButtonToggleModule } from '@angular/material/button-toggle';
 import { MatCardModule } from '@angular/material/card';
@@ -44,46 +49,43 @@ import { MatSortModule } from '@angular/material/sort';
 import { MatTableModule } from '@angular/material/table';
 import { MatTabsModule } from '@angular/material/tabs';
 import { MatTooltipModule } from '@angular/material/tooltip';
-import { BrowserModule } from '@angular/platform-browser';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { MDBBootstrapModule } from 'angular-bootstrap-md';
 import { MaterialDesignFrameworkModule } from 'angular6-json-schema-form';
-import { ChartsModule } from 'ng2-charts';
+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';
 import { CaasIngressComponent } from './caas-ingress/caas-ingress.component';
+import { CatalogCardComponent } from './ui/catalog-card/catalog-card.component';
 import { CatalogComponent } from './catalog/catalog.component';
+import { ConfirmDialogComponent } from './ui/confirm-dialog/confirm-dialog.component';
+import { ControlCardComponent } from './ui/control-card/control-card.component';
 import { ControlComponent } from './control/control.component';
-import { CommonService } from './services/common/common.service';
+import { EditDashboardUserDialogComponent } from './user/edit-dashboard-user-dialog/edit-dashboard-user-dialog.component';
+import { ErrorDialogComponent } from './ui/error-dialog/error-dialog.component';
 import { FooterComponent } from './footer/footer.component';
+import { LoadingDialogComponent } from './ui/loading-dialog/loading-dialog.component';
 import { MainComponent } from './main/main.component';
-import { SidenavListComponent } from './navigation/sidenav-list/sidenav-list.component';
 import { PlatformComponent } from './platform/platform.component';
 import { RanControlConnectDialogComponent } from './ran-control/ran-connection-dialog.component';
 import { RanControlComponent } from './ran-control/ran-control.component';
 import { RdRoutingModule } from './rd-routing.module';
 import { RdComponent } from './rd.component';
+import { SidenavListComponent } from './navigation/sidenav-list/sidenav-list.component';
+import { StatCardComponent } from './ui/stat-card/stat-card.component';
+import { StatsComponent } from './stats/stats.component';
+import { UserComponent } from './user/user.component';
+
+// RD services
 import { AppMgrService } from './services/app-mgr/app-mgr.service';
 import { DashboardService } from './services/dashboard/dashboard.service';
 import { E2ManagerService } from './services/e2-mgr/e2-mgr.service';
-import { InstanceSelectorService } from './services/instance-selector/instance-selector.service';
 import { ErrorDialogService } from './services/ui/error-dialog.service';
+import { InstanceSelectorService } from './services/instance-selector/instance-selector.service';
 import { UiService } from './services/ui/ui.service';
-import { StatsComponent } from './stats/stats.component';
-import { CatalogCardComponent } from './ui/catalog-card/catalog-card.component';
-import { ConfirmDialogComponent } from './ui/confirm-dialog/confirm-dialog.component';
-import { ControlCardComponent } from './ui/control-card/control-card.component';
-import { ErrorDialogComponent } from './ui/error-dialog/error-dialog.component';
-import { LoadingDialogComponent } from './ui/loading-dialog/loading-dialog.component';
-import { StatCardComponent } from './ui/stat-card/stat-card.component';
-import { AddDashboardUserDialogComponent } from './user/add-dashboard-user-dialog/add-dashboard-user-dialog.component';
-import { EditDashboardUserDialogComponent } from './user/edit-dashboard-user-dialog/edit-dashboard-user-dialog.component';
-import { UserComponent } from './user/user.component';
-
-
 
 @NgModule({
   declarations: [
@@ -177,7 +179,6 @@ import { UserComponent } from './user/user.component';
   ],
   providers: [
     AppMgrService,
-    CommonService,
     DashboardService,
     E2ManagerService,
     ErrorDialogService,
index 6e67b32..4e72317 100644 (file)
@@ -24,7 +24,7 @@ import { Observable } from 'rxjs';
 import { map } from 'rxjs/operators';
 import { ACAdmissionIntervalControl, ACAdmissionIntervalControlAck } from '../../interfaces/ac-xapp.types';
 import { DashboardSuccessTransport } from '../../interfaces/dashboard.types';
-import { CommonService } from '../common/common.service';
+import { DashboardService } from '../dashboard/dashboard.service';
 
 /**
  * Services for calling the Dashboard's A1 endpoints to get/put AC policies.
@@ -39,18 +39,17 @@ export class ACXappService {
   private acPolicyName = 'admission_control_policy';
 
   constructor(
-    private httpClient: HttpClient,
-    private commonSvc: CommonService) {
-    // injects to variable httpClient
+    private dashboardSvc: DashboardService,
+    private httpClient: HttpClient) {
   }
 
   /**
-   * Gets version details
-   * @returns Observable that should yield a String
+   * Gets AC client version details
+   * @returns Observable that yields a String
    */
-  getVersion(): Observable<string> {
-    const url = 'api/a1-p/version'
-    return this.httpClient.get<DashboardSuccessTransport>(url).pipe(
+  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'])
     );
@@ -58,21 +57,21 @@ export class ACXappService {
 
   /**
    * Gets admission control policy.
-   * @returns Observable that should yield an ACAdmissionIntervalControl
+   * @returns Observable that yields an ACAdmissionIntervalControl
    */
   getPolicy(instanceKey: string): Observable<ACAdmissionIntervalControl> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, this.policyPath, this.acPolicyName);
-    return this.httpClient.get<ACAdmissionIntervalControl>(url);
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.policyPath, this.acPolicyName);
+    return this.httpClient.get<ACAdmissionIntervalControl>(path);
   }
 
   /**
    * Puts admission control policy.
    * @param policy an instance of ACAdmissionIntervalControl
-   * @returns Observable that should yield a response code, no data
+   * @returns Observable that yields a response code, no data
    */
   putPolicy(instanceKey: string, policy: ACAdmissionIntervalControl): Observable<any> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, this.policyPath, this.acPolicyName);
-    return this.httpClient.put<ACAdmissionIntervalControlAck>(url, policy, { observe: 'response' });
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.policyPath, this.acPolicyName);
+    return this.httpClient.put<ACAdmissionIntervalControlAck>(path, policy, { observe: 'response' });
   }
 
 }
index 315139e..4bab77d 100644 (file)
@@ -21,50 +21,51 @@ import { HttpClient, HttpResponse } from '@angular/common/http';
 import { Injectable } from '@angular/core';
 import { Observable } from 'rxjs';
 import { XMDeployableApp, XMDeployedApp, XMXappInfo } from '../../interfaces/app-mgr.types';
-import { CommonService } from '../common/common.service';
+import { DashboardService } from '../dashboard/dashboard.service';
 
 @Injectable()
 export class AppMgrService {
 
   private component = 'appmgr';
+  private xappsPath = 'xapps';
 
   constructor(
-    private httpClient: HttpClient,
-    private commonSvc: CommonService) {
+    private dashboardSvc: DashboardService,
+    private httpClient: HttpClient) {
   }
 
   getDeployable(instanceKey: string): Observable<XMDeployableApp[]> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'xapps', 'list');
-    return this.httpClient.get<XMDeployableApp[]>(url);
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath, 'list');
+    return this.httpClient.get<XMDeployableApp[]>(path);
   }
 
   getDeployed(instanceKey: string): Observable<XMDeployedApp[]> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'xapps');
-    return this.httpClient.get<XMDeployedApp[]>(url);
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath);
+    return this.httpClient.get<XMDeployedApp[]>(path);
   }
 
   deployXapp(instanceKey: string, name: string): Observable<HttpResponse<Object>> {
     const xappInfo: XMXappInfo = { name: name };
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'xapps');
-    return this.httpClient.post(url, xappInfo, { observe: 'response' });
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath);
+    return this.httpClient.post(path, xappInfo, { observe: 'response' });
   }
 
   undeployXapp(instanceKey: string, name: string): Observable<HttpResponse<Object>> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'xapps', name);
-    return this.httpClient.delete(url, { observe: 'response' });
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath, name);
+    return this.httpClient.delete(path, { observe: 'response' });
   }
 
   getConfig(instanceKey: string): Observable<any[]> {
     // For demo purpose, pull example config from local
     return this.httpClient.get<any[]>("/assets/mockdata/config.json");
     // Once Xapp manager contains layout, should call backend to get xapp config 
-    //const url = this.commonSvc.buildPath(instanceKey, this.component, 'config');
-    //return this.httpClient.get<any[]>(url);
+    //const path = this.dashboardSvc.buildPath(this.component, instanceKey, 'config');
+    //return this.httpClient.get<any[]>(path);
   }
 
   putConfig(instanceKey: string, config: any): Observable<HttpResponse<Object>> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'config');
-    return this.httpClient.put(url, config, { observe: 'response' });
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, 'config');
+    return this.httpClient.put(path, config, { observe: 'response' });
   }
 
 }
index 42cb928..9b42a48 100644 (file)
@@ -22,7 +22,7 @@ import { HttpClient } from '@angular/common/http';
 import { Injectable } from '@angular/core';
 import { V1PodList } from '@kubernetes/client-node';
 import { Observable } from 'rxjs';
-import { CommonService } from '../common/common.service';
+import { DashboardService } from '../dashboard/dashboard.service';
 
 /**
 * Services for calling the Dashboard's caas-ingress endpoints to get Kubernetes details.
@@ -36,9 +36,8 @@ export class CaasIngressService {
   private podsPath = 'pods';
 
   constructor(
-    private httpClient: HttpClient,
-    private commonSvc: CommonService) {
-    // injects to variable httpClient
+    private dashboardSvc: DashboardService,
+    private httpClient: HttpClient) {
   }
 
   /**
@@ -46,8 +45,8 @@ export class CaasIngressService {
    * @returns Observable that should yield a V1PodList
    */
   getPodList(instanceKey: string, cluster: string, namespace: string): Observable<V1PodList> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'pods', 'cluster', cluster, 'namespace', namespace);
-    return this.httpClient.get<V1PodList>(url);
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, 'pods', 'cluster', cluster, 'namespace', namespace);
+    return this.httpClient.get<V1PodList>(path);
   }
 
 }
diff --git a/webapp-frontend/src/app/services/common/common.service.spec.ts b/webapp-frontend/src/app/services/common/common.service.spec.ts
deleted file mode 100644 (file)
index 54eaeb5..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================LICENSE_END===================================
- */
-
-import { TestBed } from '@angular/core/testing';
-
-import { CommonService } from './common.service';
-
-describe('CommonService', () => {
-  beforeEach(() => TestBed.configureTestingModule({}));
-
-  it('should be created', () => {
-    const service: CommonService = TestBed.get(CommonService);
-    expect(service).toBeTruthy();
-  });
-});
diff --git a/webapp-frontend/src/app/services/common/common.service.ts b/webapp-frontend/src/app/services/common/common.service.ts
deleted file mode 100644 (file)
index 82d2cf2..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===================================
- */
-
-import { Injectable } from '@angular/core';
-
-@Injectable({
-  providedIn: 'root'
-})
-export class CommonService {
-
-  constructor() { }
-
-  buildPath(instanceKey: string, component: string, ...args: any[]) {
-    let result = 'api/' + component + '/ric/' + instanceKey;
-    args.forEach(part => {
-      result = result + '/' + part;
-    });
-    return result;
-  }
-
-}
index a9f2df6..ef30e47 100644 (file)
@@ -17,8 +17,8 @@
  * limitations under the License.
  * ========================LICENSE_END===================================
  */
-import { Injectable } from '@angular/core';
 import { HttpClient } from '@angular/common/http';
+import { Injectable } from '@angular/core';
 import { Observable } from 'rxjs';
 import { DashboardSuccessTransport, EcompUser } from '../../interfaces/dashboard.types';
 
@@ -31,34 +31,58 @@ import { DashboardSuccessTransport, EcompUser } from '../../interfaces/dashboard
  */
 export class DashboardService {
 
-  private basePath = 'api/admin/';
+  private adminPath = 'admin';
 
   constructor(private httpClient: HttpClient) {
     // injects to variable httpClient
   }
 
- /**
-   * Checks app health
-   * @returns Observable that should yield a DashboardSuccessTransport
+  /**
+   * Builds the path for a controller method (including arguments) to use as the
+   * first argument to a HTTP client method.
+   * This function encapsulates the API prefix and RIC instance constants.
+   * @param component Controller method prefix; e.g., "admin"
+   * @param instanceKey RIC instance key; e.g., "i1" (optional).
+   * If null or empty, adds no RIC instance path components.
+   * @param args List of method path components, argument keys and values
+   * @returns Path string; e.g., "api/admin/method2/arg1/foo"
    */
+  buildPath(component: string, instanceKey: string, ...args: any[]) {
+    let result = 'api/' + component;
+    if (instanceKey) {
+      result = result + '/ric/' + instanceKey;
+    }
+    args.forEach(part => {
+      result = result + '/' + part;
+    });
+    return result;
+  }
+
+  /**
+    * Checks app health
+    * @returns Observable that yields a DashboardSuccessTransport
+    */
   getHealth(): Observable<DashboardSuccessTransport> {
-    return this.httpClient.get<DashboardSuccessTransport>(this.basePath + 'health');
+    const path = this.buildPath(this.adminPath, null, 'health');
+    return this.httpClient.get<DashboardSuccessTransport>(path);
   }
 
   /**
    * Gets Dashboard version details
-   * @returns Observable that should yield a DashboardSuccessTransport object
+   * @returns Observable that yields a DashboardSuccessTransport object
    */
   getVersion(): Observable<DashboardSuccessTransport> {
-    return this.httpClient.get<DashboardSuccessTransport>(this.basePath + 'version');
+    const path = this.buildPath(this.adminPath, null, 'version');
+    return this.httpClient.get<DashboardSuccessTransport>(path);
   }
 
   /**
    * Gets Dashboard users
-   * @returns Observable that should yield a EcompUser array
+   * @returns Observable that yields an EcompUser array
    */
   getUsers(): Observable<EcompUser[]> {
-    return this.httpClient.get<EcompUser[]>(this.basePath + 'user');
+    const path = this.buildPath(this.adminPath, null, 'user');
+    return this.httpClient.get<EcompUser[]>(path);
   }
 
 }
index dc088a2..45d7b58 100644 (file)
@@ -23,7 +23,7 @@ import { Observable } from 'rxjs';
 import { map } from 'rxjs/operators';
 import { DashboardSuccessTransport } from '../../interfaces/dashboard.types';
 import { E2RanDetails, E2SetupRequest } from '../../interfaces/e2-mgr.types';
-import { CommonService } from '../common/common.service';
+import { DashboardService } from '../dashboard/dashboard.service';
 
 @Injectable({
   providedIn: 'root'
@@ -32,20 +32,20 @@ import { CommonService } from '../common/common.service';
 export class E2ManagerService {
 
   private component = 'e2mgr';
+  private nodebPath = 'nodeb';
 
   constructor(
-    private httpClient: HttpClient,
-    private commonSvc: CommonService) {
-    // injects to variable httpClient
+    private dashboardSvc: DashboardService,
+    private httpClient: HttpClient) {
   }
 
   /**
    * Gets E2 client version details
-   * @returns Observable that should yield a String
+   * @returns Observable that yields a String
    */
   getVersion(instanceKey: string): Observable<string> {
-    const url = 'api/e2mgr/version';
-    return this.httpClient.get<DashboardSuccessTransport>(url).pipe(
+    const path = this.dashboardSvc.buildPath(this.component, null, 'version');
+    return this.httpClient.get<DashboardSuccessTransport>(path).pipe(
       // Extract the string here
       map(res => res['data'])
     );
@@ -53,11 +53,11 @@ export class E2ManagerService {
 
   /**
    * Gets RAN details
-   * @returns Observable that should yield an array of objects
+   * @returns Observable that yields an array of E2RanDetails objects
    */
   getRan(instanceKey: string): Observable<Array<E2RanDetails>> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'nodeb', 'ran');
-    return this.httpClient.get<Array<E2RanDetails>>(url);
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.nodebPath, 'ran');
+    return this.httpClient.get<Array<E2RanDetails>>(path);
   }
 
   /**
@@ -65,8 +65,8 @@ export class E2ManagerService {
    * @returns Observable. On success there is no data, only a code.
    */
   endcSetup(instanceKey: string, req: E2SetupRequest): Observable<HttpResponse<Object>> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'nodeb', 'endc-setup');
-    return this.httpClient.post(url, req, { observe: 'response' });
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey,  this.nodebPath, 'endc-setup');
+    return this.httpClient.post(path, req, { observe: 'response' });
   }
 
   /**
@@ -74,8 +74,8 @@ export class E2ManagerService {
    * @returns Observable. On success there is no data, only a code.
    */
   x2Setup(instanceKey: string, req: E2SetupRequest): Observable<HttpResponse<Object>> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'nodeb', 'x2-setup');
-    return this.httpClient.post(url, req, { observe: 'response' });
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey,  this.nodebPath, 'x2-setup');
+    return this.httpClient.post(path, req, { observe: 'response' });
   }
 
   /**
@@ -83,8 +83,8 @@ export class E2ManagerService {
    * @returns Observable with body.
    */
   nodebPut(instanceKey: string): Observable<any> {
-    const url = this.commonSvc.buildPath(instanceKey, this.component, 'nodeb', 'shutdown');
-    return this.httpClient.put(url, { observe: 'body' });
+    const path = this.dashboardSvc.buildPath(this.component, instanceKey,  this.nodebPath, 'shutdown');
+    return this.httpClient.put(path, { observe: 'body' });
   }
 
 }
index 202aa66..cf004f7 100644 (file)
@@ -23,6 +23,7 @@ import { Injectable } from '@angular/core';
 import { BehaviorSubject, Observable } from 'rxjs';
 import { shareReplay, tap } from 'rxjs/operators';
 import { RicInstance } from '../../interfaces/dashboard.types';
+import { DashboardService } from '../dashboard/dashboard.service';
 
 @Injectable({
   providedIn: 'root'
@@ -30,15 +31,18 @@ import { RicInstance } from '../../interfaces/dashboard.types';
 export class InstanceSelectorService {
   private selectedInstanceKey: BehaviorSubject<string> = new BehaviorSubject<string>('');
   private instanceArray: Observable<RicInstance[]>;
-  private basePath = 'api/admin/instance';
 
-  constructor(private httpClient: HttpClient) { }
+  constructor(
+    private dashboardSvc: DashboardService,
+    private httpClient: HttpClient) {
+  }
 
   getInstanceArray(): Observable<RicInstance[]> {
     if (this.instanceArray) {
       return this.instanceArray;
     }
-    return this.instanceArray = this.httpClient.get<RicInstance[]>(this.basePath)
+    const path = this.dashboardSvc.buildPath('admin', null, 'instance');
+    return this.instanceArray = this.httpClient.get<RicInstance[]>(path)
       .pipe(
         tap(ricInstanceArray => {
           this.initselectedInstanceKey(ricInstanceArray[0].key);
index 26fd1a3..0862142 100644 (file)
  * limitations under the License.
  * ========================LICENSE_END===================================
  */
+import { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
 import { Injectable } from '@angular/core';
-import { HttpClient, HttpParams } from '@angular/common/http';
-import { HttpHeaders } from '@angular/common/http';
 import { Observable } from 'rxjs';
-import { HttpErrorResponse } from '@angular/common/http';
+import { DashboardService } from '../dashboard/dashboard.service';
 
 @Injectable({
     providedIn: 'root'
 })
 
 export class StatsService {
+
+    private component = 'admin';
+
     baseJSONServerUrl = 'http://localhost:3000';
     dataMetrics = [{}];
     latencyMetrics;
@@ -50,15 +52,14 @@ export class StatsService {
             })
           };
 
-    private basePath = 'api/admin/';
-
-    constructor(private httpClient: HttpClient) {
+    constructor(
+        private dashboardSvc: DashboardService,
+        private httpClient: HttpClient) {
         // this.loadConfig();
         // this.getLoad();
     }
 
     getMetrics() {
-
         return this.dataMetrics; // @TODO implement the service to fetch the backend data
     }
 
@@ -78,36 +79,14 @@ export class StatsService {
         return this.load;
     }
 
-    putLoad(value: number) {
-        // this.loadMetrics = this.getRandomValue();
-        const jsonValue = '{ "load": ' + value + ' }';
-        console.log(jsonValue);
-        this.httpClient.put(this.hostURL + this.loadPath, jsonValue , this.httpOptions).subscribe((res) => {
-            console.log(res);
-        });
-    }
-
-    putDelay(value: number) {
-        // this.loadMetrics = this.getRandomValue();
-        const jsonValue = '{ "delay": ' + value + ' }';
-        console.log(jsonValue);
-        this.httpClient.put(this.hostURL + this.delayPath, jsonValue , this.httpOptions).subscribe((res) => {
-            console.log(res);
-        });
-    }
-
-    getCpuMetrics() {
-        this.cpuMetrics = this.getRandomValue();
-        return this.cpuMetrics;
-    }
-
     getRandomValue() {
         return Math.round((Math.random() * (20 - 0)) + 0);
     }
 
-    // Gets xApp metrics kibana url for the named application
+    // Gets xApp metrics Kibana url for the named application
     getAppMetricsUrl(appName: string)  {
-        return this.httpClient.get(this.basePath + 'metrics', {
+        const path = this.dashboardSvc.buildPath(this.component, null, 'metrics');
+        return this.httpClient.get(path, {
             params: new HttpParams()
                 .set('app', appName)
         });
@@ -123,8 +102,6 @@ export class StatsService {
         this.httpClient.put(this.baseJSONServerUrl + '/config/' + key , jsonValue, this.httpOptions).subscribe((res) => {
             console.log(res);
         });
-
-
     }
 
     loadConfig() {
index 109400f..7fac089 100644 (file)
@@ -37,8 +37,11 @@ export class StatsComponent implements OnInit {
     metricsUrlAc : SafeResourceUrl;
     metricsUrlMc : SafeResourceUrl;
 
-    constructor(private service: StatsService, private httpClient: HttpClient, private sanitize: DomSanitizer) {
+    constructor(private service: StatsService,
+        private httpClient: HttpClient,
+        private sanitize: DomSanitizer) {
     }
+
     ngOnInit() {
         this.service.getAppMetricsUrl('AC').subscribe((res:DashboardSuccessTransport) => {
             this.metricsUrlAc = this.sanitize.bypassSecurityTrustResourceUrl(res.data);