aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2021-02-09 07:17:41 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-09 07:17:41 +0000
commit0a34f59dbf6209c07e059315d2b05141c33a5e5e (patch)
treeb7882b3287202bdc7f78271134bd900a7c3c13ee
parentdfd96a24c58cd536862f2cffd220e3bc9bd25d28 (diff)
parent0736c9f21b579973214d1a65ac218b9da7d11086 (diff)
Merge "Add CSIT for slice-analysis-ms"
-rw-r--r--plans/dcaegen2-services-slice-analysis-ms/testsuites/config/dmaap/MsgRtrApi.properties171
-rw-r--r--plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/config_all.json86
-rw-r--r--plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/trust.jksbin0 -> 1413 bytes
-rw-r--r--plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/trust.pass1
-rw-r--r--plans/dcaegen2-services-slice-analysis-ms/testsuites/docker-compose.yaml97
-rw-r--r--plans/dcaegen2-services-slice-analysis-ms/testsuites/setup.sh60
-rw-r--r--plans/dcaegen2-services-slice-analysis-ms/testsuites/teardown.sh9
-rw-r--r--plans/dcaegen2-services-slice-analysis-ms/testsuites/testplan.txt3
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/Dockerfile15
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/configdb-sim.py115
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_cell_list_001_00110.json111
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_cell_list_001_010000.json323
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_list_001_00110.json129
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_list_001_010000.json359
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/profile_config_001_00110.json9
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/profile_config_001_010000.json9
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/slice_config_001_00110.json15
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/slice_config_001_010000.json27
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/subscriber-details_001_00110.json13
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/sim-data/subscriber-details_001_010000.json13
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/Dockerfile15
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/configdb-sim.py115
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_cell_list_001_00110.json111
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_cell_list_001_010000.json323
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_list_001_00110.json129
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_list_001_010000.json359
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/profile_config_001_00110.json9
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/profile_config_001_010000.json9
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/slice_config_001_00110.json15
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/slice_config_001_010000.json27
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/subscriber-details_001_00110.json13
-rw-r--r--scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/subscriber-details_001_010000.json13
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_payload.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_response.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm1.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm2.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm1.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm2.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm3.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/ml_response.json69
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification1.json56
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification2.json56
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification3.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification4.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification5.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification6.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification7.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification8.json1
-rw-r--r--tests/dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test.robot124
50 files changed, 3022 insertions, 0 deletions
diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/dmaap/MsgRtrApi.properties b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/dmaap/MsgRtrApi.properties
new file mode 100644
index 00000000..61f3f033
--- /dev/null
+++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/dmaap/MsgRtrApi.properties
@@ -0,0 +1,171 @@
+# LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2020 Wipro Limited.
+# ================================================================================
+# 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=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+###############################################################################
+###############################################################################
+##
+## Cambria API Server config
+##
+## - Default values are shown as commented settings.
+##
+
+###############################################################################
+##
+## HTTP service
+##
+## - 3904 is standard as of 7/29/14.
+#
+## Zookeeper Connection
+##
+## Both Cambria and Kafka make use of Zookeeper.
+##
+#config.zk.servers=172.18.1.1
+config.zk.servers=zookeeper:2181
+#config.zk.root=/fe3c/cambria/config
+
+
+###############################################################################
+##
+## Kafka Connection
+##
+## Items below are passed through to Kafka's producer and consumer
+## configurations (after removing "kafka.")
+## if you want to change request.required.acks it can take this one value
+#kafka.metadata.broker.list=localhost:9092,localhost:9093
+kafka.metadata.broker.list=kafka:9092
+##kafka.request.required.acks=-1
+#kafka.client.zookeeper=${config.zk.servers}
+consumer.timeout.ms=100
+zookeeper.connection.timeout.ms=6000
+zookeeper.session.timeout.ms=20000
+zookeeper.sync.time.ms=2000
+auto.commit.interval.ms=1000
+fetch.message.max.bytes =1000000
+auto.commit.enable=false
+
+#(backoff*retries > zksessiontimeout)
+kafka.rebalance.backoff.ms=10000
+kafka.rebalance.max.retries=6
+
+
+###############################################################################
+##
+## Secured Config
+##
+## Some data stored in the config system is sensitive -- API keys and secrets,
+## for example. to protect it, we use an encryption layer for this section
+## of the config.
+##
+## The key is a base64 encode AES key. This must be created/configured for
+## each installation.
+#cambria.secureConfig.key=
+##
+## The initialization vector is a 16 byte value specific to the secured store.
+## This must be created/configured for each installation.
+#cambria.secureConfig.iv=
+
+## Southfield Sandbox
+cambria.secureConfig.key=b/7ouTn9FfEw2PQwL0ov/Q==
+cambria.secureConfig.iv=wR9xP5k5vbz/xD0LmtqQLw==
+authentication.adminSecret=fe3cCompound
+#cambria.secureConfig.key[pc569h]=YT3XPyxEmKCTLI2NK+Sjbw==
+#cambria.secureConfig.iv[pc569h]=rMm2jhR3yVnU+u2V9Ugu3Q==
+
+
+###############################################################################
+##
+## Consumer Caching
+##
+## Kafka expects live connections from the consumer to the broker, which
+## obviously doesn't work over connectionless HTTP requests. The Cambria
+## server proxies HTTP requests into Kafka consumer sessions that are kept
+## around for later re-use. Not doing so is costly for setup per request,
+## which would substantially impact a high volume consumer's performance.
+##
+## This complicates Cambria server failover, because we often need server
+## A to close its connection before server B brings up the replacement.
+##
+
+## The consumer cache is normally enabled.
+#cambria.consumer.cache.enabled=true
+
+## Cached consumers are cleaned up after a period of disuse. The server inspects
+## consumers every sweepFreqSeconds and will clean up any connections that are
+## dormant for touchFreqMs.
+#cambria.consumer.cache.sweepFreqSeconds=15
+cambria.consumer.cache.touchFreqMs=120000
+##stickforallconsumerrequests=false
+## The cache is managed through ZK. The default value for the ZK connection
+## string is the same as config.zk.servers.
+#cambria.consumer.cache.zkConnect=${config.zk.servers}
+
+##
+## Shared cache information is associated with this node's name. The default
+## name is the hostname plus the HTTP service port this host runs on. (The
+## hostname is determined via InetAddress.getLocalHost ().getCanonicalHostName(),
+## which is not always adequate.) You can set this value explicitly here.
+##
+#cambria.api.node.identifier=<use-something-unique-to-this-instance>
+
+#cambria.rateLimit.maxEmptyPollsPerMinute=30
+#cambria.rateLimitActual.delay.ms=10
+
+###############################################################################
+##
+## Metrics Reporting
+##
+## This server can report its metrics periodically on a topic.
+##
+#metrics.send.cambria.enabled=true
+#metrics.send.cambria.topic=cambria.apinode.metrics #msgrtr.apinode.metrics.dmaap
+#metrics.send.cambria.sendEverySeconds=60
+
+cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
+consumer.timeout=17
+default.partitions=3
+default.replicas=3
+##############################################################################
+#100mb
+maxcontentlength=10000
+
+
+##############################################################################
+#AAF Properties
+msgRtr.namespace.aaf=org.onap.dmaap.mr.topic
+msgRtr.topicfactory.aaf=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
+enforced.topic.name.AAF=org.onap
+forceAAF=false
+transidUEBtopicreqd=false
+defaultNSforUEB=org.onap.dmaap.mr
+##############################################################################
+#Mirror Maker Agent
+msgRtr.mirrormakeradmin.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|admin
+msgRtr.mirrormakeruser.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|user
+msgRtr.mirrormakeruser.aaf.create=com.onap.dmaap.mr.dev.topicFactory|:com.onap.dmaap.mr.dev.topic:
+msgRtr.mirrormaker.timeout=15000
+msgRtr.mirrormaker.topic=com.onap.dmaap.mr.prod.mm.agent
+msgRtr.mirrormaker.consumergroup=mmagentserver
+msgRtr.mirrormaker.consumerid=1
+
+kafka.max.poll.interval.ms=300000
+kafka.heartbeat.interval.ms=60000
+kafka.session.timeout.ms=240000
+kafka.max.poll.records=1000
+
diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/config_all.json b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/config_all.json
new file mode 100644
index 00000000..b084b57d
--- /dev/null
+++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/config_all.json
@@ -0,0 +1,86 @@
+{
+ "config": {
+ "streams_subscribes": {
+ "performance_management_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PERFORMANCE_MEASUREMENTS",
+ "client_role": "sliceanalysis-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-sliceanalysis-1"
+ },
+ "aaf_username": null
+ },
+ "dcae_cl_response_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "http://message-router.onap.svc.cluster.local:3904/events/DCAE_CL_RSP",
+ "client_role": "sliceanalysis-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-sliceanalysis-1"
+ },
+ "aaf_username": null
+ },
+ "intelligent_slicing_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "http://message-router.onap.svc.cluster.local::3904/events/unauthenticated.ML_RESPONSE_TOPIC",
+ "client_role": "sliceanalysis-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-sliceanalysis-1"
+ },
+ "aaf_username": null
+ }
+ },
+ "streams_publishes": {
+ "CL_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "http://message-router.onap.svc.cluster.local::3904/events/unauthenticated.DCAE_CL_OUTPUT",
+ "client_role": "sliceanalysis-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-sliceanalysis-1"
+ },
+ "aaf_username": null
+ }
+ },
+ "postgres.password": "postgres",
+ "postgres.username": "sliceanalysisms_admin",
+ "postgres.host": "postgres",
+ "postgres.port": "5432",
+ "sliceanalysisms.dmaap.server": [
+ "dmaap"
+ ],
+ "cbsPollingInterval": 60,
+ "sliceanalysisms.cg": "sliceanalysisms-cg",
+ "sliceanalysisms.pollingInterval": 20,
+ "sliceanalysisms.samples": 3,
+ "sliceanalysisms.minPercentageChange": 5,
+ "sliceanalysisms.initialDelaySeconds": 300000,
+ "sliceanalysisms.pollingTimeout": 60,
+ "sliceanalysisms.cid": "sliceanalysisms-cid",
+ "sliceanalysisms.configDb.service": "http://configdb_sim:5000",
+ "service_calls": {
+ "policy-req": []
+ },
+ "trust_store_path": "/opt/app/sliceanalysisms/etc/cert/trust.jks",
+ "trust_store_pass_path": "/opt/app/sliceanalysisms/etc/cert/trust.pass"
+ },
+ "policies": {
+ "event": {
+ "action": "gathered",
+ "timestamp": "2019-09-18T14:57:55.320Z",
+ "update_id": "dbb88da8-8df1-489d-b51d-8d5cbbfbcd99",
+ "policies_count": 1
+ },
+ "items": [
+ {
+ "policyName": "com.Config_PCIMS_CONFIG_POLICY.1.xml"
+ }
+ ]
+ }
+}
diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/trust.jks b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/trust.jks
new file mode 100644
index 00000000..33d9c569
--- /dev/null
+++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/trust.jks
Binary files differ
diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/trust.pass b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/trust.pass
new file mode 100644
index 00000000..86edc20c
--- /dev/null
+++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/trust.pass
@@ -0,0 +1 @@
+YPHcOFZP}sptD;*RV8N!46rG \ No newline at end of file
diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/docker-compose.yaml b/plans/dcaegen2-services-slice-analysis-ms/testsuites/docker-compose.yaml
new file mode 100644
index 00000000..cac148c3
--- /dev/null
+++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/docker-compose.yaml
@@ -0,0 +1,97 @@
+# ============LICENSE_START=======================================================
+# slice-analysis-ms
+# ================================================================================
+# Copyright (C) 2020 Wipro Limited.
+# ==============================================================================
+# 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=========================================================
+
+version: '3.3'
+networks:
+ slice-analysis-ms-default:
+ driver: bridge
+ driver_opts:
+ com.docker.network.driver.mtu: 1400
+services:
+ zookeeper:
+ image: wurstmeister/zookeeper
+ container_name: zookeeper
+ ports:
+ - "2181:2181"
+ networks:
+ - slice-analysis-ms-default
+ kafka:
+ image: wurstmeister/kafka
+ container_name: kafka
+ ports:
+ - "9092:9092"
+ environment:
+ KAFKA_ADVERTISED_HOST_NAME: "kafka"
+ KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
+ KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
+ KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ depends_on:
+ - zookeeper
+ networks:
+ - slice-analysis-ms-default
+ dmaap:
+ image: nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.1.8
+ container_name: dmaap
+ ports:
+ - "3904:3904"
+ - "3905:3905"
+ volumes:
+ - ./config/dmaap/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
+ depends_on:
+ - zookeeper
+ - kafka
+ networks:
+ - slice-analysis-ms-default
+ postgres:
+ image: 'postgres:12-alpine'
+ container_name: slice-analysis-ms-postgres
+ hostname: postgres
+ environment:
+ - POSTGRES_USER=sliceanalysisms_admin
+ - POSTGRES_PASSWORD=postgres
+ - POSTGRES_DB=sliceanalysisms
+ ports:
+ - 5432
+ healthcheck:
+ test: ["CMD", "nc", "-z", "localhost", "5432"]
+ interval: 30s
+ timeout: 10s
+ retries: 5
+ networks:
+ - slice-analysis-ms-default
+ sliceanalysisms:
+ image: "nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.components.slice-analysis-ms:latest"
+ container_name: sliceanalysisms
+ hostname: sliceanalysisms
+ environment:
+ - STANDALONE=true
+ - CONFIG_FILE=/etc/config_all.json
+ ports:
+ - "8080:8080"
+ volumes:
+ - ./config/sliceanalysisms/config_all.json:/etc/config_all.json
+ - ./config/sliceanalysisms/trust12.jks:/opt/app/sliceanalysisms/etc/cert/trust.jks
+ - ./config/sliceanalysisms/trust.pass:/opt/app/sliceanalysisms/etc/cert/trust.pass
+ # - ./config/sliceanalysisms/trust.jks:/opt/app/sliceanalysisms/etc/cert/trustjss.jks
+ depends_on:
+ - postgres
+ networks:
+ - slice-analysis-ms-default
+
diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/setup.sh b/plans/dcaegen2-services-slice-analysis-ms/testsuites/setup.sh
new file mode 100644
index 00000000..1c52d718
--- /dev/null
+++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/setup.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+docker login -u docker -p docker nexus3.onap.org:10001
+
+TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-slice-analysis-ms/testsuites
+TEST_SCRIPTS_DIR=$WORKSPACE/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms
+TEST_ROBOT_DIR=$WORKSPACE/tests/dcaegen2-services-slice-analysis-ms/testcases
+
+docker-compose up -d
+
+ZOOKEEPER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' zookeeper)
+KAFKA_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kafka)
+DMAAP_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dmaap)
+SLICE_ANALYSIS_MS_POSTGRES_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' slice-analysis-ms-postgres)
+SLICE_ANALYSIS_MS_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sliceanalysisms)
+
+echo "Waiting for dmaap to come up ..."
+for i in {1..10}; do
+ dmaap_state=$(curl --write-out '%{http_code}' --silent --output /dev/null $DMAAP_IP:3904/topics)
+ if [ $dmaap_state == "200" ]
+ then
+ break
+ else
+ sleep 60
+ fi
+done
+
+#create topics in dmaap
+curl --header "Content-type: application/json" \
+--request POST \
+--data '{"topicName": "org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS"}' \
+http://$DMAAP_IP:3904/events/unauthenticated.PERFORMANCE_MEASUREMENTS
+
+curl --header "Content-type: application/json" \
+--request POST \
+--data '{"topicName": "DCAE_CL_RSP"}' \
+http://$DMAAP_IP:3904/events/DCAE_CL_RSP
+
+curl --header "Content-type: application/json" \
+--request POST \
+--data '{"topicName": "unauthenticated.ML_RESPONSE_TOPIC"}' \
+http://$DMAAP_IP:3904/events/unauthenticated.ML_RESPONSE_TOPIC
+
+curl --header "Content-type: application/json" \
+--request POST \
+--data '{"topicName": "unauthenticated.DCAE_CL_OUTPUT"}' \
+http://$DMAAP_IP:3904/events/unauthenticated.DCAE_CL_OUTPUT
+
+#build configdb-sim image
+cd $TEST_SCRIPTS_DIR
+docker build -t configdb_sim .
+
+#run configdb-sim
+docker run -d --name configdb_sim --network=testsuites_slice-analysis-ms-default -p "5000:5000" configdb_sim:latest;
+sleep 10
+CONFIGDB_SIM_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' configdb_sim)
+echo "CONFIGDB_SIM_IP=${CONFIGDB_SIM_IP}"
+
+
+ROBOT_VARIABLES="-v ZOOKEEPER_IP:${ZOOKEEPER_IP} -v KAFKA_IP:${KAFKA_IP} -v DMAAP_IP:${DMAAP_IP} -v SLICE_ANALYSIS_MS_POSTGRES_IP:${SLICE_ANALYSIS_MS_POSTGRES_IP} -v SLICE_ANALYSIS_MS_IP:${SLICE_ANALYSIS_MS_IP} -v CONFIGDB_SIM_IP:${CONFIGDB_SIM_IP} -v TEST_ROBOT_DIR:${TEST_ROBOT_DIR}"
diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/teardown.sh b/plans/dcaegen2-services-slice-analysis-ms/testsuites/teardown.sh
new file mode 100644
index 00000000..516bf8cb
--- /dev/null
+++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/teardown.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+echo "Starting teardown script"
+TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-slice-analysis-ms/testsuites
+mkdir -p $WORKSPACE/archives
+
+docker container stop configdb_sim
+docker container rm configdb_sim
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yaml logs > $WORKSPACE/archives/sonhandler-docker-compose.log
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yaml down -v
diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/testplan.txt b/plans/dcaegen2-services-slice-analysis-ms/testsuites/testplan.txt
new file mode 100644
index 00000000..a8b2bdab
--- /dev/null
+++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+dcaegen2-services-slice-analysis-ms/testcases
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/Dockerfile b/scripts/dcaegen2-services-slice-analysis-ms/Dockerfile
new file mode 100644
index 00000000..52d54a57
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/Dockerfile
@@ -0,0 +1,15 @@
+FROM python:alpine3.7
+
+ADD configdb-sim.py /
+
+ADD ./sim-data /
+
+RUN pip install Flask --trusted-host pypi.org --trusted-host files.pythonhosted.org
+
+RUN pip install requests --trusted-host pypi.org --trusted-host files.pythonhosted.org
+
+EXPOSE 5000
+
+CMD ["flask", "run", "--host", "0.0.0.0"]
+
+CMD [ "python", "./configdb-sim.py" ]
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/configdb-sim.py b/scripts/dcaegen2-services-slice-analysis-ms/configdb-sim.py
new file mode 100644
index 00000000..bcda08d5
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/configdb-sim.py
@@ -0,0 +1,115 @@
+import flask
+import json
+from flask import Flask, render_template
+from flask import request
+from flask import jsonify
+import requests
+import threading
+import time
+
+app = flask.Flask(__name__)
+app.config["DEBUG"] = True
+
+
+def get_du_list_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('du_list_001_00110.json') as du_list:
+ data = json.load(du_list)
+ else:
+ with open('du_list_001_010000.json') as du_list:
+ data = json.load(du_list)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+def get_du_cell_list_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('du_cell_list_001_00110.json') as du_cell_list:
+ data = json.load(du_cell_list)
+ else:
+ with open('du_cell_list_001_010000.json') as du_cell_list:
+ data = json.load(du_cell_list)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+def get_slice_config_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('slice_config_001_00110.json') as slice_config:
+ data = json.load(slice_config)
+ else:
+ with open('slice_config_001_010000.json') as slice_config:
+ data = json.load(slice_config)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+def get_profile_config_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('profile_config_001_00110.json') as profile_config:
+ data = json.load(profile_config)
+ else:
+ with open('profile_config_001_010000.json') as profile_config:
+ data = json.load(profile_config)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+def get_subscriber_details_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('subscriber-details_001_00110.json') as subscriber_details:
+ data = json.load(subscriber_details)
+ else:
+ with open('subscriber-details_001_010000.json') as subscriber_details:
+ data = json.load(subscriber_details)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+@app.route("/api/sdnc-config-db/v4/du-list/<snssai>", methods=["GET"])
+def get_du_list(snssai):
+ data, status = get_du_list_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+@app.route("/api/sdnc-config-db/v4/du-cell-list/<snssai>", methods=["GET"])
+def get_du_cell_list(snssai):
+ data, status = get_du_cell_list_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+@app.route("/api/sdnc-config-db/v4/slice-config/<snssai>", methods=["GET"])
+def get_slice_config(snssai):
+ data, status = get_slice_config_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+@app.route("/api/sdnc-config-db/v4/profile-config/<snssai>", methods=["GET"])
+def get_profile_config(snssai):
+ data, status = get_profile_config_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+@app.route("/api/sdnc-config-db/v4/subscriber-details/<snssai>",
+ methods=["GET"])
+def get_subscriber_details(snssai):
+ data, status = get_subscriber_details_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+app.run(host='0.0.0.0')
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_cell_list_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_cell_list_001_00110.json
new file mode 100644
index 00000000..f01f0b98
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_cell_list_001_00110.json
@@ -0,0 +1,111 @@
+{
+
+"11":[
+
+{
+
+"cellLocalId":103593999,
+
+"operationalState":"ENABLED",
+
+"administrativeState":"UNLOCKED",
+
+"cellState":"ACTIVE",
+
+"pLMNInfoList":[
+
+{
+
+"pLMNId":"310-410",
+
+"sNSSAI":{
+
+"sNSSAI":"001-00110",
+
+"status":"ACTIVE",
+
+"globalSubscriberId":null,
+
+"subscriptionServiceType":null,
+
+"configData":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T07:02:28.000+0000"
+
+}
+
+}
+
+}
+
+],
+
+"nRPCI":12,
+
+"nRTAC":310,
+
+"resourceType":"PRB"
+
+},
+
+{
+
+"cellLocalId":103593989,
+
+"operationalState":"ENABLED",
+
+"administrativeState":"UNLOCKED",
+
+"cellState":"ACTIVE",
+
+"pLMNInfoList":[
+
+{
+
+"pLMNId":"310-410",
+
+"sNSSAI":{
+
+"sNSSAI":"001-00110",
+
+"status":"ACTIVE",
+
+"globalSubscriberId":null,
+
+"subscriptionServiceType":null,
+
+"configData":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T12:03:56.000+0000"
+
+}
+
+}
+
+}
+
+],
+
+"nRPCI":12,
+
+"nRTAC":310,
+
+"resourceType":"PRB"
+
+}
+
+]
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_cell_list_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_cell_list_001_010000.json
new file mode 100644
index 00000000..54b2b7c5
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_cell_list_001_010000.json
@@ -0,0 +1,323 @@
+{
+
+ "22":[
+
+ {
+
+ "cellLocalId":112951562,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":112951561,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":112951568,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ }
+
+ ],
+
+ "11":[
+
+ {
+
+ "cellLocalId":95697174,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":95697175,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":95697155,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ }
+
+ ]
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_list_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_list_001_00110.json
new file mode 100644
index 00000000..a4c6f2ff
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_list_001_00110.json
@@ -0,0 +1,129 @@
+[
+
+{
+
+"gNBDUId":1,
+
+"gNBId":98763,
+
+"gNBIdLength":5,
+
+"gNBDUName":"gnduserver1",
+
+"pLMNId":"310-410",
+
+"nFType":"DU",
+
+"cellDUList":[
+
+{
+
+"cellLocalId":103593989,
+
+"operationalState":"ENABLED",
+
+"administrativeState":"UNLOCKED",
+
+"cellState":"ACTIVE",
+
+"pLMNInfoList":[
+
+{
+
+"pLMNId":"310-410",
+
+"sNSSAI":{
+
+"sNSSAI":"001-00110",
+
+"status":"ACTIVE",
+
+"globalSubscriberId":null,
+
+"subscriptionServiceType":null,
+
+"configData":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T12:03:56.000+0000"
+
+}
+
+}
+
+}
+
+],
+
+"nRPCI":12,
+
+"nRTAC":310,
+
+"resourceType":"PRB"
+
+},
+
+{
+
+"cellLocalId":103593999,
+
+"operationalState":"ENABLED",
+
+"administrativeState":"UNLOCKED",
+
+"cellState":"ACTIVE",
+
+"pLMNInfoList":[
+
+{
+
+"pLMNId":"310-410",
+
+"sNSSAI":{
+
+"sNSSAI":"001-00110",
+
+"status":"ACTIVE",
+
+"globalSubscriberId":null,
+
+"subscriptionServiceType":null,
+
+"configData":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T07:02:28.000+0000"
+
+}
+
+}
+
+}
+
+],
+
+"nRPCI":12,
+
+"nRTAC":310,
+
+"resourceType":"PRB"
+
+}
+
+],
+
+"nearRTRICId":null
+
+}
+
+]
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_list_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_list_001_010000.json
new file mode 100644
index 00000000..82d7fb1a
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/du_list_001_010000.json
@@ -0,0 +1,359 @@
+[
+
+ {
+
+ "gNBDUId":2,
+
+ "gNBId":98763,
+
+ "gNBIdLength":5,
+
+ "gNBDUName":"gnduserver2",
+
+ "pLMNId":"310-410",
+
+ "nFType":"DU",
+
+ "cellDUList":[
+
+ {
+
+ "cellLocalId":95697155,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":95697174,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":95697175,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ }
+
+ ],
+
+ "nearRTRICId":null
+
+ },
+
+ {
+
+ "gNBDUId":4,
+
+ "gNBId":98763,
+
+ "gNBIdLength":5,
+
+ "gNBDUName":"gnduserver4",
+
+ "pLMNId":"310-410",
+
+ "nFType":"DU",
+
+ "cellDUList":[
+
+ {
+
+ "cellLocalId":112951561,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":112951562,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":112951568,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ }
+
+ ],
+
+ "nearRTRICId":null
+
+ }
+
+]
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/profile_config_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/profile_config_001_00110.json
new file mode 100644
index 00000000..533095fc
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/profile_config_001_00110.json
@@ -0,0 +1,9 @@
+{
+
+"maxNumberOfConns":3000,
+
+"dLThptPerSlice":50,
+
+"uLThptPerSlice":40
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/profile_config_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/profile_config_001_010000.json
new file mode 100644
index 00000000..422a6fa3
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/profile_config_001_010000.json
@@ -0,0 +1,9 @@
+{
+
+ "maxNumberOfConns":3000,
+
+ "dLThptPerSlice":54,
+
+ "uLThptPerSlice":60
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/slice_config_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/slice_config_001_00110.json
new file mode 100644
index 00000000..013318a2
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/slice_config_001_00110.json
@@ -0,0 +1,15 @@
+{
+
+"11":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T12:01:34.000+0000"
+
+}
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/slice_config_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/slice_config_001_010000.json
new file mode 100644
index 00000000..7d326c20
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/slice_config_001_010000.json
@@ -0,0 +1,27 @@
+{
+
+ "22":{
+
+ "dLThptPerSlice":27,
+
+ "uLThptPerSlice":30,
+
+ "maxNumberOfConns":3000,
+
+ "lastUpdatedTS":"2020-11-03T07:40:45.000+0000"
+
+ },
+
+ "11":{
+
+ "dLThptPerSlice":27,
+
+ "uLThptPerSlice":30,
+
+ "maxNumberOfConns":3000,
+
+ "lastUpdatedTS":"2020-11-03T07:40:28.000+0000"
+
+ }
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/subscriber-details_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/subscriber-details_001_00110.json
new file mode 100644
index 00000000..5149513e
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/subscriber-details_001_00110.json
@@ -0,0 +1,13 @@
+{
+
+"subscriptionServiceType":"Premium",
+
+"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd",
+
+"ranNFNSSIId":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82",
+
+"globalSubscriberId":"Customer-001",
+
+"sNSSAI":"001-00110"
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/sim-data/subscriber-details_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/subscriber-details_001_010000.json
new file mode 100644
index 00000000..e7026672
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/sim-data/subscriber-details_001_010000.json
@@ -0,0 +1,13 @@
+{
+
+ "subscriptionServiceType":"Premium",
+
+ "sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd",
+
+ "ranNFNSSIId":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82",
+
+ "globalSubscriberId":"Customer-001",
+
+ "sNSSAI":"001-010000"
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/Dockerfile b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/Dockerfile
new file mode 100644
index 00000000..52d54a57
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/Dockerfile
@@ -0,0 +1,15 @@
+FROM python:alpine3.7
+
+ADD configdb-sim.py /
+
+ADD ./sim-data /
+
+RUN pip install Flask --trusted-host pypi.org --trusted-host files.pythonhosted.org
+
+RUN pip install requests --trusted-host pypi.org --trusted-host files.pythonhosted.org
+
+EXPOSE 5000
+
+CMD ["flask", "run", "--host", "0.0.0.0"]
+
+CMD [ "python", "./configdb-sim.py" ]
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/configdb-sim.py b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/configdb-sim.py
new file mode 100644
index 00000000..bcda08d5
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/configdb-sim.py
@@ -0,0 +1,115 @@
+import flask
+import json
+from flask import Flask, render_template
+from flask import request
+from flask import jsonify
+import requests
+import threading
+import time
+
+app = flask.Flask(__name__)
+app.config["DEBUG"] = True
+
+
+def get_du_list_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('du_list_001_00110.json') as du_list:
+ data = json.load(du_list)
+ else:
+ with open('du_list_001_010000.json') as du_list:
+ data = json.load(du_list)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+def get_du_cell_list_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('du_cell_list_001_00110.json') as du_cell_list:
+ data = json.load(du_cell_list)
+ else:
+ with open('du_cell_list_001_010000.json') as du_cell_list:
+ data = json.load(du_cell_list)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+def get_slice_config_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('slice_config_001_00110.json') as slice_config:
+ data = json.load(slice_config)
+ else:
+ with open('slice_config_001_010000.json') as slice_config:
+ data = json.load(slice_config)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+def get_profile_config_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('profile_config_001_00110.json') as profile_config:
+ data = json.load(profile_config)
+ else:
+ with open('profile_config_001_010000.json') as profile_config:
+ data = json.load(profile_config)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+def get_subscriber_details_for_nssai(snssai):
+ if str(snssai) == '001-00110':
+ with open('subscriber-details_001_00110.json') as subscriber_details:
+ data = json.load(subscriber_details)
+ else:
+ with open('subscriber-details_001_010000.json') as subscriber_details:
+ data = json.load(subscriber_details)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+
+@app.route("/api/sdnc-config-db/v4/du-list/<snssai>", methods=["GET"])
+def get_du_list(snssai):
+ data, status = get_du_list_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+@app.route("/api/sdnc-config-db/v4/du-cell-list/<snssai>", methods=["GET"])
+def get_du_cell_list(snssai):
+ data, status = get_du_cell_list_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+@app.route("/api/sdnc-config-db/v4/slice-config/<snssai>", methods=["GET"])
+def get_slice_config(snssai):
+ data, status = get_slice_config_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+@app.route("/api/sdnc-config-db/v4/profile-config/<snssai>", methods=["GET"])
+def get_profile_config(snssai):
+ data, status = get_profile_config_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+@app.route("/api/sdnc-config-db/v4/subscriber-details/<snssai>",
+ methods=["GET"])
+def get_subscriber_details(snssai):
+ data, status = get_subscriber_details_for_nssai(snssai)
+ if not status:
+ return jsonify(data)
+ return data, 503
+
+
+app.run(host='0.0.0.0')
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_cell_list_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_cell_list_001_00110.json
new file mode 100644
index 00000000..f01f0b98
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_cell_list_001_00110.json
@@ -0,0 +1,111 @@
+{
+
+"11":[
+
+{
+
+"cellLocalId":103593999,
+
+"operationalState":"ENABLED",
+
+"administrativeState":"UNLOCKED",
+
+"cellState":"ACTIVE",
+
+"pLMNInfoList":[
+
+{
+
+"pLMNId":"310-410",
+
+"sNSSAI":{
+
+"sNSSAI":"001-00110",
+
+"status":"ACTIVE",
+
+"globalSubscriberId":null,
+
+"subscriptionServiceType":null,
+
+"configData":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T07:02:28.000+0000"
+
+}
+
+}
+
+}
+
+],
+
+"nRPCI":12,
+
+"nRTAC":310,
+
+"resourceType":"PRB"
+
+},
+
+{
+
+"cellLocalId":103593989,
+
+"operationalState":"ENABLED",
+
+"administrativeState":"UNLOCKED",
+
+"cellState":"ACTIVE",
+
+"pLMNInfoList":[
+
+{
+
+"pLMNId":"310-410",
+
+"sNSSAI":{
+
+"sNSSAI":"001-00110",
+
+"status":"ACTIVE",
+
+"globalSubscriberId":null,
+
+"subscriptionServiceType":null,
+
+"configData":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T12:03:56.000+0000"
+
+}
+
+}
+
+}
+
+],
+
+"nRPCI":12,
+
+"nRTAC":310,
+
+"resourceType":"PRB"
+
+}
+
+]
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_cell_list_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_cell_list_001_010000.json
new file mode 100644
index 00000000..54b2b7c5
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_cell_list_001_010000.json
@@ -0,0 +1,323 @@
+{
+
+ "22":[
+
+ {
+
+ "cellLocalId":112951562,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":112951561,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":112951568,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ }
+
+ ],
+
+ "11":[
+
+ {
+
+ "cellLocalId":95697174,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":95697175,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":95697155,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ }
+
+ ]
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_list_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_list_001_00110.json
new file mode 100644
index 00000000..a4c6f2ff
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_list_001_00110.json
@@ -0,0 +1,129 @@
+[
+
+{
+
+"gNBDUId":1,
+
+"gNBId":98763,
+
+"gNBIdLength":5,
+
+"gNBDUName":"gnduserver1",
+
+"pLMNId":"310-410",
+
+"nFType":"DU",
+
+"cellDUList":[
+
+{
+
+"cellLocalId":103593989,
+
+"operationalState":"ENABLED",
+
+"administrativeState":"UNLOCKED",
+
+"cellState":"ACTIVE",
+
+"pLMNInfoList":[
+
+{
+
+"pLMNId":"310-410",
+
+"sNSSAI":{
+
+"sNSSAI":"001-00110",
+
+"status":"ACTIVE",
+
+"globalSubscriberId":null,
+
+"subscriptionServiceType":null,
+
+"configData":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T12:03:56.000+0000"
+
+}
+
+}
+
+}
+
+],
+
+"nRPCI":12,
+
+"nRTAC":310,
+
+"resourceType":"PRB"
+
+},
+
+{
+
+"cellLocalId":103593999,
+
+"operationalState":"ENABLED",
+
+"administrativeState":"UNLOCKED",
+
+"cellState":"ACTIVE",
+
+"pLMNInfoList":[
+
+{
+
+"pLMNId":"310-410",
+
+"sNSSAI":{
+
+"sNSSAI":"001-00110",
+
+"status":"ACTIVE",
+
+"globalSubscriberId":null,
+
+"subscriptionServiceType":null,
+
+"configData":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T07:02:28.000+0000"
+
+}
+
+}
+
+}
+
+],
+
+"nRPCI":12,
+
+"nRTAC":310,
+
+"resourceType":"PRB"
+
+}
+
+],
+
+"nearRTRICId":null
+
+}
+
+]
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_list_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_list_001_010000.json
new file mode 100644
index 00000000..82d7fb1a
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/du_list_001_010000.json
@@ -0,0 +1,359 @@
+[
+
+ {
+
+ "gNBDUId":2,
+
+ "gNBId":98763,
+
+ "gNBIdLength":5,
+
+ "gNBDUName":"gnduserver2",
+
+ "pLMNId":"310-410",
+
+ "nFType":"DU",
+
+ "cellDUList":[
+
+ {
+
+ "cellLocalId":95697155,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":95697174,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":95697175,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:13.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ }
+
+ ],
+
+ "nearRTRICId":null
+
+ },
+
+ {
+
+ "gNBDUId":4,
+
+ "gNBId":98763,
+
+ "gNBIdLength":5,
+
+ "gNBDUName":"gnduserver4",
+
+ "pLMNId":"310-410",
+
+ "nFType":"DU",
+
+ "cellDUList":[
+
+ {
+
+ "cellLocalId":112951561,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":112951562,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ },
+
+ {
+
+ "cellLocalId":112951568,
+
+ "operationalState":"ENABLED",
+
+ "administrativeState":"UNLOCKED",
+
+ "cellState":"ACTIVE",
+
+ "pLMNInfoList":[
+
+ {
+
+ "pLMNId":"310-410",
+
+ "sNSSAI":{
+
+ "sNSSAI":"001-010000",
+
+ "status":"ACTIVE",
+
+ "globalSubscriberId":null,
+
+ "subscriptionServiceType":null,
+
+ "configData":{
+
+ "dLThptPerSlice":9,
+
+ "uLThptPerSlice":10,
+
+ "maxNumberOfConns":null,
+
+ "lastUpdatedTS":"2020-11-03T07:41:34.000+0000"
+
+ }
+
+ }
+
+ }
+
+ ],
+
+ "nRPCI":12,
+
+ "nRTAC":310,
+
+ "resourceType":"PRB"
+
+ }
+
+ ],
+
+ "nearRTRICId":null
+
+ }
+
+]
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/profile_config_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/profile_config_001_00110.json
new file mode 100644
index 00000000..533095fc
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/profile_config_001_00110.json
@@ -0,0 +1,9 @@
+{
+
+"maxNumberOfConns":3000,
+
+"dLThptPerSlice":50,
+
+"uLThptPerSlice":40
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/profile_config_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/profile_config_001_010000.json
new file mode 100644
index 00000000..422a6fa3
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/profile_config_001_010000.json
@@ -0,0 +1,9 @@
+{
+
+ "maxNumberOfConns":3000,
+
+ "dLThptPerSlice":54,
+
+ "uLThptPerSlice":60
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/slice_config_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/slice_config_001_00110.json
new file mode 100644
index 00000000..013318a2
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/slice_config_001_00110.json
@@ -0,0 +1,15 @@
+{
+
+"11":{
+
+"dLThptPerSlice":20,
+
+"uLThptPerSlice":15,
+
+"maxNumberOfConns":null,
+
+"lastUpdatedTS":"2020-10-13T12:01:34.000+0000"
+
+}
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/slice_config_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/slice_config_001_010000.json
new file mode 100644
index 00000000..7d326c20
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/slice_config_001_010000.json
@@ -0,0 +1,27 @@
+{
+
+ "22":{
+
+ "dLThptPerSlice":27,
+
+ "uLThptPerSlice":30,
+
+ "maxNumberOfConns":3000,
+
+ "lastUpdatedTS":"2020-11-03T07:40:45.000+0000"
+
+ },
+
+ "11":{
+
+ "dLThptPerSlice":27,
+
+ "uLThptPerSlice":30,
+
+ "maxNumberOfConns":3000,
+
+ "lastUpdatedTS":"2020-11-03T07:40:28.000+0000"
+
+ }
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/subscriber-details_001_00110.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/subscriber-details_001_00110.json
new file mode 100644
index 00000000..5149513e
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/subscriber-details_001_00110.json
@@ -0,0 +1,13 @@
+{
+
+"subscriptionServiceType":"Premium",
+
+"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd",
+
+"ranNFNSSIId":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82",
+
+"globalSubscriberId":"Customer-001",
+
+"sNSSAI":"001-00110"
+
+}
diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/subscriber-details_001_010000.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/subscriber-details_001_010000.json
new file mode 100644
index 00000000..e7026672
--- /dev/null
+++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/sim-data/subscriber-details_001_010000.json
@@ -0,0 +1,13 @@
+{
+
+ "subscriptionServiceType":"Premium",
+
+ "sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd",
+
+ "ranNFNSSIId":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82",
+
+ "globalSubscriberId":"Customer-001",
+
+ "sNSSAI":"001-010000"
+
+}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_payload.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_payload.json
new file mode 100644
index 00000000..73425aaf
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_payload.json
@@ -0,0 +1 @@
+{"name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","globalSubscriberId":"Customer-001","subscriptionServiceType":"Premium","networkType":"AN","additionalProperties":{"modifyAction":"reconfigure","snssaiList":["001-00110"],"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd","resourceConfig":{"snssai":"001-00110","data":[{"gNBCUName":"cucpserver1","nearRTRICId":"11","cellCUList":[{"cellLocalId":103593989,"configData":{"maxNumberofConns":"20","predictedMaxNumberofConns":"25","lastUpdatedTS":"yyyy/MM/dd HH:mm:ss"}}]}]},"nsiInfo":{"nsiName":"","nsiId":"23b250a7-61f3-460a-9bb2-d35923148541"},"scriptName":"AN"}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_response.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_response.json
new file mode 100644
index 00000000..576fc891
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_response.json
@@ -0,0 +1 @@
+{"closedLoopControlName":"ControlLoop-Slicing-116d7b00-dbeb-4d03-8719-d0a658fa735b","closedLoopAlarmStart":1604468227374,"closedLoopEventClient":"microservice.sliceAnalysisMS","closedLoopEventStatus":"ONSET","requestID":"0196f8a4-117b-4e51-b013-92e0b7ad95a8","target":"vserver.vserver-name","payload":{"name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","globalSubscriberId":"Customer-001","subscriptionServiceType":"Premium","networkType":"AN","additionalProperties":{"modifyAction":"reconfigure","snssaiList":["001-00110"],"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd","resourceConfig":{"snssai":"001-00110","data":[{"gNBCUName":"cucpserver1","nearRTRICId":"11","cellCUList":[{"cellLocalId":103593989,"configData":{"maxNumberofConns":"20","predictedMaxNumberofConns":"25","lastUpdatedTS":"yyyy/MM/dd HH:mm:ss"}}]}]},"nsiInfo":{"nsiName":"","nsiId":"2d43ff64-76bd-437b-ab98-1e7aa3e5df5f"},"scriptName":"AN"}},"from":"DCAE","version":"1.0.2","target_type":"VNF","AAI":{"vserver.is-closed-loop-disabled":"false","vserver.prov-status":"ACTIVE","vserver.vserver-name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82"}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm1.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm1.json
new file mode 100644
index 00000000..545b90c7
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm1.json
@@ -0,0 +1 @@
+{"name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","globalSubscriberId":"Customer-001","subscriptionServiceType":"Premium","networkType":"AN","additionalProperties":{"modifyAction":"reconfigure","snssaiList":["001-00110"],"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd","resourceConfig":{"11":{"dLThptPerSlice":50,"uLThptPerSlice":40}},"nsiInfo":{"nsiName":"","nsiId":"b149c982-a124-4aaf-a917-89c32ec7b284"},"scriptName":"AN"}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm2.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm2.json
new file mode 100644
index 00000000..b1ea24b1
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm2.json
@@ -0,0 +1 @@
+{"name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","globalSubscriberId":"Customer-001","subscriptionServiceType":"Premium","networkType":"AN","additionalProperties":{"modifyAction":"reconfigure","snssaiList":["001-010000"],"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd","resourceConfig":{"11":{"dLThptPerSlice":29,"uLThptPerSlice":32},"22":{"dLThptPerSlice":25,"uLThptPerSlice":28}},"nsiInfo":{"nsiName":"","nsiId":"493bf7aa-59a5-4f72-b1bc-f1bad9fc8600"},"scriptName":"AN"}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm.json
new file mode 100644
index 00000000..a1b49165
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm.json
@@ -0,0 +1 @@
+{"closedLoopControlName":"ControlLoop-Slicing-116d7b00-dbeb-4d03-8719-d0a658fa735b","closedLoopAlarmStart":1608198244852,"closedLoopEventClient":"microservice.sliceAnalysisMS","closedLoopEventStatus":"ONSET","requestID":"4fae9c22-59f1-47e8-a8a2-c4cbb79418cc","target":"vserver.vserver-name","payload":{"name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","globalSubscriberId":"Customer-001","subscriptionServiceType":"Premium","networkType":"AN","additionalProperties":{"modifyAction":"reconfigure","snssaiList":["001-010000"],"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd","resourceConfig":{"11":{"dLThptPerSlice":29,"uLThptPerSlice":32},"22":{"dLThptPerSlice":25,"uLThptPerSlice":28}},"nsiInfo":{"nsiName":"","nsiId":"f61681df-cbbe-4851-9ab6-fab24c8c77b4"},"scriptName":"AN"}},"from":"DCAE","version":"1.0.2","target_type":"VNF","AAI":{"vserver.is-closed-loop-disabled":"false","vserver.prov-status":"ACTIVE","vserver.vserver-name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82"}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm1.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm1.json
new file mode 100644
index 00000000..bd4ca924
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm1.json
@@ -0,0 +1 @@
+{"closedLoopControlName":"ControlLoop-Slicing-116d7b00-dbeb-4d03-8719-d0a658fa735b","closedLoopAlarmStart":1604494201291,"closedLoopEventClient":"microservice.sliceAnalysisMS","closedLoopEventStatus":"ONSET","requestID":"0afb48b6-db08-45d6-aff3-675255f51ed5","target":"vserver.vserver-name","payload":{"name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","globalSubscriberId":"Customer-001","subscriptionServiceType":"Premium","networkType":"AN","additionalProperties":{"modifyAction":"reconfigure","snssaiList":["001-00110"],"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd","resourceConfig":{"11":{"dLThptPerSlice":50,"uLThptPerSlice":40}},"nsiInfo":{"nsiName":"","nsiId":"a7f1242d-5889-46c3-bb0a-800c6ae388d1"},"scriptName":"AN"}},"from":"DCAE","version":"1.0.2","target_type":"VNF","AAI":{"vserver.is-closed-loop-disabled":"false","vserver.prov-status":"ACTIVE","vserver.vserver-name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82"}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm2.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm2.json
new file mode 100644
index 00000000..bd4ca924
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm2.json
@@ -0,0 +1 @@
+{"closedLoopControlName":"ControlLoop-Slicing-116d7b00-dbeb-4d03-8719-d0a658fa735b","closedLoopAlarmStart":1604494201291,"closedLoopEventClient":"microservice.sliceAnalysisMS","closedLoopEventStatus":"ONSET","requestID":"0afb48b6-db08-45d6-aff3-675255f51ed5","target":"vserver.vserver-name","payload":{"name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82","globalSubscriberId":"Customer-001","subscriptionServiceType":"Premium","networkType":"AN","additionalProperties":{"modifyAction":"reconfigure","snssaiList":["001-00110"],"sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd","resourceConfig":{"11":{"dLThptPerSlice":50,"uLThptPerSlice":40}},"nsiInfo":{"nsiName":"","nsiId":"a7f1242d-5889-46c3-bb0a-800c6ae388d1"},"scriptName":"AN"}},"from":"DCAE","version":"1.0.2","target_type":"VNF","AAI":{"vserver.is-closed-loop-disabled":"false","vserver.prov-status":"ACTIVE","vserver.vserver-name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82"}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm3.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm3.json
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_pm3.json
@@ -0,0 +1 @@
+
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/ml_response.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/ml_response.json
new file mode 100644
index 00000000..d287d036
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/ml_response.json
@@ -0,0 +1,69 @@
+{
+
+
+
+"snssai":"001-00110",
+
+
+
+"data":[
+
+
+
+{
+
+
+
+"gNBCUName":"cucpserver1",
+
+
+
+"cellCUList":[
+
+
+
+{
+
+
+
+"cellLocalId":103593989,
+
+
+
+"configData":{
+
+
+
+"maxNumberofConns":"20",
+
+
+
+"predictedMaxNumberofConns":"25",
+
+
+
+"lastUpdatedTS":"yyyy/MM/dd HH:mm:ss"
+
+
+
+}
+
+
+
+}
+
+
+
+]
+
+
+
+}
+
+
+
+]
+
+
+
+}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification1.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification1.json
new file mode 100644
index 00000000..1919e95d
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification1.json
@@ -0,0 +1,56 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "domain": "perf3gpp",
+ "eventId": "9e7c7db8-7a51-4bff-94f5-b530296edd7c",
+ "sequence": 0,
+ "eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult",
+ "sourceName": "oteNB5309",
+ "reportingEntityName": "",
+ "priority": "Normal",
+ "startEpochMicrosec": 1538478000000,
+ "lastEpochMicrosec": 1538478900000,
+ "version": "4.0",
+ "vesEventListenerVersion": "7.1",
+ "timeZoneOffset": "UTC+05:00"
+ },
+ "perf3gppFields": {
+ "perf3gppFieldsVersion": "1.0",
+ "measDataCollection": {
+ "granularityPeriod": 1538482500000,
+ "measuredEntityUserName": "",
+ "measuredEntityDn": "1",
+ "measuredEntitySoftwareVersion": "r0.1",
+ "measInfoList": [{
+ "measInfoId": {
+ "sMeasInfoId": "some measInfoId"
+ },
+ "measTypes": {
+ "sMeasTypesList": ["SM.PrbUsedDl.001-00110", "SM.PrbUsedUl.001-00110"]
+ },
+ "measValuesList": [{
+ "measObjInstId": "103593989",
+ "suspectFlag": "false",
+ "measResults": [{
+ "p": 1,
+ "sValue": "75"
+ }, {
+ "p": 2,
+ "sValue": "84"
+ }]
+ }, {
+ "measObjInstId": "103593999",
+ "suspectFlag": "false",
+ "measResults": [{
+ "p": 1,
+ "sValue": "90"
+ }, {
+ "p": 2,
+ "sValue": "95"
+ }]
+ }]
+ }]
+ }
+ }
+ }
+}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification2.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification2.json
new file mode 100644
index 00000000..7ca8a652
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification2.json
@@ -0,0 +1,56 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "domain": "perf3gpp",
+ "eventId": "9e7c7db8-7a51-4bff-94f5-b530296edd7c",
+ "sequence": 0,
+ "eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult",
+ "sourceName": "oteNB5309",
+ "reportingEntityName": "",
+ "priority": "Normal",
+ "startEpochMicrosec": 1538478000000,
+ "lastEpochMicrosec": 1538478900000,
+ "version": "4.0",
+ "vesEventListenerVersion": "7.1",
+ "timeZoneOffset": "UTC+05:00"
+ },
+ "perf3gppFields": {
+ "perf3gppFieldsVersion": "1.0",
+ "measDataCollection": {
+ "granularityPeriod": 1538482500000,
+ "measuredEntityUserName": "",
+ "measuredEntityDn": "1",
+ "measuredEntitySoftwareVersion": "r0.1",
+ "measInfoList": [{
+ "measInfoId": {
+ "sMeasInfoId": "some measInfoId"
+ },
+ "measTypes": {
+ "sMeasTypesList": ["SM.PrbUsedDl.001-010000", "SM.PrbUsedUl.001-010000"]
+ },
+ "measValuesList": [{
+ "measObjInstId": "103593989",
+ "suspectFlag": "false",
+ "measResults": [{
+ "p": 1,
+ "sValue": "75"
+ }, {
+ "p": 2,
+ "sValue": "84"
+ }]
+ }, {
+ "measObjInstId": "103593999",
+ "suspectFlag": "false",
+ "measResults": [{
+ "p": 1,
+ "sValue": "90"
+ }, {
+ "p": 2,
+ "sValue": "95"
+ }]
+ }]
+ }]
+ }
+ }
+ }
+}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification3.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification3.json
new file mode 100644
index 00000000..78f5ccb6
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification3.json
@@ -0,0 +1 @@
+{"event": {"commonEventHeader": {"domain":"perf3gpp","eventId": "65e9a550-5f74-4952-bb89-07ce5aa51ce3","sequence": 0,"eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult","sourceName": "oteNB5309","reportingEntityName": "","priority": "Normal","startEpochMicrosec": 1538478000000,"lastEpochMicrosec": 1538478900000,"version": "4.0","vesEventListenerVersion": "7.1","timeZoneOffset": "UTC+05:00"},"perf3gppFields": {"perf3gppFieldsVersion": "1.0","measDataCollection": {"granularityPeriod": 1538482500000,"measuredEntityUserName": "","measuredEntityDn": "2","measuredEntitySoftwareVersion": "r0.1","measInfoList": [{"measInfoId": {"sMeasInfoId": "some measInfoId"},"measTypes": {"sMeasTypesList":["SM.PrbUsedDl.001-010000","SM.PrbUsedUl.001-010000"]},"measValuesList": [{"measObjInstId": "95697155","suspectFlag": "false","measResults": [{"p": 1,"sValue": "80"},{"p": 2,"sValue": "70"}]},{"measObjInstId": "95697175","suspectFlag": "false","measResults": [{"p": 1,"sValue": "82"},{"p": 2,"sValue": "72"}]},{"measObjInstId": "95697174","suspectFlag": "false","measResults": [{"p": 1,"sValue": "85"},{"p": 2,"sValue": "75"}]}]}]}}}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification4.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification4.json
new file mode 100644
index 00000000..4f81e9ba
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification4.json
@@ -0,0 +1 @@
+{"event": {"commonEventHeader": {"domain": "perf3gpp","eventId": "0556fcae-e684-41fe-b85f-d033a11fe161","sequence": 0,"eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult","sourceName": "oteNB5309","reportingEntityName": "","priority": "Normal","startEpochMicrosec": 1538478000000,"lastEpochMicrosec": 1538478900000,"version": "4.0","vesEventListenerVersion": "7.1","timeZoneOffset": "UTC+05:00"},"perf3gppFields": {"perf3gppFieldsVersion": "1.0","measDataCollection": {"granularityPeriod": 1538482500000,"measuredEntityUserName": "","measuredEntityDn": "2","measuredEntitySoftwareVersion": "r0.1","measInfoList": [{"measInfoId": {"sMeasInfoId": "some measInfoId"},"measTypes": {"sMeasTypesList":["SM.PrbUsedDl.001-010000","SM.PrbUsedUl.001-010000"]},"measValuesList": [{"measObjInstId": "95697155","suspectFlag": "false","measResults": [{"p": 1,"sValue": "81"},{"p": 2,"sValue": "71"}]},{"measObjInstId": "95697175","suspectFlag": "false","measResults": [{"p": 1,"sValue": "83"},{"p": 2,"sValue": "73"}]},{"measObjInstId": "95697174","suspectFlag": "false","measResults": [{"p": 1,"sValue": "86"},{"p": 2,"sValue": "76"}]}]}]}}}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification5.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification5.json
new file mode 100644
index 00000000..877d205b
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification5.json
@@ -0,0 +1 @@
+{"event": {"commonEventHeader": {"domain": "perf3gpp","eventId": "246cd43f-3e6e-4e54-84cd-c9dcf2723c3c","sequence": 0,"eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult","sourceName": "oteNB5309","reportingEntityName": "","priority": "Normal","startEpochMicrosec": 1538478000000,"lastEpochMicrosec": 1538478900000,"version": "4.0","vesEventListenerVersion": "7.1","timeZoneOffset": "UTC+05:00"},"perf3gppFields": {"perf3gppFieldsVersion": "1.0","measDataCollection": {"granularityPeriod": 1538482500000,"measuredEntityUserName": "","measuredEntityDn": "2","measuredEntitySoftwareVersion": "r0.1","measInfoList": [{"measInfoId": {"sMeasInfoId": "some measInfoId"},"measTypes": {"sMeasTypesList":["SM.PrbUsedDl.001-010000","SM.PrbUsedUl.001-010000"]},"measValuesList": [{"measObjInstId": "95697155","suspectFlag": "false","measResults": [{"p": 1,"sValue": "82"},{"p": 2,"sValue": "72"}]},{"measObjInstId": "95697175","suspectFlag": "false","measResults": [{"p": 1,"sValue": "84"},{"p": 2,"sValue": "74"}]},{"measObjInstId": "95697174","suspectFlag": "false","measResults": [{"p": 1,"sValue": "87"},{"p": 2,"sValue": "77"}]}]}]}}}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification6.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification6.json
new file mode 100644
index 00000000..74857e02
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification6.json
@@ -0,0 +1 @@
+{"event": {"commonEventHeader": {"domain": "perf3gpp","eventId": "c37b045f-4339-4ef2-9b64-3b781d6d8378","sequence": 0,"eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult","sourceName": "oteNB5309","reportingEntityName": "","priority": "Normal","startEpochMicrosec": 1538478000000,"lastEpochMicrosec": 1538478900000,"version": "4.0","vesEventListenerVersion": "7.1","timeZoneOffset": "UTC+05:00"},"perf3gppFields": {"perf3gppFieldsVersion": "1.0","measDataCollection": {"granularityPeriod": 1538482500000,"measuredEntityUserName": "","measuredEntityDn": "4","measuredEntitySoftwareVersion": "r0.1","measInfoList": [{"measInfoId": {"sMeasInfoId": "some measInfoId"},"measTypes": {"sMeasTypesList":["SM.PrbUsedDl.001-010000","SM.PrbUsedUl.001-010000"]},"measValuesList": [{"measObjInstId": "112951561","suspectFlag": "false","measResults": [{"p": 1,"sValue": "70"},{"p": 2,"sValue": "60"}]},{"measObjInstId": "112951562","suspectFlag": "false","measResults": [{"p": 1,"sValue": "72"},{"p": 2,"sValue": "63"}]},{"measObjInstId": "112951568","suspectFlag": "false","measResults": [{"p": 1,"sValue": "75"},{"p": 2,"sValue": "65"}]}]}]}}}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification7.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification7.json
new file mode 100644
index 00000000..312bc547
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification7.json
@@ -0,0 +1 @@
+{"event": {"commonEventHeader": {"domain": "perf3gpp","eventId": "88a3ad1f-9b58-4f49-85ba-2645856bb885","sequence": 0,"eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult","sourceName": "oteNB5309","reportingEntityName": "","priority": "Normal","startEpochMicrosec": 1538478000000,"lastEpochMicrosec": 1538478900000,"version": "4.0","vesEventListenerVersion": "7.1","timeZoneOffset": "UTC+05:00"},"perf3gppFields": {"perf3gppFieldsVersion": "1.0","measDataCollection": {"granularityPeriod": 1538482500000,"measuredEntityUserName": "","measuredEntityDn": "4","measuredEntitySoftwareVersion": "r0.1","measInfoList": [{"measInfoId": {"sMeasInfoId": "some measInfoId"},"measTypes": {"sMeasTypesList":["SM.PrbUsedDl.001-010000","SM.PrbUsedUl.001-010000"]},"measValuesList": [{"measObjInstId": "112951561","suspectFlag": "false","measResults": [{"p": 1,"sValue": "71"},{"p": 2,"sValue": "61"}]},{"measObjInstId": "112951562","suspectFlag": "false","measResults": [{"p": 1,"sValue": "73"},{"p": 2,"sValue": "63"}]},{"measObjInstId": "112951568","suspectFlag": "false","measResults": [{"p": 1,"sValue": "76"},{"p": 2,"sValue": "66"}]}]}]}}}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification8.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification8.json
new file mode 100644
index 00000000..82cec2c6
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification8.json
@@ -0,0 +1 @@
+{"event": {"commonEventHeader": {"domain": "perf3gpp","eventId": "c99eb88b-2907-4aec-8bf3-4532ebd9d50b","sequence": 0,"eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult","sourceName": "oteNB5309","reportingEntityName": "","priority": "Normal","startEpochMicrosec": 1538478000000,"lastEpochMicrosec": 1538478900000,"version": "4.0","vesEventListenerVersion": "7.1","timeZoneOffset": "UTC+05:00"},"perf3gppFields": {"perf3gppFieldsVersion": "1.0","measDataCollection": {"granularityPeriod": 1538482500000,"measuredEntityUserName": "","measuredEntityDn": "4","measuredEntitySoftwareVersion": "r0.1","measInfoList": [{"measInfoId": {"sMeasInfoId": "some measInfoId"},"measTypes": {"sMeasTypesList":["SM.PrbUsedDl.001-010000","SM.PrbUsedUl.001-010000"]},"measValuesList": [{"measObjInstId": "112951561","suspectFlag": "false","measResults": [{"p": 1,"sValue": "72"},{"p": 2,"sValue": "62"}]},{"measObjInstId": "112951562","suspectFlag": "false","measResults": [{"p": 1,"sValue": "74"},{"p": 2,"sValue": "64"}]},{"measObjInstId": "112951568","suspectFlag": "false","measResults": [{"p": 1,"sValue": "77"},{"p": 2,"sValue": "67"}]}]}]}}}}
diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test.robot b/tests/dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test.robot
new file mode 100644
index 00000000..db9925f8
--- /dev/null
+++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test.robot
@@ -0,0 +1,124 @@
+*** Settings ***
+Library Collections
+Library Process
+Library RequestsLibrary
+Library String
+Library OperatingSystem
+
+Suite Teardown Delete All Sessions
+
+*** Variables ***
+${SLICE_ANALYSIS_MS_BASE_URL} http://${SLICE_ANALYSIS_MS_IP}:8080
+${HEALTHCHECK_ENDPOINT} /healthcheck
+${DMAAP_URL} http://${DMAAP_IP}:3904/events
+${unauthenticated.DCAE_CL_OUTPUT} /unauthenticated.DCAE_CL_OUTPUT/23/23
+${POST_DMAAP_EVENT_FOR_ML_NOTIF_URL} http://${DMAAP_IP}:3904/events/unauthenticated.ML_RESPONSE_TOPIC
+${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL} http://${DMAAP_IP}:3904/events/unauthenticated.PERFORMANCE_MEASUREMENTS
+
+
+*** Test Cases ***
+
+HealthCheck
+
+ Create Session sliceanalysisms ${SLICE_ANALYSIS_MS_BASE_URL}
+ ${resp}= Get Request sliceanalysisms ${HEALTHCHECK_ENDPOINT}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+
+Post ml notification to dmaap
+ Create Session dmaap ${DMAAP_URL}
+ ${headers}= Create Dictionary Content-Type application/json
+ ${data}= Get File ${TEST_ROBOT_DIR}/data/ml_response.json
+ ${response}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_ML_NOTIF_URL}', data=$data)
+ Should Be Equal As Strings ${response.status_code} 200
+
+
+Verify ml notification trigger
+ Create Session dmaap ${DMAAP_URL}
+ FOR ${i} IN RANGE 30
+ ${result}= Get Request dmaap ${unauthenticated.DCAE_CL_OUTPUT}
+ Exit For Loop If ${result.json()} != @{EMPTY}
+ Log Waiting for slice-analysis-ms to handle trigger... console=${True}
+ Sleep 5s
+ END
+
+ ${expected_string}= Get File ${TEST_ROBOT_DIR}/data/expected_ml_payload.json
+ ${expected_payload}= Evaluate json.loads("""${expected_string}""") json
+ ${result}= Convert To String ${result.content}
+ ${result_string}= Get Substring ${result} 2 -2
+ ${actual_data}= Evaluate json.loads("""${result_string}""") json
+ ${actual_payload_str}= Set Variable ${actual_data['payload']}
+ ${actual_payload}= Evaluate json.loads("""${actual_payload_str}""") json
+ set to dictionary ${expected_payload['additionalProperties']['nsiInfo']} nsiId=${actual_payload['additionalProperties']['nsiInfo']['nsiId']}
+ Should Be True """${actual_payload}""".strip() == """${expected_payload}""".strip()
+
+
+Post pm notification-1 to dmaap
+ ${data}= Get File ${TEST_ROBOT_DIR}/data/performance_notification1.json
+ FOR ${j} IN RANGE 6
+ ${response}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data)
+ Sleep 10s
+ END
+ Should Be Equal As Strings ${response.status_code} 200
+
+
+Verify pm notification-1 trigger
+ Create Session dmaap ${DMAAP_URL}
+ FOR ${i} IN RANGE 20
+ ${result}= Get Request dmaap ${unauthenticated.DCAE_CL_OUTPUT}
+ Exit For Loop If ${result.json()} != @{EMPTY}
+ Log Waiting for sliceanalysisms to handle trigger... console=${True}
+ Sleep 30s
+ END
+ ${expected_string}= Get File ${TEST_ROBOT_DIR}/data/expected_payload_pm1.json
+ ${expected_payload}= Evaluate json.loads("""${expected_string}""") json
+ ${result}= Convert To String ${result.content}
+ ${result_string}= Get Substring ${result} 2 -2
+ ${actual_data}= Evaluate json.loads("""${result_string}""") json
+ ${actual_payload_str}= Set Variable ${actual_data['payload']}
+ ${actual_payload}= Evaluate json.loads("""${actual_payload_str}""") json
+ set to dictionary ${expected_payload['additionalProperties']['nsiInfo']} nsiId=${actual_payload['additionalProperties']['nsiInfo']['nsiId']}
+ Should Be True """${actual_payload}""".strip() == """${expected_payload}""".strip()
+
+
+
+Post pm notification-2 to dmaap
+ ${data}= Get File ${TEST_ROBOT_DIR}/data/performance_notification3.json
+ ${data1}= Get File ${TEST_ROBOT_DIR}/data/performance_notification4.json
+ ${data2}= Get File ${TEST_ROBOT_DIR}/data/performance_notification5.json
+ ${data3}= Get File ${TEST_ROBOT_DIR}/data/performance_notification6.json
+ ${data4}= Get File ${TEST_ROBOT_DIR}/data/performance_notification7.json
+ ${data5}= Get File ${TEST_ROBOT_DIR}/data/performance_notification8.json
+ FOR ${i} IN RANGE 6
+ ${response}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data)
+ ${response1}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data1)
+ ${response2}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data2)
+ ${response3}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data3)
+ ${response4}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data4)
+ ${response5}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data5)
+ END
+ Should Be Equal As Strings ${response.status_code} 200
+ Should Be Equal As Strings ${response1.status_code} 200
+ Should Be Equal As Strings ${response2.status_code} 200
+ Should Be Equal As Strings ${response3.status_code} 200
+ Should Be Equal As Strings ${response4.status_code} 200
+ Should Be Equal As Strings ${response5.status_code} 200
+
+
+Verify pm notification-2 trigger
+ Create Session dmaap ${DMAAP_URL}
+ FOR ${i} IN RANGE 20
+ ${result}= Get Request dmaap ${unauthenticated.DCAE_CL_OUTPUT}
+ Exit For Loop If ${result.json()} != @{EMPTY}
+ Log Waiting for sliceanalysisms to handle trigger... console=${True}
+ Sleep 30s
+ END
+ ${expected_string}= Get File ${TEST_ROBOT_DIR}/data/expected_payload_pm2.json
+ ${expected_payload}= Evaluate json.loads("""${expected_string}""") json
+ ${result}= Convert To String ${result.content}
+ ${result_string}= Get Substring ${result} 2 -2
+ ${actual_data}= Evaluate json.loads("""${result_string}""") json
+ ${actual_payload_str}= Set Variable ${actual_data['payload']}
+ ${actual_payload}= Evaluate json.loads("""${actual_payload_str}""") json
+ set to dictionary ${expected_payload['additionalProperties']['nsiInfo']} nsiId=${actual_payload['additionalProperties']['nsiInfo']['nsiId']}
+ Should Be True """${actual_payload}""".strip() == """${expected_payload}""".strip()