Change of ECS to ICS in test env
Issue-ID: NONRTRIC-640
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: Idcb4cc288b2e057120b5d8568070e852e6cd4487
diff --git a/test/simulator-group/control_panel/application.properties b/test/simulator-group/control_panel/application.properties
index 2fc7093..1af026e 100644
--- a/test/simulator-group/control_panel/application.properties
+++ b/test/simulator-group/control_panel/application.properties
@@ -30,8 +30,8 @@
portalapi.username = Default
portalapi.password = password
-# URL for enrichment coordinator service
-enrichmentcontroller.url.prefix = https://${ECS_DOMAIN_NAME}:${ECS_EXTERNAL_SECURE_PORT}/ei-producer/v1
+# URL for information coordinator service
+informationcontroller.url.prefix = https://${ICS_DOMAIN_NAME}:${ICS_EXTERNAL_SECURE_PORT}/ei-producer/v1
# Mimic slow endpoints by defining sleep period, in milliseconds
mock.config.delay = 0
diff --git a/test/simulator-group/control_panel/nginx.conf b/test/simulator-group/control_panel/nginx.conf
index 1672ad0..5f8ae57 100644
--- a/test/simulator-group/control_panel/nginx.conf
+++ b/test/simulator-group/control_panel/nginx.conf
@@ -30,11 +30,11 @@
set $upstream ${NGW_DOMAIN_NAME};
proxy_pass http://$upstream:${NRT_GATEWAY_EXTERNAL_PORT};
}
- location ${CONTROL_PANEL_PATH_ECS_PREFIX} {
+ location ${CONTROL_PANEL_PATH_ICS_PREFIX} {
set $upstream ${NGW_DOMAIN_NAME};
proxy_pass http://$upstream:${NRT_GATEWAY_EXTERNAL_PORT};
}
- location ${CONTROL_PANEL_PATH_ECS_PREFIX2} {
+ location ${CONTROL_PANEL_PATH_ICS_PREFIX2} {
set $upstream ${NGW_DOMAIN_NAME};
proxy_pass http://$upstream:${NRT_GATEWAY_EXTERNAL_PORT};
}
diff --git a/test/simulator-group/dmaapadp/application.yaml b/test/simulator-group/dmaapadp/application.yaml
index f96db09..b35fe32 100644
--- a/test/simulator-group/dmaapadp/application.yaml
+++ b/test/simulator-group/dmaapadp/application.yaml
@@ -62,7 +62,7 @@
# The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
http.proxy-host: $DMAAP_ADP_HTTP_PROXY_CONFIG_HOST_NAME
http.proxy-port: $DMAAP_ADP_HTTP_PROXY_CONFIG_PORT
- ecs-base-url: $ECS_SERVICE_PATH
+ ics-base-url: $ICS_SERVICE_PATH
# Location of the component configuration file. The file will only be used if the Consul database is not used;
# configuration from the Consul will override the file.
configuration-filepath: /opt/app/dmaap-adaptor-service/data/application_configuration.json
diff --git a/test/simulator-group/dmaapmed/app.yaml b/test/simulator-group/dmaapmed/app.yaml
index aa8a0f1..7c39bea 100644
--- a/test/simulator-group/dmaapmed/app.yaml
+++ b/test/simulator-group/dmaapmed/app.yaml
@@ -36,7 +36,7 @@
- name: INFO_PRODUCER_PORT
value: "$DMAAP_MED_CONF_SELF_PORT"
- name: INFO_COORD_ADDR
- value: "$ECS_SERVICE_PATH"
+ value: "$ICS_SERVICE_PATH"
- name: DMAAP_MR_ADDR
value: "$MR_SERVICE_PATH"
- name: LOG_LEVEL
diff --git a/test/simulator-group/dmaapmed/docker-compose.yml b/test/simulator-group/dmaapmed/docker-compose.yml
index e4c9a00..9cb929c 100644
--- a/test/simulator-group/dmaapmed/docker-compose.yml
+++ b/test/simulator-group/dmaapmed/docker-compose.yml
@@ -30,7 +30,7 @@
environment:
- INFO_PRODUCER_HOST=${DMAAP_MED_CONF_SELF_HOST}
- INFO_PRODUCER_PORT=${DMAAP_MED_CONF_SELF_PORT}
- - INFO_COORD_ADDR=${ECS_SERVICE_PATH}
+ - INFO_COORD_ADDR=${ICS_SERVICE_PATH}
- DMAAP_MR_ADDR=${MR_SERVICE_PATH}
- LOG_LEVEL=Debug
volumes:
diff --git a/test/simulator-group/ecs/app.yaml b/test/simulator-group/ecs/app.yaml
deleted file mode 100644
index f1090ce..0000000
--- a/test/simulator-group/ecs/app.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: $ECS_APP_NAME
- namespace: $KUBE_NONRTRIC_NAMESPACE
- labels:
- run: $ECS_APP_NAME
- autotest: ECS
-spec:
- replicas: 1
- selector:
- matchLabels:
- run: $ECS_APP_NAME
- template:
- metadata:
- labels:
- run: $ECS_APP_NAME
- autotest: ECS
- spec:
- containers:
- - name: $ECS_APP_NAME
- image: $ECS_IMAGE
- imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
- ports:
- - name: http
- containerPort: $ECS_INTERNAL_PORT
- - name: https
- containerPort: $ECS_INTERNAL_SECURE_PORT
- volumeMounts:
- - mountPath: $ECS_CONFIG_MOUNT_PATH
- name: ecs-conf-name
- volumeMounts:
- - mountPath: $ECS_CONTAINER_MNT_DIR
- name: ecs-data-name
- volumes:
- - configMap:
- defaultMode: 420
- name: $ECS_CONFIG_CONFIGMAP_NAME
- name: ecs-conf-name
- - persistentVolumeClaim:
- claimName: $ECS_DATA_PVC_NAME
- name: ecs-data-name
-# Selector will be set when pod is started first time
- nodeSelector:
-
diff --git a/test/simulator-group/ecs/mnt/.gitignore b/test/simulator-group/ecs/mnt/.gitignore
deleted file mode 100644
index 72e8ffc..0000000
--- a/test/simulator-group/ecs/mnt/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*
diff --git a/test/simulator-group/ecs/pv.yaml b/test/simulator-group/ecs/pv.yaml
deleted file mode 100644
index ffccecc..0000000
--- a/test/simulator-group/ecs/pv.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-apiVersion: v1
-kind: PersistentVolume
-metadata:
- name: $ECS_DATA_PV_NAME
- labels:
- run: $ECS_APP_NAME
- autotest: ECS
-spec:
- storageClassName: ecs-standard
- capacity:
- storage: 1Mi
- accessModes:
- - ReadWriteOnce
- persistentVolumeReclaimPolicy: Delete
- hostPath:
- path: "/tmp/$ECS_PV_PATH"
diff --git a/test/simulator-group/ecs/svc.yaml b/test/simulator-group/ecs/svc.yaml
deleted file mode 100644
index e311c0e..0000000
--- a/test/simulator-group/ecs/svc.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: $ECS_APP_NAME
- namespace: $KUBE_NONRTRIC_NAMESPACE
- labels:
- run: $ECS_APP_NAME
- autotest: ECS
-spec:
- type: ClusterIP
- ports:
- - port: $ECS_EXTERNAL_PORT
- targetPort: $ECS_INTERNAL_PORT
- protocol: TCP
- name: http
- - port: $ECS_EXTERNAL_SECURE_PORT
- targetPort: $ECS_INTERNAL_SECURE_PORT
- protocol: TCP
- name: https
- selector:
- run: $ECS_APP_NAME
\ No newline at end of file
diff --git a/test/simulator-group/ecs/.gitignore b/test/simulator-group/ics/.gitignore
similarity index 100%
rename from test/simulator-group/ecs/.gitignore
rename to test/simulator-group/ics/.gitignore
diff --git a/test/simulator-group/ics/app.yaml b/test/simulator-group/ics/app.yaml
new file mode 100644
index 0000000..9547dea
--- /dev/null
+++ b/test/simulator-group/ics/app.yaml
@@ -0,0 +1,45 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: $ICS_APP_NAME
+ namespace: $KUBE_NONRTRIC_NAMESPACE
+ labels:
+ run: $ICS_APP_NAME
+ autotest: ICS
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ run: $ICS_APP_NAME
+ template:
+ metadata:
+ labels:
+ run: $ICS_APP_NAME
+ autotest: ICS
+ spec:
+ containers:
+ - name: $ICS_APP_NAME
+ image: $ICS_IMAGE
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
+ ports:
+ - name: http
+ containerPort: $ICS_INTERNAL_PORT
+ - name: https
+ containerPort: $ICS_INTERNAL_SECURE_PORT
+ volumeMounts:
+ - mountPath: $ICS_CONFIG_MOUNT_PATH
+ name: ics-conf-name
+ volumeMounts:
+ - mountPath: $ICS_CONTAINER_MNT_DIR
+ name: ics-data-name
+ volumes:
+ - configMap:
+ defaultMode: 420
+ name: $ICS_CONFIG_CONFIGMAP_NAME
+ name: ics-conf-name
+ - persistentVolumeClaim:
+ claimName: $ICS_DATA_PVC_NAME
+ name: ics-data-name
+# Selector will be set when pod is started first time
+ nodeSelector:
+
diff --git a/test/simulator-group/ecs/application.yaml b/test/simulator-group/ics/application.yaml
similarity index 78%
rename from test/simulator-group/ecs/application.yaml
rename to test/simulator-group/ics/application.yaml
index acc914c..ee5a48d 100644
--- a/test/simulator-group/ecs/application.yaml
+++ b/test/simulator-group/ics/application.yaml
@@ -33,24 +33,24 @@
org.springframework: ERROR
org.springframework.data: ERROR
org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
- org.oransc.enrichment: INFO
+ org.oransc.information: INFO
file:
- name: /var/log/enrichment-coordinator-service/application.log
+ name: /var/log/information-coordinator-service/application.log
server:
port : 8434
http-port: 8083
ssl:
key-store-type: JKS
key-store-password: policy_agent
- key-store: /opt/app/enrichment-coordinator-service/etc/cert/keystore.jks
+ key-store: /opt/app/information-coordinator-service/etc/cert/keystore.jks
key-password: policy_agent
key-alias: policy_agent
app:
- filepath: /opt/app/enrichment-coordinator-service/data/application_configuration.json
+ filepath: /opt/app/information-coordinator-service/data/application_configuration.json
webclient:
trust-store-used: false
trust-store-password: policy_agent
- trust-store: /opt/app/enrichment-coordinator-service/etc/cert/truststore.jks
- http.proxy-host: $ECS_HTTP_PROXY_CONFIG_HOST_NAME
- http.proxy-port: $ECS_HTTP_PROXY_CONFIG_PORT
- vardata-directory: /var/enrichment-coordinator-service
\ No newline at end of file
+ trust-store: /opt/app/information-coordinator-service/etc/cert/truststore.jks
+ http.proxy-host: $ICS_HTTP_PROXY_CONFIG_HOST_NAME
+ http.proxy-port: $ICS_HTTP_PROXY_CONFIG_PORT
+ vardata-directory: /var/information-coordinator-service
\ No newline at end of file
diff --git a/test/simulator-group/ecs/docker-compose.yml b/test/simulator-group/ics/docker-compose.yml
similarity index 69%
rename from test/simulator-group/ecs/docker-compose.yml
rename to test/simulator-group/ics/docker-compose.yml
index 588f8c3..0f75355 100644
--- a/test/simulator-group/ecs/docker-compose.yml
+++ b/test/simulator-group/ics/docker-compose.yml
@@ -19,19 +19,19 @@
external: true
name: ${DOCKER_SIM_NWNAME}
services:
- ecs:
- image: ${ECS_IMAGE}
- container_name: ${ECS_APP_NAME}
+ ics:
+ image: ${ICS_IMAGE}
+ container_name: ${ICS_APP_NAME}
networks:
default:
aliases:
- - ${ECS_APP_NAME_ALIAS}
+ - ${ICS_APP_NAME_ALIAS}
volumes:
- - ${ECS_HOST_MNT_DIR}/db:${ECS_CONTAINER_MNT_DIR}
- - ${ECS_HOST_MNT_DIR}/$ECS_CONFIG_FILE:${ECS_CONFIG_MOUNT_PATH}/$ECS_CONFIG_FILE
+ - ${ICS_HOST_MNT_DIR}/db:${ICS_CONTAINER_MNT_DIR}
+ - ${ICS_HOST_MNT_DIR}/$ICS_CONFIG_FILE:${ICS_CONFIG_MOUNT_PATH}/$ICS_CONFIG_FILE
ports:
- - ${ECS_EXTERNAL_PORT}:${ECS_INTERNAL_PORT}
- - ${ECS_EXTERNAL_SECURE_PORT}:${ECS_INTERNAL_SECURE_PORT}
+ - ${ICS_EXTERNAL_PORT}:${ICS_INTERNAL_PORT}
+ - ${ICS_EXTERNAL_SECURE_PORT}:${ICS_INTERNAL_SECURE_PORT}
labels:
- - "nrttest_app=ECS"
- - "nrttest_dp=${ECS_DISPLAY_NAME}"
+ - "nrttest_app=ICS"
+ - "nrttest_dp=${ICS_DISPLAY_NAME}"
diff --git a/test/simulator-group/ics/pv.yaml b/test/simulator-group/ics/pv.yaml
new file mode 100644
index 0000000..3e9e285
--- /dev/null
+++ b/test/simulator-group/ics/pv.yaml
@@ -0,0 +1,16 @@
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: $ICS_DATA_PV_NAME
+ labels:
+ run: $ICS_APP_NAME
+ autotest: ICS
+spec:
+ storageClassName: ics-standard
+ capacity:
+ storage: 1Mi
+ accessModes:
+ - ReadWriteOnce
+ persistentVolumeReclaimPolicy: Delete
+ hostPath:
+ path: "/tmp/$ICS_PV_PATH"
diff --git a/test/simulator-group/ecs/pvc.yaml b/test/simulator-group/ics/pvc.yaml
similarity index 67%
rename from test/simulator-group/ecs/pvc.yaml
rename to test/simulator-group/ics/pvc.yaml
index 7f07893..bbb8e36 100644
--- a/test/simulator-group/ecs/pvc.yaml
+++ b/test/simulator-group/ics/pvc.yaml
@@ -1,16 +1,16 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
- name: $ECS_DATA_PVC_NAME
+ name: $ICS_DATA_PVC_NAME
namespace: $KUBE_NONRTRIC_NAMESPACE
labels:
- run: $ECS_APP_NAME
- autotest: ECS
+ run: $ICS_APP_NAME
+ autotest: ICS
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Mi
- storageClassName: ecs-standard
+ storageClassName: ics-standard
volumeMode: Filesystem
diff --git a/test/simulator-group/ics/svc.yaml b/test/simulator-group/ics/svc.yaml
new file mode 100644
index 0000000..0d758fe
--- /dev/null
+++ b/test/simulator-group/ics/svc.yaml
@@ -0,0 +1,21 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: $ICS_APP_NAME
+ namespace: $KUBE_NONRTRIC_NAMESPACE
+ labels:
+ run: $ICS_APP_NAME
+ autotest: ICS
+spec:
+ type: ClusterIP
+ ports:
+ - port: $ICS_EXTERNAL_PORT
+ targetPort: $ICS_INTERNAL_PORT
+ protocol: TCP
+ name: http
+ - port: $ICS_EXTERNAL_SECURE_PORT
+ targetPort: $ICS_INTERNAL_SECURE_PORT
+ protocol: TCP
+ name: https
+ selector:
+ run: $ICS_APP_NAME
\ No newline at end of file
diff --git a/test/simulator-group/ngw/application.yaml b/test/simulator-group/ngw/application.yaml
index f289168..f87389c 100644
--- a/test/simulator-group/ngw/application.yaml
+++ b/test/simulator-group/ngw/application.yaml
@@ -31,11 +31,11 @@
predicates:
- Path=/a1-policy/**
- id: A1-EI
- uri: https://${ECS_DOMAIN_NAME}:${ECS_EXTERNAL_SECURE_PORT}
+ uri: https://${ICS_DOMAIN_NAME}:${ICS_EXTERNAL_SECURE_PORT}
predicates:
- Path=/ei-producer/**
- id: A1-EI2
- uri: https://${ECS_DOMAIN_NAME}:${ECS_EXTERNAL_SECURE_PORT}
+ uri: https://${ICS_DOMAIN_NAME}:${ICS_EXTERNAL_SECURE_PORT}
predicates:
- Path=/data-producer/**,/data-consumer/**
management:
diff --git a/test/simulator-group/sim-monitor.js b/test/simulator-group/sim-monitor.js
index e118e17..5b85414 100644
--- a/test/simulator-group/sim-monitor.js
+++ b/test/simulator-group/sim-monitor.js
@@ -24,7 +24,7 @@
var MRSTUB_PORT="3905"
var AGENT_PORT="8081"
var CR_PORT="8090"
-var ECS_PORT="8083"
+var ICS_PORT="8083"
var PRODSTUB_PORT="8092"
var RC_PORT="8680"
@@ -186,14 +186,14 @@
var simvar5=[]
var simvar6=[]
-//Status variables, for parameters values fetched from ecs
-var ecs1="", ecs2="", ecs3="", ecs4="", ecs_types="-", ecs_producers="-";
-var ecs_producer_arr=new Array(0)
-var ecs_producer_type_arr=new Array(0)
-var ecs_producer_jobs_arr=new Array(0)
-var ecs_producer_status_arr=new Array(0)
-var ecs_jobs=new Array(0)
-var ecs_job_status=new Array(0)
+//Status variables, for parameters values fetched from ics
+var ics1="", ics2="", ics3="", ics4="", ics_types="-", ics_producers="-";
+var ics_producer_arr=new Array(0)
+var ics_producer_type_arr=new Array(0)
+var ics_producer_jobs_arr=new Array(0)
+var ics_producer_status_arr=new Array(0)
+var ics_jobs=new Array(0)
+var ics_job_status=new Array(0)
//Status variables, for parameters values fetched from prodstub
var ps2="", ps3="", ps4="", ps_types="-", ps_producers="-";
@@ -209,7 +209,7 @@
var refreshCount_pol=-1
-var refreshCount_ecs=-1
+var refreshCount_ics=-1
var refreshCount_cr=-1
@@ -429,84 +429,84 @@
}, 500)
}
-function fetchAllMetrics_ecs() {
+function fetchAllMetrics_ics() {
- console.log("Fetching enrichment metrics - timer:" + refreshCount_ecs)
+ console.log("Fetching information metrics - timer:" + refreshCount_ics)
- if (refreshCount_ecs < 0) {
- refreshCount_ecs = -1
+ if (refreshCount_ics < 0) {
+ refreshCount_ics = -1
return
} else {
- refreshCount_ecs = refreshCount_ecs - 1
+ refreshCount_ics = refreshCount_ics - 1
}
setTimeout(() => {
- if (checkFunctionFlag("ecs_stat")) {
- getSimCtr(LOCALHOST+ECS_PORT+"/status", 0, function(data, index) {
+ if (checkFunctionFlag("ics_stat")) {
+ getSimCtr(LOCALHOST+ICS_PORT+"/status", 0, function(data, index) {
try {
var jd=JSON.parse(data);
- ecs1=jd["status"]
- ecs2=""+jd["no_of_producers"]
- ecs3=""+jd["no_of_types"]
- ecs4=""+jd["no_of_jobs"]
+ ics1=jd["status"]
+ ics2=""+jd["no_of_producers"]
+ ics3=""+jd["no_of_types"]
+ ics4=""+jd["no_of_jobs"]
}
catch (err) {
- ecs1="error response"
- ecs2="error response"
- ecs3="error response"
- ecs4="error response"
+ ics1="error response"
+ ics2="error response"
+ ics3="error response"
+ ics4="error response"
}
});
- clearFlag("ecs_stat")
+ clearFlag("ics_stat")
}
- if (checkFunctionFlag("ecs_types")) {
- getSimCtr(LOCALHOST+ECS_PORT+"/ei-producer/v1/eitypes", 0, function(data, index) {
- var tmp_ecs_types="-"
+ if (checkFunctionFlag("ics_types")) {
+ getSimCtr(LOCALHOST+ICS_PORT+"/ei-producer/v1/eitypes", 0, function(data, index) {
+ var tmp_ics_types="-"
try {
var jd=JSON.parse(data);
for(var i=0;i<jd.length;i++) {
- if (tmp_ecs_types.length == 1) {
- tmp_ecs_types=""
+ if (tmp_ics_types.length == 1) {
+ tmp_ics_types=""
}
- tmp_ecs_types=""+tmp_ecs_types+jd[i]+" "
+ tmp_ics_types=""+tmp_ics_types+jd[i]+" "
}
}
catch (err) {
- tmp_ecs_types="error response"
+ tmp_ics_types="error response"
}
- ecs_types = tmp_ecs_types
+ ics_types = tmp_ics_types
});
- clearFlag("ecs_types")
+ clearFlag("ics_types")
}
- if (checkFunctionFlag("ecs_producers")) {
- getSimCtr(LOCALHOST+ECS_PORT+"/ei-producer/v1/eiproducers", 0, function(data, index) {
- var tmp_ecs_producers="-"
+ if (checkFunctionFlag("ics_producers")) {
+ getSimCtr(LOCALHOST+ICS_PORT+"/ei-producer/v1/eiproducers", 0, function(data, index) {
+ var tmp_ics_producers="-"
try {
var jd=JSON.parse(data);
- var tmp_ecs_producer_arr=new Array(jd.length)
+ var tmp_ics_producer_arr=new Array(jd.length)
for(var i=0;i<jd.length;i++) {
- if (tmp_ecs_producers.length == 1) {
- tmp_ecs_producers=""
+ if (tmp_ics_producers.length == 1) {
+ tmp_ics_producers=""
}
- tmp_ecs_producers=""+tmp_ecs_producers+jd[i]+" "
- tmp_ecs_producer_arr[i]=jd[i]
+ tmp_ics_producers=""+tmp_ics_producers+jd[i]+" "
+ tmp_ics_producer_arr[i]=jd[i]
}
- ecs_producer_arr = tmp_ecs_producer_arr
- ecs_producers = tmp_ecs_producers
+ ics_producer_arr = tmp_ics_producer_arr
+ ics_producers = tmp_ics_producers
}
catch (err) {
- ecs_producers="error response"
- ecs_producer_arr=new Array(0)
+ ics_producers="error response"
+ ics_producer_arr=new Array(0)
}
});
- clearFlag("ecs_producers")
+ clearFlag("ics_producers")
}
- if (checkFunctionFlag("ecs_data")) {
+ if (checkFunctionFlag("ics_data")) {
try {
- var tmp_ecs_producer_type_arr = JSON.parse(JSON.stringify(ecs_producer_arr))
- for(var x=0;x<tmp_ecs_producer_type_arr.length;x++) {
- getSimCtr(LOCALHOST+ECS_PORT+"/ei-producer/v1/eiproducers/"+tmp_ecs_producer_type_arr[x], x, function(data, idx) {
- var row=""+tmp_ecs_producer_type_arr[idx]+" : "
+ var tmp_ics_producer_type_arr = JSON.parse(JSON.stringify(ics_producer_arr))
+ for(var x=0;x<tmp_ics_producer_type_arr.length;x++) {
+ getSimCtr(LOCALHOST+ICS_PORT+"/ei-producer/v1/eiproducers/"+tmp_ics_producer_type_arr[x], x, function(data, idx) {
+ var row=""+tmp_ics_producer_type_arr[idx]+" : "
try {
var jd=JSON.parse(data);
var jda=jd["supported_ei_types"]
@@ -514,96 +514,96 @@
row=""+row+jda[j]+" "
}
- tmp_ecs_producer_type_arr[idx]=row
+ tmp_ics_producer_type_arr[idx]=row
}
catch (err) {
- tmp_ecs_producer_type_arr=new Array(0)
+ tmp_ics_producer_type_arr=new Array(0)
}
});
}
- ecs_producer_type_arr = tmp_ecs_producer_type_arr
+ ics_producer_type_arr = tmp_ics_producer_type_arr
} catch (err) {
- ecs_producer_type_arr=new Array(0)
+ ics_producer_type_arr=new Array(0)
}
try {
- var tmp_ecs_producer_jobs_arr = JSON.parse(JSON.stringify(ecs_producer_arr))
- for(x=0;x<tmp_ecs_producer_jobs_arr.length;x++) {
- getSimCtr(LOCALHOST+ECS_PORT+"/ei-producer/v1/eiproducers/"+tmp_ecs_producer_jobs_arr[x]+"/eijobs", x, function(data, idx) {
- var row=""+tmp_ecs_producer_jobs_arr[idx]+" : "
+ var tmp_ics_producer_jobs_arr = JSON.parse(JSON.stringify(ics_producer_arr))
+ for(x=0;x<tmp_ics_producer_jobs_arr.length;x++) {
+ getSimCtr(LOCALHOST+ICS_PORT+"/ei-producer/v1/eiproducers/"+tmp_ics_producer_jobs_arr[x]+"/eijobs", x, function(data, idx) {
+ var row=""+tmp_ics_producer_jobs_arr[idx]+" : "
try {
var jd=JSON.parse(data);
for(var j=0;j<jd.length;j++) {
var jda=jd[j]
row=""+row+jda["ei_job_identity"]+"("+jda["ei_type_identity"]+") "
}
- tmp_ecs_producer_jobs_arr[idx]=row
+ tmp_ics_producer_jobs_arr[idx]=row
}
catch (err) {
- tmp_ecs_producer_jobs_arr=new Array(0)
+ tmp_ics_producer_jobs_arr=new Array(0)
}
});
}
- ecs_producer_jobs_arr = tmp_ecs_producer_jobs_arr
+ ics_producer_jobs_arr = tmp_ics_producer_jobs_arr
} catch (err) {
- ecs_producer_jobs_arr=new Array(0)
+ ics_producer_jobs_arr=new Array(0)
}
try {
- var tmp_ecs_producer_status_arr = JSON.parse(JSON.stringify(ecs_producer_arr))
- for(x=0;x<tmp_ecs_producer_status_arr.length;x++) {
- getSimCtr(LOCALHOST+ECS_PORT+"/ei-producer/v1/eiproducers/"+tmp_ecs_producer_status_arr[x]+"/status", x, function(data, idx) {
- var row=""+tmp_ecs_producer_status_arr[idx]+" : "
+ var tmp_ics_producer_status_arr = JSON.parse(JSON.stringify(ics_producer_arr))
+ for(x=0;x<tmp_ics_producer_status_arr.length;x++) {
+ getSimCtr(LOCALHOST+ICS_PORT+"/ei-producer/v1/eiproducers/"+tmp_ics_producer_status_arr[x]+"/status", x, function(data, idx) {
+ var row=""+tmp_ics_producer_status_arr[idx]+" : "
try {
var jd=JSON.parse(data);
row=""+row+jd["operational_state"]
- tmp_ecs_producer_status_arr[idx]=row
+ tmp_ics_producer_status_arr[idx]=row
}
catch (err) {
- tmp_ecs_producer_status_arr=new Array(0)
+ tmp_ics_producer_status_arr=new Array(0)
}
});
}
- ecs_producer_status_arr = tmp_ecs_producer_status_arr
+ ics_producer_status_arr = tmp_ics_producer_status_arr
} catch (err) {
- ecs_producer_status_arr=new Array(0)
+ ics_producer_status_arr=new Array(0)
}
- clearFlag("ecs_data")
+ clearFlag("ics_data")
}
- if (checkFunctionFlag("ecs_jobs")) {
- getSimCtr(LOCALHOST+ECS_PORT+"/A1-EI/v1/eijobs", 0, function(data, index) {
+ if (checkFunctionFlag("ics_jobs")) {
+ getSimCtr(LOCALHOST+ICS_PORT+"/A1-EI/v1/eijobs", 0, function(data, index) {
try {
var jd=JSON.parse(data);
var tmpArr=new Array(jd.length)
for(var i=0;i<jd.length;i++) {
tmpArr[i]=jd[i]
}
- ecs_jobs=tmpArr
+ ics_jobs=tmpArr
}
catch (err) {
- ecs_jobs=new Array(0)
+ ics_jobs=new Array(0)
}
});
- clearFlag("ecs_jobs")
+ clearFlag("ics_jobs")
}
- if (checkFunctionFlag("ecs_job_status")) {
+ if (checkFunctionFlag("ics_job_status")) {
try {
- var tmp_ecs_job_status= JSON.parse(JSON.stringify(ecs_jobs))
- for(x=0;x<tmp_ecs_job_status.length;x++) {
- getSimCtr(LOCALHOST+ECS_PORT+"/A1-EI/v1/eijobs/"+tmp_ecs_job_status[x]+"/status", x, function(data, idx) {
+ var tmp_ics_job_status= JSON.parse(JSON.stringify(ics_jobs))
+ for(x=0;x<tmp_ics_job_status.length;x++) {
+ getSimCtr(LOCALHOST+ICS_PORT+"/A1-EI/v1/eijobs/"+tmp_ics_job_status[x]+"/status", x, function(data, idx) {
try {
var jd=JSON.parse(data);
- tmp_ecs_job_status[idx]=""+tmp_ecs_job_status[idx]+":"+jd["eiJobStatus"]
+ tmp_ics_job_status[idx]=""+tmp_ics_job_status[idx]+":"+jd["eiJobStatus"]
}
catch (err) {
- tmp_ecs_job_status="-"
+ tmp_ics_job_status="-"
}
});
}
- ecs_job_status = tmp_ecs_job_status
+ ics_job_status = tmp_ics_job_status
} catch (err) {
- ecs_job_status="-"
+ ics_job_status="-"
}
- clearFlag("ecs_job_status")
+ clearFlag("ics_job_status")
}
if (checkFunctionFlag("prodstub_stat")) {
getSimCtr(LOCALHOST+PRODSTUB_PORT+"/status", x, function(data, idx) {
@@ -687,14 +687,14 @@
clearFlag("prodstub_stat")
}
- fetchAllMetrics_ecs();
+ fetchAllMetrics_ics();
}, 500)
}
function fetchAllMetrics_cr() {
- console.log("Fetching CR DB - timer:" + refreshCount_ecs)
+ console.log("Fetching CR DB - timer:" + refreshCount_ics)
if (refreshCount_cr < 0) {
refreshCount_cr = -1
@@ -721,7 +721,7 @@
function fetchAllMetrics_rc() {
- console.log("Fetching RC services - timer:" + refreshCount_ecs)
+ console.log("Fetching RC services - timer:" + refreshCount_ics)
if (refreshCount_rc < 0) {
refreshCount_rc = -1
@@ -758,7 +758,7 @@
// Monitor for CR db
app.get("/mon3",function(req, res){
- console.log("Creating CR DB page - timer: " + refreshCount_ecs)
+ console.log("Creating CR DB page - timer: " + refreshCount_ics)
if (refreshCount_cr < 0) {
refreshCount_cr=5
@@ -779,16 +779,16 @@
res.send(htmlStr);
})
-// Monitor for ECS
+// Monitor for ICS
app.get("/mon2",function(req, res){
- console.log("Creating enrichment metrics - timer: " + refreshCount_ecs)
+ console.log("Creating information metrics - timer: " + refreshCount_ics)
- if (refreshCount_ecs < 0) {
- refreshCount_ecs=5
- fetchAllMetrics_ecs()
+ if (refreshCount_ics < 0) {
+ refreshCount_ics=5
+ fetchAllMetrics_ics()
}
- refreshCount_ecs=5
+ refreshCount_ics=5
var summary=req.query.summary
@@ -801,7 +801,7 @@
"<html>" +
"<head>" +
"<meta http-equiv=\"refresh\" content=\"2\">"+ //2 sec auto refresh
- "<title>Enrichment coordinator service and producer stub</title>"+
+ "<title>information coordinator service and producer stub</title>"+
"</head>" +
"<body>" +
"<font size=\"-3\" face=\"summary\">"
@@ -810,50 +810,50 @@
} else {
htmlStr=htmlStr+"<p>Set query param '?summary' to false to only show full statistics</p>"
}
- if (ecs_job_status.length > 10) {
+ if (ics_job_status.length > 10) {
htmlStr=htmlStr+"<div style=\"color:red\"> Avoid running the server for large number of producers and/or jobs</div>"
}
htmlStr=htmlStr+"</font>" +
- "<h3>Enrichment Coordinator Service</h3>" +
+ "<h3>Information Coordinator Service</h3>" +
"<font face=\"monospace\">" +
- "Status:..........." + formatDataRow(ecs1) + "<br>" +
- "Producers:........" + formatDataRow(ecs2) + "<br>" +
- "Types:............" + formatDataRow(ecs3) + "<br>" +
- "Jobs:............." + formatDataRow(ecs4) + "<br>" +
+ "Status:..........." + formatDataRow(ics1) + "<br>" +
+ "Producers:........" + formatDataRow(ics2) + "<br>" +
+ "Types:............" + formatDataRow(ics3) + "<br>" +
+ "Jobs:............." + formatDataRow(ics4) + "<br>" +
"</font>"
if (summary == "false") {
htmlStr=htmlStr+
"<h4>Details</h4>" +
"<font face=\"monospace\">" +
- "Producer ids:....." + formatDataRow(ecs_producers) + "<br>" +
- "Type ids:........." + formatDataRow(ecs_types) + "<br>" +
+ "Producer ids:....." + formatDataRow(ics_producers) + "<br>" +
+ "Type ids:........." + formatDataRow(ics_types) + "<br>" +
"<br>";
- for(var i=0;i<ecs_producer_type_arr.length;i++) {
- var tmp=ecs_producer_type_arr[i]
+ for(var i=0;i<ics_producer_type_arr.length;i++) {
+ var tmp=ics_producer_type_arr[i]
if (tmp != undefined) {
- var s = "Producer types...." + formatDataRow(ecs_producer_type_arr[i]) + "<br>"
+ var s = "Producer types...." + formatDataRow(ics_producer_type_arr[i]) + "<br>"
htmlStr=htmlStr+s
}
}
htmlStr=htmlStr+"<br>";
- for(i=0;i<ecs_producer_jobs_arr.length;i++) {
- tmp=ecs_producer_jobs_arr[i]
+ for(i=0;i<ics_producer_jobs_arr.length;i++) {
+ tmp=ics_producer_jobs_arr[i]
if (tmp != undefined) {
- s = "Producer jobs....." + formatDataRow(ecs_producer_jobs_arr[i]) + "<br>"
+ s = "Producer jobs....." + formatDataRow(ics_producer_jobs_arr[i]) + "<br>"
htmlStr=htmlStr+s
}
}
htmlStr=htmlStr+"<br>";
- for(i=0;i<ecs_producer_status_arr.length;i++) {
- tmp=ecs_producer_status_arr[i]
+ for(i=0;i<ics_producer_status_arr.length;i++) {
+ tmp=ics_producer_status_arr[i]
if (tmp != undefined) {
s = "Producer status..." + formatDataRow(tmp) + "<br>"
htmlStr=htmlStr+s
}
}
htmlStr=htmlStr+"<br>";
- for(i=0;i<ecs_job_status.length;i++) {
- tmp=ecs_job_status[i]
+ for(i=0;i<ics_job_status.length;i++) {
+ tmp=ics_job_status[i]
if (tmp != undefined) {
s = padding("Job", 18, ".") + formatDataRow(tmp) + "<br>"
htmlStr=htmlStr+s
@@ -1025,5 +1025,5 @@
httpServer.listen(httpPort);
console.log("Simulator monitor listening (http) at "+httpPort);
console.log("Open the web page on localhost:9999/mon to view the policy statistics page.")
-console.log("Open the web page on localhost:9999/mon2 to view the enrichment statistics page.")
+console.log("Open the web page on localhost:9999/mon2 to view the information statistics page.")
console.log("Open the web page on localhost:9999/mon3 to view CR DB in json.")
\ No newline at end of file