Merge "Add temporary kill script for SDC DCAE containers"
authorGary Wu <gwu@futurewei.com>
Thu, 30 May 2019 14:11:40 +0000 (14:11 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 30 May 2019 14:11:40 +0000 (14:11 +0000)
65 files changed:
plans/dcaegen2/prh-testsuites/setup.sh
plans/dcaegen2/prh-testsuites/teardown.sh
plans/policy/xacml-pdp/setup.sh
plans/policy/xacml-pdp/teardown.sh
plans/vfc-nfvo-catalog/sanity-check/setup.sh
plans/vfc-nfvo-catalog/sanity-check/teardown.sh
scripts/policy/policy-xacml-pdp/config/db/db.conf [new file with mode: 0644]
scripts/policy/policy-xacml-pdp/config/db/db.sh [new file with mode: 0644]
scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml [new file with mode: 0644]
scripts/sdc/docker_health.sh
tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json
tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_IPV4_and_IPV6.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_all_filled.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_empty.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_all.json
tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_partial.json
tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json
tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json
tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json
tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-with-attachment-point.json
tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-not-array/invalid-ves-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-pnf-ready-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/expected-pnf-ready-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/expected-pnf-ready-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/expected-pnf-ready-event.json
tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json
tests/dcaegen2/prh-testcases/prh_tests.robot
tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
tests/dcaegen2/prh-testcases/resources/cert_generation/create_certs.sh [new file with mode: 0755]
tests/dcaegen2/prh-testcases/resources/cert_generation/openssl.conf [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/docker-compose.yml
tests/dcaegen2/prh-testcases/resources/prh_library.robot
tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
tests/dcaegen2/prh-testcases/resources/simulator/certs/aai.crt [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/aai.key [moved from tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.aai.key with 100% similarity]
tests/dcaegen2/prh-testcases/resources/simulator/certs/aai_aai.onap.org.cer [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/ca_local_0.cer [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap-mr.crt [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap-mr.key [moved from tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dmaap-bc.key with 100% similarity]
tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap_bc_topic_mgr_dmaap_bc.onap.org.cer [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/keystore.p12 [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.jks [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.trust.jks [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/root.crt [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/truststore.jks [new file with mode: 0644]
tests/dcaegen2/prh-testcases/ssl_prh_tests.robot [deleted file]
tests/externalapi-nbi/healthcheck/healthcheck.robot
tests/policy/xacml-pdp/data/onap.policies.monitoring.cdap.tca.hi.lo.app.json [new file with mode: 0644]
tests/policy/xacml-pdp/data/onap.policy.monitoring.decision.request.json [new file with mode: 0644]
tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.deploy.json [new file with mode: 0644]
tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json [new file with mode: 0644]
tests/policy/xacml-pdp/xacml-pdp-test.robot

index 46871fd..28882c8 100644 (file)
@@ -3,7 +3,6 @@
 source ${SCRIPTS}/common_functions.sh
 
 export PRH_SERVICE="prh"
-export SSL_PRH_SERVICE="ssl_prh"
 export DMAAP_SIMULATOR="dmaap_simulator"
 export AAI_SIMULATOR="aai_simulator"
 export CONSUL="consul"
@@ -23,7 +22,6 @@ docker-compose up -d --build
 
 # Extract docker images IPs
 PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE})
-SSL_PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${SSL_PRH_SERVICE})
 DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR})
 AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR})
 CONSUL_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CONSUL})
@@ -31,7 +29,6 @@ CONSUL_CONFIG_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{
 CBS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CBS})
 
 bypass_ip_adress ${PRH_IP}
-bypass_ip_adress ${SSL_PRH_IP}
 bypass_ip_adress ${DMAAP_SIMULATOR_IP}
 bypass_ip_adress ${AAI_SIMULATOR_IP}
 bypass_ip_adress ${CONSUL_IP}
@@ -39,7 +36,6 @@ bypass_ip_adress ${CONSUL_CONFIG_IP}
 bypass_ip_adress ${CBS_IP}
 
 echo PRH_IP=${PRH_IP}
-echo SSL_PRH_IP=${SSL_PRH_IP}
 echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP}
 echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP}
 echo CONSUL_IP=${CONSUL_IP}
@@ -48,7 +44,6 @@ echo CBS_IP=${CBS_IP}
 
 # Wait for initialization of PRH services
 wait_for_service_init localhost:8100/heartbeat
-wait_for_service_init localhost:8200/heartbeat
 
 # #Pass any variables required by Robot test suites in ROBOT_VARIABLES
 ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335 -v CONSUL_SETUP:${CONSUL_IP}:8500"
\ No newline at end of file
index bb5f8f9..382b22e 100644 (file)
@@ -16,7 +16,6 @@
 #
 
 kill-instance.sh prh
-kill-instance.sh ssl_prh
 kill-instance.sh dmaap_simulator
 kill-instance.sh aai_simulator
 kill-instance.sh consul
index e788282..96ae471 100644 (file)
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-docker run -d --name policy-xacml-pdp -p 6969:6969 -it nexus3.onap.org:10001/onap/policy-xacml-pdp:2.0.0-SNAPSHOT-latest 
-docker ps -a
-sleep 5
+echo "Uninstall docker-py and reinstall docker."
+pip uninstall -y docker-py
+pip uninstall -y docker
+pip install -U docker==2.7.0
+
+# the directory of the script
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+echo ${DIR}
+
+# the temp directory used, within $DIR
+# omit the -p parameter to create a temporal directory in the default location
+WORK_DIR=`mktemp -d -p "$DIR"`
+echo ${WORK_DIR}
+
+cd ${WORK_DIR}
+
+# check if tmp dir was created
+if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
+    echo "Could not create temp dir"
+    exit 1
+fi
+
+# bring down maven
+mkdir maven
+cd maven
+curl -O http://apache.claz.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
+tar -xzvf apache-maven-3.3.9-bin.tar.gz
+ls -l
+export PATH=${PATH}:${WORK_DIR}/maven/apache-maven-3.3.9/bin
+${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn -v
+cd ..
+
+git clone http://gerrit.onap.org/r/oparent
+git clone --depth 1 https://gerrit.onap.org/r/policy/models -b master
+cd models/models-sim/models-sim-dmaap
+${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests  --settings ${WORK_DIR}/oparent/settings.xml
+bash ./src/main/package/docker/docker_build.sh
+cd ${WORKSPACE}
+rm -rf ${WORK_DIR}
+sleep 3
+
+# Adding this waiting container due to race condition between pap and mariadb
+docker-compose -f ${WORKSPACE}/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml run --rm start_dependencies
+docker-compose -f ${WORKSPACE}/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml up -d
+
+unset http_proxy https_proxy
+
+POLICY_API_IP=`get-instance-ip.sh policy-api`
+MARIADB_IP=`get-instance-ip.sh mariadb`
 POLICY_PDPX_IP=`get-instance-ip.sh policy-xacml-pdp`
-echo PDP-X IP IS ${POLICY_PDPX_IP}
+DMAAP_IP=`get-instance-ip.sh dmaap-simulator`
+POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
+
+
+echo PDP IP IS ${POLICY_PDPX_IP}
+echo API IP IS ${POLICY_API_IP}
+echo PAP IP IS ${POLICY_PAP_IP}
+echo MARIADB IP IS ${MARIADB_IP}
+echo DMAAP_IP IS ${DMAAP_IP}
+
 # Wait for initialization
+for i in {1..10}; do
+   curl -sS ${MARIADB_IP}:3306 && break
+   echo sleep $i
+   sleep $i
+done
 for i in {1..10}; do
    curl -sS ${POLICY_PDPX_IP}:6969 && break
    echo sleep $i
    sleep $i
 done
+for i in {1..10}; do
+   curl -sS ${DMAAP_IP}:3904 && break
+   echo sleep $i
+   sleep $i
+done
+
+#Configure the database
+docker exec -it mariadb  chmod +x /docker-entrypoint-initdb.d/db.sh
+docker exec -it mariadb  /docker-entrypoint-initdb.d/db.sh
 
-ROBOT_VARIABLES="-v POLICY_PDPX_IP:${POLICY_PDPX_IP}"
+ROBOT_VARIABLES="-v POLICY_PDPX_IP:${POLICY_PDPX_IP} -v POLICY_API_IP:${POLICY_API_IP} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
index a81ee6b..270d6cc 100644 (file)
@@ -18,3 +18,7 @@
 # ============LICENSE_END=========================================================
 
 kill-instance.sh policy-xacml-pdp
+kill-instance.sh policy-pap
+kill-instance.sh policy-api
+kill-instance.sh mariadb
+kill-instance.sh dmaap-simulator
index 344214f..94f21e1 100644 (file)
@@ -72,5 +72,7 @@ cat config.py
 docker cp vfc-catalog:/service/vfc/nfvo/catalog/logs/runtime_catalog.log ./
 cat runtime_catalog.log
 
+docker logs vfc-catalog
+
 # Pass any variables required by Robot test suites in ROBOT_VARIABLES
 ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v CATALOG_IP:${CATALOG_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP} -v SCRIPTS:${SCRIPTS}"
index cfccb3f..c328f5e 100644 (file)
@@ -16,6 +16,7 @@
 #
 
 # print log file for catalog
+docker logs vfc-catalog
 docker cp vfc-catalog:/service/vfc/nfvo/catalog/logs/runtime_catalog.log ./
 cat runtime_catalog.log
 
diff --git a/scripts/policy/policy-xacml-pdp/config/db/db.conf b/scripts/policy/policy-xacml-pdp/config/db/db.conf
new file mode 100644 (file)
index 0000000..b444911
--- /dev/null
@@ -0,0 +1,20 @@
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+MYSQL_ROOT_PASSWORD=secret
+MYSQL_USER=policy_user
+MYSQL_PASSWORD=policy_user
\ No newline at end of file
diff --git a/scripts/policy/policy-xacml-pdp/config/db/db.sh b/scripts/policy/policy-xacml-pdp/config/db/db.sh
new file mode 100644 (file)
index 0000000..ac150a0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash -xv
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+for db in policyadmin
+do
+     mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
+     mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
+done
+
+mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
\ No newline at end of file
diff --git a/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml b/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml
new file mode 100644 (file)
index 0000000..62e0ce2
--- /dev/null
@@ -0,0 +1,72 @@
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+version: '2'
+networks:
+  default:
+    driver: bridge
+services:
+   mariadb:
+      image: mariadb:10.2.14
+      container_name: mariadb
+      hostname: mariadb
+      command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+      env_file: config/db/db.conf
+      volumes:
+         - ./config/db:/docker-entrypoint-initdb.d
+      ports:
+       - "3306:3306"
+   message-router:
+      image: dmaap/simulator
+      container_name: dmaap-simulator
+      hostname: dmaap-simulator
+      ports:
+       - "3904:3904"
+   pap:
+      image: nexus3.onap.org:10001/onap/policy-pap:2.0.0-SNAPSHOT-latest
+      container_name: policy-pap
+      depends_on:
+       - mariadb
+       - message-router
+      hostname: policy-pap
+   api:
+      image: nexus3.onap.org:10001/onap/policy-api
+      container_name: policy-api
+      depends_on:
+       - mariadb
+      hostname: policy-api
+   xacml-pdp:
+      image: nexus3.onap.org:10001/onap/policy-xacml-pdp:2.0.0-SNAPSHOT-latest 
+      container_name: policy-xacml-pdp
+      depends_on:
+       - mariadb
+       - message-router
+       - pap
+       - api
+      hostname: policy-xacml-pdp
+      ports:
+       - "6969:6969"
+   start_dependencies:
+      image: dadarek/wait-for-dependencies
+      container_name: policy-wait
+      depends_on:
+        - mariadb
+        - message-router
+      hostname: policy-wait
+      command:
+        - mariadb:3306
+        - message-router:3904
index 4264b1a..30efd39 100644 (file)
@@ -2,22 +2,21 @@
 
 curl localhost:9200/_cluster/health?pretty=true
 
-echo "BE health-Check:"
+echo "BE Health Check:"
 curl http://localhost:8080/sdc2/rest/healthCheck
 
 echo ""
 echo ""
-echo "FE health-Check:"
+echo "FE Health Check:"
 curl http://localhost:8181/sdc1/rest/healthCheck
 
-
 echo ""
 echo ""
 http_code=$(curl -o out.html -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" http://localhost:8080/sdc2/rest/v1/user/demo;)
 if [[ ${http_code} != 200 ]]
 then
-    echo "Error [${http_code}] while user existance check"
+    echo "Error [${http_code}] while checking existence of user"
     return ${http_code}
 fi
-echo "check user existance: OK"
+echo "Check user existence: OK"
 
index d8f3c90..10ce41c 100644 (file)
@@ -1,37 +1,39 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "startEpochMicrosec": 1540212137393,
-      "sourceId": "val13",
-      "eventId": "registration_40212137",
-      "nfcNamingCode": "oam",
-      "internalHeaderFields": {
-        "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "startEpochMicrosec": 1540212137393,
+        "sourceId": "val13",
+        "eventId": "registration_40212137",
+        "nfcNamingCode": "oam",
+        "internalHeaderFields": {
+          "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+        },
+        "eventType": "pnfRegistration",
+        "priority": "Normal",
+        "version": "4.0.1",
+        "reportingEntityName": "NOK6061ZW8",
+        "sequence": 0,
+        "domain": "pnfRegistration",
+        "lastEpochMicrosec": 1540212137393,
+        "eventName": "pnfRegistration_Nokia_5gDu",
+        "vesEventListenerVersion": "7.0.1",
+        "sourceName": "NOK6061ZW8",
+        "nfNamingCode": "gNB"
       },
-      "eventType": "pnfRegistration",
-      "priority": "Normal",
-      "version": "4.0.1",
-      "reportingEntityName": "NOK6061ZW8",
-      "sequence": 0,
-      "domain": "pnfRegistration",
-      "lastEpochMicrosec": 1540212137393,
-      "eventName": "pnfRegistration_Nokia_5gDu",
-      "vesEventListenerVersion": "7.0.1",
-      "sourceName": "NOK6061ZW8",
-      "nfNamingCode": "gNB"
-    },
-    "pnfRegistrationFields": {
-      "unitType": "val8",
-      "serialNumber": "6061ZW9",
-      "pnfRegistrationFieldsVersion": "2.0",
-      "manufactureDate": "1540212137393",
-      "modelNumber": "val6",
-      "lastServiceDate": "1540212137393",
-      "unitFamily": "BBU",
-      "vendorName": "Nokia",
-      "oamV4IpAddress": "val3",
-      "oamV6IpAddress": "val4",
-      "softwareVersion": "val7"
+      "pnfRegistrationFields": {
+        "unitType": "val8",
+        "serialNumber": "6061ZW9",
+        "pnfRegistrationFieldsVersion": "2.0",
+        "manufactureDate": "1540212137393",
+        "modelNumber": "val6",
+        "lastServiceDate": "1540212137393",
+        "unitFamily": "BBU",
+        "vendorName": "Nokia",
+        "oamV4IpAddress": "val3",
+        "oamV6IpAddress": "val4",
+        "softwareVersion": "val7"
+      }
     }
   }
-}
+]
\ No newline at end of file
index d8f3c90..10ce41c 100644 (file)
@@ -1,37 +1,39 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "startEpochMicrosec": 1540212137393,
-      "sourceId": "val13",
-      "eventId": "registration_40212137",
-      "nfcNamingCode": "oam",
-      "internalHeaderFields": {
-        "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "startEpochMicrosec": 1540212137393,
+        "sourceId": "val13",
+        "eventId": "registration_40212137",
+        "nfcNamingCode": "oam",
+        "internalHeaderFields": {
+          "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+        },
+        "eventType": "pnfRegistration",
+        "priority": "Normal",
+        "version": "4.0.1",
+        "reportingEntityName": "NOK6061ZW8",
+        "sequence": 0,
+        "domain": "pnfRegistration",
+        "lastEpochMicrosec": 1540212137393,
+        "eventName": "pnfRegistration_Nokia_5gDu",
+        "vesEventListenerVersion": "7.0.1",
+        "sourceName": "NOK6061ZW8",
+        "nfNamingCode": "gNB"
       },
-      "eventType": "pnfRegistration",
-      "priority": "Normal",
-      "version": "4.0.1",
-      "reportingEntityName": "NOK6061ZW8",
-      "sequence": 0,
-      "domain": "pnfRegistration",
-      "lastEpochMicrosec": 1540212137393,
-      "eventName": "pnfRegistration_Nokia_5gDu",
-      "vesEventListenerVersion": "7.0.1",
-      "sourceName": "NOK6061ZW8",
-      "nfNamingCode": "gNB"
-    },
-    "pnfRegistrationFields": {
-      "unitType": "val8",
-      "serialNumber": "6061ZW9",
-      "pnfRegistrationFieldsVersion": "2.0",
-      "manufactureDate": "1540212137393",
-      "modelNumber": "val6",
-      "lastServiceDate": "1540212137393",
-      "unitFamily": "BBU",
-      "vendorName": "Nokia",
-      "oamV4IpAddress": "val3",
-      "oamV6IpAddress": "val4",
-      "softwareVersion": "val7"
+      "pnfRegistrationFields": {
+        "unitType": "val8",
+        "serialNumber": "6061ZW9",
+        "pnfRegistrationFieldsVersion": "2.0",
+        "manufactureDate": "1540212137393",
+        "modelNumber": "val6",
+        "lastServiceDate": "1540212137393",
+        "unitFamily": "BBU",
+        "vendorName": "Nokia",
+        "oamV4IpAddress": "val3",
+        "oamV6IpAddress": "val4",
+        "softwareVersion": "val7"
+      }
     }
   }
-}
+]
\ No newline at end of file
index ac7c309..75a73fa 100644 (file)
@@ -1,15 +1,17 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW2"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.17.123.234",
-      "oamV6IpAddress":"",
-      "serialNumber":"NOkkaaa123",
-      "vendorName":"equipVendor",
-      "modelNumber":"equipModel",
-      "unitType":"equipType"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW2"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.17.123.234",
+        "oamV6IpAddress": "",
+        "serialNumber": "NOkkaaa123",
+        "vendorName": "equipVendor",
+        "modelNumber": "equipModel",
+        "unitType": "equipType"
+      }
     }
   }
-}
+]
\ No newline at end of file
index 7fdef4f..ae43bd6 100644 (file)
@@ -1,16 +1,18 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"ERI6061ZW3"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"",
-      "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8b2e:0370:7334",
-      "serialNumber":"NOkkaaa123",
-      "vendorName":"equipVendor",
-      "modelNumber":"equipModel",
-      "unitType":"equipType",
-      "additionalFields": {}
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "ERI6061ZW3"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "",
+        "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8b2e:0370:7334",
+        "serialNumber": "NOkkaaa123",
+        "vendorName": "equipVendor",
+        "modelNumber": "equipModel",
+        "unitType": "equipType",
+        "additionalFields": {}
+      }
     }
   }
-}
+]
\ No newline at end of file
index eb4dfaf..13c564c 100644 (file)
@@ -1,21 +1,23 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW1",
-      "nfNamingCode": "nfNamingCode"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.16.123.234",
-      "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334",
-      "serialNumber":"serialNumber",
-      "vendorName":"vendorName",
-      "modelNumber":"modelNumber",
-      "unitType":"unitType",
-      "additionalFields": {
-        "attachmentPoint": "bla-bla-30-3",
-        "svlan": "1005",
-        "cvlan": "678"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW1",
+        "nfNamingCode": "nfNamingCode"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.16.123.234",
+        "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
+        "serialNumber": "serialNumber",
+        "vendorName": "vendorName",
+        "modelNumber": "modelNumber",
+        "unitType": "unitType",
+        "additionalFields": {
+          "attachmentPoint": "bla-bla-30-3",
+          "svlan": "1005",
+          "cvlan": "678"
+        }
       }
     }
   }
-}
+]
\ No newline at end of file
index 6a14bfd..7ac9bf1 100644 (file)
@@ -1,15 +1,17 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW4"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"",
-      "oamV6IpAddress":"",
-      "serialNumber":"",
-      "vendorName":"",
-      "modelNumber":"",
-      "unitType":""
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW4"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "",
+        "oamV6IpAddress": "",
+        "serialNumber": "",
+        "vendorName": "",
+        "modelNumber": "",
+        "unitType": ""
+      }
     }
   }
-}
+]
\ No newline at end of file
index 2bae7e6..88e2536 100644 (file)
@@ -1,16 +1,18 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":""
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.18.123.234",
-      "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2a:0370:7334",
-      "serialNumber":"",
-      "vendorName":"",
-      "modelNumber":"",
-      "unitType":"",
-      "additionalFields": {}
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": ""
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.18.123.234",
+        "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2a:0370:7334",
+        "serialNumber": "",
+        "vendorName": "",
+        "modelNumber": "",
+        "unitType": "",
+        "additionalFields": {}
+      }
     }
   }
-}
+]
\ No newline at end of file
index de1f576..04d5b3d 100644 (file)
@@ -1,11 +1,13 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":""
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"",
-      "oamV6IpAddress":""
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": ""
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "",
+        "oamV6IpAddress": ""
+      }
     }
   }
-}
+]
\ No newline at end of file
index 4838f1b..3b6b7ad 100644 (file)
@@ -1,11 +1,13 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":""
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"",
-      "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8b2f:0370:7334"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": ""
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "",
+        "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8b2f:0370:7334"
+      }
     }
   }
-}
+]
\ No newline at end of file
index 253869a..c81c5a7 100644 (file)
@@ -1,12 +1,13 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":""
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.17.163.234",
-      "oamV6IpAddress":""
-
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": ""
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.17.163.234",
+        "oamV6IpAddress": ""
+      }
     }
   }
-}
+]
\ No newline at end of file
index 39fadb8..9be02f1 100644 (file)
@@ -1,22 +1,24 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW4",
-      "nfNamingCode": "nfNamingCode",
-      "nfcNamingCode": "nfcNamingCode"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"ipv4",
-      "oamV6IpAddress":"",
-      "serialNumber":"sn1234",
-      "vendorName":"vendorName",
-      "modelNumber":"modelNumber",
-      "unitType":"unitType",
-      "additionalFields": {
-        "attachmentPoint": "bla-bla-30-3",
-        "svlan": "1005",
-        "cvlan": "678"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW4",
+        "nfNamingCode": "nfNamingCode",
+        "nfcNamingCode": "nfcNamingCode"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "ipv4",
+        "oamV6IpAddress": "",
+        "serialNumber": "sn1234",
+        "vendorName": "vendorName",
+        "modelNumber": "modelNumber",
+        "unitType": "unitType",
+        "additionalFields": {
+          "attachmentPoint": "bla-bla-30-3",
+          "svlan": "1005",
+          "cvlan": "678"
+        }
       }
     }
   }
-}
+]
\ No newline at end of file
index 986b992..a80a70a 100644 (file)
@@ -1,17 +1,19 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW3",
-      "nfNamingCode": ""
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.16.123.234",
-      "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334",
-      "serialNumber":"",
-      "vendorName":"",
-      "modelNumber":"",
-      "unitType":"",
-      "additionalFields": {}
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW3",
+        "nfNamingCode": ""
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.16.123.234",
+        "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
+        "serialNumber": "",
+        "vendorName": "",
+        "modelNumber": "",
+        "unitType": "",
+        "additionalFields": {}
+      }
     }
   }
-}
+]
\ No newline at end of file
index 16963e1..9acbeb3 100644 (file)
@@ -1,11 +1,13 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW1"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.16.123.234",
-      "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW1"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.16.123.234",
+        "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
+      }
     }
   }
-}
+]
\ No newline at end of file
index c10f0d6..6c0666c 100644 (file)
@@ -1,14 +1,16 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW4"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.16.123.234",
-      "oamV6IpAddress":"",
-      "serialNumber":"123",
-      "modelNumber":"sn123243",
-      "unitType": "unitType"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW4"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.16.123.234",
+        "oamV6IpAddress": "",
+        "serialNumber": "123",
+        "modelNumber": "sn123243",
+        "unitType": "unitType"
+      }
     }
   }
-}
+]
\ No newline at end of file
index 02f0137..a053f7a 100644 (file)
@@ -1,14 +1,16 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW9"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.17.123.24",
-      "serialNumber":"NOkkaaa123",
-      "vendorName":"equipVendor",
-      "modelNumber":"equipModel",
-      "unitType":"equipType"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW9"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.17.123.24",
+        "serialNumber": "NOkkaaa123",
+        "vendorName": "equipVendor",
+        "modelNumber": "equipModel",
+        "unitType": "equipType"
+      }
     }
   }
-}
+]
\ No newline at end of file
index f6afb1d..87afc51 100644 (file)
@@ -1,15 +1,17 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW1"
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress":"10.16.123.234",
-      "oamV6IpAddress":"2001:0db8:85a3:0000:0000:8a2e:0370:7334",
-      "serialNumber":"NOkkaaa123",
-      "vendorName":"equipVendor",
-      "modelNumber":"equipModel",
-      "unitType":"equipType",
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW1"
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.16.123.234",
+        "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
+        "serialNumber": "NOkkaaa123",
+        "vendorName": "equipVendor",
+        "modelNumber": "equipModel",
+        "unitType": "equipType",
+      }
     }
   }
-}
+]
\ No newline at end of file
index c308967..02a84e6 100644 (file)
@@ -1,14 +1,16 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW1",
-      "nfNamingCode": "nfNamingCode"
-    },
-    "pnfRegistrationFields": {
-      "serialNumber":"serialNumber",
-      "vendorName":"vendorName",
-      "modelNumber":"modelNumber",
-      "unitType":"unitType"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW1",
+        "nfNamingCode": "nfNamingCode"
+      },
+      "pnfRegistrationFields": {
+        "serialNumber": "serialNumber",
+        "vendorName": "vendorName",
+        "modelNumber": "modelNumber",
+        "unitType": "unitType"
+      }
     }
   }
-}
\ No newline at end of file
+]
\ No newline at end of file
index 9d730bf..054774c 100644 (file)
@@ -1,19 +1,21 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName":"NOK6061ZW1",
-      "nfNamingCode": "nfNamingCode"
-    },
-    "pnfRegistrationFields": {
-      "serialNumber":"serialNumber",
-      "vendorName":"vendorName",
-      "modelNumber":"modelNumber",
-      "unitType":"unitType",
-      "additionalFields": {
-        "attachmentPoint": "bla-bla-30-3",
-        "svlan": "1005",
-        "cvlan": "678"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": "NOK6061ZW1",
+        "nfNamingCode": "nfNamingCode"
+      },
+      "pnfRegistrationFields": {
+        "serialNumber": "serialNumber",
+        "vendorName": "vendorName",
+        "modelNumber": "modelNumber",
+        "unitType": "unitType",
+        "additionalFields": {
+          "attachmentPoint": "bla-bla-30-3",
+          "svlan": "1005",
+          "cvlan": "678"
+        }
       }
     }
   }
-}
\ No newline at end of file
+]
\ No newline at end of file
index 52024d6..2bdc057 100644 (file)
@@ -1,16 +1,18 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "sourceName": ""
-    },
-    "pnfRegistrationFields": {
-      "oamV4IpAddress": "10.18.123.236",
-      "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2a:0370:7334",
-      "serialNumber": "",
-      "vendorName": "",
-      "modelNumber": "",
-      "unitType": "",
-      "additionalFields": {}
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "sourceName": ""
+      },
+      "pnfRegistrationFields": {
+        "oamV4IpAddress": "10.18.123.236",
+        "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2a:0370:7334",
+        "serialNumber": "",
+        "vendorName": "",
+        "modelNumber": "",
+        "unitType": "",
+        "additionalFields": {}
+      }
     }
   }
-}
+]
\ No newline at end of file
index f6afb1d..cc6502f 100644 (file)
@@ -9,7 +9,7 @@
       "serialNumber":"NOkkaaa123",
       "vendorName":"equipVendor",
       "modelNumber":"equipModel",
-      "unitType":"equipType",
+      "unitType":"equipType"
     }
   }
 }
index 9da0201..0ccc1df 100644 (file)
@@ -1,6 +1,8 @@
-{
-  "additionalFields": {
-    "attachmentPoint": "bbs-link"
-  },
-  "correlationId": "NOK6061ZW9"
-}
+[
+  {
+    "additionalFields": {
+      "attachmentPoint": "bbs-link"
+    },
+    "correlationId": "NOK6061ZW9"
+  }
+]
\ No newline at end of file
index c67d863..9f02498 100644 (file)
@@ -1,40 +1,42 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "startEpochMicrosec": 1540212137393,
-      "sourceId": "val13",
-      "eventId": "registration_40212137",
-      "nfcNamingCode": "oam",
-      "internalHeaderFields": {
-        "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "startEpochMicrosec": 1540212137393,
+        "sourceId": "val13",
+        "eventId": "registration_40212137",
+        "nfcNamingCode": "oam",
+        "internalHeaderFields": {
+          "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+        },
+        "eventType": "pnfRegistration",
+        "priority": "Normal",
+        "version": "4.0.1",
+        "reportingEntityName": "NOK6061ZW9",
+        "sequence": 0,
+        "domain": "pnfRegistration",
+        "lastEpochMicrosec": 1540212137393,
+        "eventName": "pnfRegistration_Nokia_5gDu",
+        "vesEventListenerVersion": "7.0.1",
+        "sourceName": "NOK6061ZW9",
+        "nfNamingCode": "gNB"
       },
-      "eventType": "pnfRegistration",
-      "priority": "Normal",
-      "version": "4.0.1",
-      "reportingEntityName": "NOK6061ZW9",
-      "sequence": 0,
-      "domain": "pnfRegistration",
-      "lastEpochMicrosec": 1540212137393,
-      "eventName": "pnfRegistration_Nokia_5gDu",
-      "vesEventListenerVersion": "7.0.1",
-      "sourceName": "NOK6061ZW9",
-      "nfNamingCode": "gNB"
-    },
-    "pnfRegistrationFields": {
-      "unitType": "val8",
-      "serialNumber": "6061ZW9",
-      "pnfRegistrationFieldsVersion": "2.0",
-      "manufactureDate": "1540212137393",
-      "modelNumber": "val6",
-      "lastServiceDate": "1540212137393",
-      "unitFamily": "BBU",
-      "vendorName": "Nokia",
-      "oamV4IpAddress": "val3",
-      "oamV6IpAddress": "val4",
-      "softwareVersion": "val7",
-      "additionalFields": {
-        "attachmentPoint": "bbs-link"
+      "pnfRegistrationFields": {
+        "unitType": "val8",
+        "serialNumber": "6061ZW9",
+        "pnfRegistrationFieldsVersion": "2.0",
+        "manufactureDate": "1540212137393",
+        "modelNumber": "val6",
+        "lastServiceDate": "1540212137393",
+        "unitFamily": "BBU",
+        "vendorName": "Nokia",
+        "oamV4IpAddress": "val3",
+        "oamV6IpAddress": "val4",
+        "softwareVersion": "val7",
+        "additionalFields": {
+          "attachmentPoint": "bbs-link"
+        }
       }
     }
   }
-}
+]
index 8fbfff3..b7e5af5 100644 (file)
@@ -1,39 +1,41 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "startEpochMicrosec": 1540212137393,
-      "sourceId": "val13",
-      "eventId": "registration_40212137",
-      "nfcNamingCode": "oam",
-      "internalHeaderFields": {
-        "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "startEpochMicrosec": 1540212137393,
+        "sourceId": "val13",
+        "eventId": "registration_40212137",
+        "nfcNamingCode": "oam",
+        "internalHeaderFields": {
+          "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+        },
+        "eventType": "pnfRegistration",
+        "priority": "Normal",
+        "version": "4.0.1",
+        "reportingEntityName": "NOK6061ZW8",
+        "sequence": 0,
+        "domain": "pnfRegistration",
+        "lastEpochMicrosec": 1540212137393,
+        "eventName": "pnfRegistration_Nokia_5gDu",
+        "vesEventListenerVersion": "7.0.1",
+        "sourceName": "NOK6061ZW8",
+        "nfNamingCode": "gNB"
       },
-      "eventType": "pnfRegistration",
-      "priority": "Normal",
-      "version": "4.0.1",
-      "reportingEntityName": "NOK6061ZW8",
-      "sequence": 0,
-      "domain": "pnfRegistration",
-      "lastEpochMicrosec": 1540212137393,
-      "eventName": "pnfRegistration_Nokia_5gDu",
-      "vesEventListenerVersion": "7.0.1",
-      "sourceName": "NOK6061ZW8",
-      "nfNamingCode": "gNB"
-    },
-    "pnfRegistrationFields": {
-      "unitType": "val8",
-      "serialNumber": "6061ZW9",
-      "pnfRegistrationFieldsVersion": "2.0",
-      "manufactureDate": "1540212137393",
-      "modelNumber": "val6",
-      "lastServiceDate": "1540212137393",
-      "unitFamily": "BBU",
-      "vendorName": "Nokia",
-      "oamV4IpAddress": "val3",
-      "oamV6IpAddress": "val4",
-      "softwareVersion": "val7",
-      "additionalFields": {
+      "pnfRegistrationFields": {
+        "unitType": "val8",
+        "serialNumber": "6061ZW9",
+        "pnfRegistrationFieldsVersion": "2.0",
+        "manufactureDate": "1540212137393",
+        "modelNumber": "val6",
+        "lastServiceDate": "1540212137393",
+        "unitFamily": "BBU",
+        "vendorName": "Nokia",
+        "oamV4IpAddress": "val3",
+        "oamV6IpAddress": "val4",
+        "softwareVersion": "val7",
+        "additionalFields": {
+        }
       }
     }
   }
-}
+]
\ No newline at end of file
index 75cb4a2..d2cf954 100644 (file)
@@ -1,6 +1,8 @@
-{
-  "additionalFields": {
-    "attachmentPoint": ""
-  },
-  "correlationId": "NOK6061ZW8"
-}
+[
+  {
+    "additionalFields": {
+      "attachmentPoint": ""
+    },
+    "correlationId": "NOK6061ZW8"
+  }
+]
\ No newline at end of file
index d90869e..c1b6dc2 100644 (file)
@@ -1,40 +1,42 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "startEpochMicrosec": 1540212137393,
-      "sourceId": "val13",
-      "eventId": "registration_40212137",
-      "nfcNamingCode": "oam",
-      "internalHeaderFields": {
-        "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "startEpochMicrosec": 1540212137393,
+        "sourceId": "val13",
+        "eventId": "registration_40212137",
+        "nfcNamingCode": "oam",
+        "internalHeaderFields": {
+          "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+        },
+        "eventType": "pnfRegistration",
+        "priority": "Normal",
+        "version": "4.0.1",
+        "reportingEntityName": "NOK6061ZW8",
+        "sequence": 0,
+        "domain": "pnfRegistration",
+        "lastEpochMicrosec": 1540212137393,
+        "eventName": "pnfRegistration_Nokia_5gDu",
+        "vesEventListenerVersion": "7.0.1",
+        "sourceName": "NOK6061ZW8",
+        "nfNamingCode": "gNB"
       },
-      "eventType": "pnfRegistration",
-      "priority": "Normal",
-      "version": "4.0.1",
-      "reportingEntityName": "NOK6061ZW8",
-      "sequence": 0,
-      "domain": "pnfRegistration",
-      "lastEpochMicrosec": 1540212137393,
-      "eventName": "pnfRegistration_Nokia_5gDu",
-      "vesEventListenerVersion": "7.0.1",
-      "sourceName": "NOK6061ZW8",
-      "nfNamingCode": "gNB"
-    },
-    "pnfRegistrationFields": {
-      "unitType": "val8",
-      "serialNumber": "6061ZW9",
-      "pnfRegistrationFieldsVersion": "2.0",
-      "manufactureDate": "1540212137393",
-      "modelNumber": "val6",
-      "lastServiceDate": "1540212137393",
-      "unitFamily": "BBU",
-      "vendorName": "Nokia",
-      "oamV4IpAddress": "val3",
-      "oamV6IpAddress": "val4",
-      "softwareVersion": "val7",
-      "additionalFields": {
-        "attachmentPoint": ""
+      "pnfRegistrationFields": {
+        "unitType": "val8",
+        "serialNumber": "6061ZW9",
+        "pnfRegistrationFieldsVersion": "2.0",
+        "manufactureDate": "1540212137393",
+        "modelNumber": "val6",
+        "lastServiceDate": "1540212137393",
+        "unitFamily": "BBU",
+        "vendorName": "Nokia",
+        "oamV4IpAddress": "val3",
+        "oamV6IpAddress": "val4",
+        "softwareVersion": "val7",
+        "additionalFields": {
+          "attachmentPoint": ""
+        }
       }
     }
   }
-}
+]
\ No newline at end of file
index d8f3c90..10ce41c 100644 (file)
@@ -1,37 +1,39 @@
-{
-  "event": {
-    "commonEventHeader": {
-      "startEpochMicrosec": 1540212137393,
-      "sourceId": "val13",
-      "eventId": "registration_40212137",
-      "nfcNamingCode": "oam",
-      "internalHeaderFields": {
-        "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+[
+  {
+    "event": {
+      "commonEventHeader": {
+        "startEpochMicrosec": 1540212137393,
+        "sourceId": "val13",
+        "eventId": "registration_40212137",
+        "nfcNamingCode": "oam",
+        "internalHeaderFields": {
+          "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+        },
+        "eventType": "pnfRegistration",
+        "priority": "Normal",
+        "version": "4.0.1",
+        "reportingEntityName": "NOK6061ZW8",
+        "sequence": 0,
+        "domain": "pnfRegistration",
+        "lastEpochMicrosec": 1540212137393,
+        "eventName": "pnfRegistration_Nokia_5gDu",
+        "vesEventListenerVersion": "7.0.1",
+        "sourceName": "NOK6061ZW8",
+        "nfNamingCode": "gNB"
       },
-      "eventType": "pnfRegistration",
-      "priority": "Normal",
-      "version": "4.0.1",
-      "reportingEntityName": "NOK6061ZW8",
-      "sequence": 0,
-      "domain": "pnfRegistration",
-      "lastEpochMicrosec": 1540212137393,
-      "eventName": "pnfRegistration_Nokia_5gDu",
-      "vesEventListenerVersion": "7.0.1",
-      "sourceName": "NOK6061ZW8",
-      "nfNamingCode": "gNB"
-    },
-    "pnfRegistrationFields": {
-      "unitType": "val8",
-      "serialNumber": "6061ZW9",
-      "pnfRegistrationFieldsVersion": "2.0",
-      "manufactureDate": "1540212137393",
-      "modelNumber": "val6",
-      "lastServiceDate": "1540212137393",
-      "unitFamily": "BBU",
-      "vendorName": "Nokia",
-      "oamV4IpAddress": "val3",
-      "oamV6IpAddress": "val4",
-      "softwareVersion": "val7"
+      "pnfRegistrationFields": {
+        "unitType": "val8",
+        "serialNumber": "6061ZW9",
+        "pnfRegistrationFieldsVersion": "2.0",
+        "manufactureDate": "1540212137393",
+        "modelNumber": "val6",
+        "lastServiceDate": "1540212137393",
+        "unitFamily": "BBU",
+        "vendorName": "Nokia",
+        "oamV4IpAddress": "val3",
+        "oamV6IpAddress": "val4",
+        "softwareVersion": "val7"
+      }
     }
   }
-}
+]
\ No newline at end of file
index b4666d1..acaf78f 100644 (file)
@@ -1,9 +1,9 @@
 *** Settings ***
 Documentation     Integration tests for PRH.
 ...               PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event.
-Suite Setup       Run keywords   Create Headers  AND  Create sessions  AND  Ensure Container Is Running  prh  AND  Ensure Container Is Exited  ssl_prh
-Suite Teardown    Ensure Container Is Running  ssl_prh
+Suite Setup       Run keywords   Create Headers  AND  Create sessions
 Test Teardown     Reset Simulators
+Test Timeout      2 minutes
 
 Library           resources/PrhLibrary.py
 Resource          resources/prh_library.robot
@@ -26,7 +26,7 @@ Simple BBS case event
 Simple registration event
     [Documentation]    PRH get from DMaaP valid event without valid attachment point
     [Tags]    PRH    Valid event
-    [Template]    Verify PNF ready sent 
+    [Template]    Verify PNF ready sent
     ${TEST_CASES_DIR}/ves-event-without-additional-fields
     ${TEST_CASES_DIR}/ves-event-with-empty-additional-fields
     ${TEST_CASES_DIR}/ves-event-with-empty-attachment-point
@@ -51,4 +51,4 @@ Should not sent PNF ready when AAI is not responding
     [Documentation]    PRH get from DMaaP valid event but AAI is not responding
     [Tags]    PRH    AAI not responding
     Verify AAI not responding is logged    ${TEST_CASES_DIR}/aai-not-responding
-    
+
index f6439be..88aeb45 100644 (file)
@@ -24,16 +24,16 @@ class PrhLibrary(object):
 
     @staticmethod
     def create_invalid_notification(json_file):
-        json_to_python = json.loads(json_file)
-        correlation_id = PrhLibrary.extract_correlation_id_value(json_to_python, "correlationId")
-        ipv4 = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "oamV4IpAddress", "oamV4IpAddress")
-        ipv6 = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "oamV6IpAddress", "oamV6IpAddress")
-        serial_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "serialNumber", "serialNumber")
-        vendor_name = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "vendorName", "vendorName")
-        model_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "modelNumber", "modelNumber")
-        unit_type = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "unitType", "unitType")
-
-        additional_fields = PrhLibrary.extract_additional_fields(json_to_python)
+        event = json.loads(json_file)[0]
+        correlation_id = PrhLibrary.extract_correlation_id_value(event, "correlationId")
+        ipv4 = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "oamV4IpAddress", "oamV4IpAddress")
+        ipv6 = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "oamV6IpAddress", "oamV6IpAddress")
+        serial_number = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "serialNumber", "serialNumber")
+        vendor_name = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "vendorName", "vendorName")
+        model_number = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "modelNumber", "modelNumber")
+        unit_type = PrhLibrary.extract_value_from_pnfRegistrationFields(event, "unitType", "unitType")
+
+        additional_fields = PrhLibrary.extract_additional_fields(event)
 
         str_json = '{' + correlation_id + ipv4 + ipv6 + serial_number + vendor_name + model_number + unit_type + '"nfNamingCode":""' + "," + '"softwareVersion":"",' + additional_fields
         return json.dumps(str_json).replace("\\", "")[1:-1].replace("\":", "\": ").rstrip(',') + '\\n}'
diff --git a/tests/dcaegen2/prh-testcases/resources/cert_generation/create_certs.sh b/tests/dcaegen2/prh-testcases/resources/cert_generation/create_certs.sh
new file mode 100755 (executable)
index 0000000..a105f1a
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+mkdir -p private certs newcerts
+chmod 700 private
+chmod 755 certs newcerts
+touch index.txt
+echo "unique_subject = no" > index.txt.attr
+echo '01' > serial
+
+openssl genrsa -out root.key 4096
+openssl req -config openssl.conf -key root.key -new -x509 -days 36500 -sha256 -extensions v3_ca -subj /CN=RootCA/OU=OSAAF/O=ONAP/C=US -out root.crt
+
+openssl genrsa -out intermediate.key 4096
+openssl req -new -sha256 -key intermediate.key -out intermediate.csr -outform PEM -subj /CN=intermediate/OU=OSAAF/O=ONAP/C=US
+openssl ca -batch -config openssl.conf -extensions v3_intermediate_ca -days 36500 -cert root.crt -keyfile root.key -out intermediate.crt -infiles intermediate.csr
+
+#openssl genrsa -out aai.key 4096
+cp ../simulator/certs/aai.key aai.key
+openssl req -new -sha256 -key aai.key -out aai.csr -outform PEM -subj /CN=aai/OU=OSAAF/O=ONAP/C=US
+openssl ca -batch -config openssl.conf -days 36500 -cert intermediate.crt -keyfile intermediate.key -out aai.crt -policy policy_loose -infiles aai.csr
+
+
+#openssl genrsa -out dmaap-mr.key 4096
+cp ../simulator/certs/dmaap-mr.key dmaap-mr.key
+openssl req -new -sha256 -key dmaap-mr.key -out dmaap-mr.csr -outform PEM -subj /CN=dmaap-mr/OU=OSAAF/O=ONAP/C=US
+openssl ca -batch -config openssl.conf -days 36500 -cert intermediate.crt -keyfile intermediate.key -out dmaap-mr.crt -policy policy_loose -infiles dmaap-mr.csr
+
+
+openssl genrsa -out prh.key 4096
+openssl req -new -sha256 -key prh.key -out prh.csr -outform PEM -subj /CN=prh/OU=OSAAF/O=ONAP/C=US
+openssl ca -batch -config openssl.conf -extensions server_cert -days 36500 -cert intermediate.crt -keyfile intermediate.key -out prh.crt -policy policy_loose -infiles prh.csr
+
+
+cat prh.crt intermediate.crt >> merged.crt
+
+openssl pkcs12 -export -name prh-cert -in merged.crt -inkey prh.key -passout pass:$(cat ../simulator/certs/keystore.password) -out keystore.p12
+keytool -import -alias intermediate-cert -file intermediate.crt -storepass $(cat ../simulator/certs/truststore.password) -keystore truststore.jks -noprompt
+keytool -import -alias root-cert -file root.crt -storepass $(cat ../simulator/certs/truststore.password) -keystore truststore.jks -noprompt
+
+
+cp aai.crt aai.key dmaap-mr.crt dmaap-mr.key root.crt keystore.p12 truststore.jks ../simulator/certs
\ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/cert_generation/openssl.conf b/tests/dcaegen2/prh-testcases/resources/cert_generation/openssl.conf
new file mode 100644 (file)
index 0000000..4094061
--- /dev/null
@@ -0,0 +1,131 @@
+# OpenSSL root CA configuration file.
+# Copy to `/opt/app/osaaf/CA/openssl.cnf`.
+
+[ ca ]
+# `man ca`
+default_ca = CA_default
+
+[ CA_default ]
+# Directory and file locations.
+dir               = .
+certs             = $dir/certs
+crl_dir           = $dir/crl
+new_certs_dir     = $dir/newcerts
+database          = $dir/index.txt
+serial            = $dir/serial
+RANDFILE          = $dir/private/.rand
+
+# The root key and root certificate.
+private_key       = $dir/private/ca.key
+certificate       = $dir/certs/ca.crt
+
+# For certificate revocation lists.
+crlnumber         = $dir/crlnumber
+crl               = $dir/crl/ca.crl.pem
+crl_extensions    = crl_ext
+default_crl_days  = 30
+
+# SHA-1 is deprecated, so use SHA-2 instead.
+default_md        = sha256
+
+name_opt          = ca_default
+cert_opt          = ca_default
+default_days      = 60
+preserve          = no
+policy            = policy_strict
+
+[ policy_strict ]
+# The root CA should only sign intermediate certificates that match.
+# See the POLICY FORMAT section of `man ca`.
+countryName             = match
+stateOrProvinceName     = optional
+organizationName        = match
+organizationalUnitName  = supplied
+commonName              = supplied
+
+[ policy_loose ]
+# Allow the intermediate CA to sign a more diverse range of certificates.
+# See the POLICY FORMAT section of the `ca` man page.
+countryName             = optional
+stateOrProvinceName     = optional
+localityName            = optional
+organizationName        = optional
+organizationalUnitName  = optional
+commonName              = supplied
+emailAddress            = optional
+
+[ req ]
+# Options for the `req` tool (`man req`).
+default_bits        = 2048
+distinguished_name  = req_distinguished_name
+string_mask         = utf8only
+
+# SHA-1 is deprecated, so use SHA-2 instead.
+default_md          = sha256
+
+# Extension to add when the -x509 option is used.
+x509_extensions     = v3_ca
+
+[ req_distinguished_name ]
+# See <https://en.wikipedia.org/wiki/Certificate_signing_request>.
+countryName                     = Country Name (2 letter code)
+stateOrProvinceName             = State or Province Name
+localityName                    = Locality Name
+0.organizationName              = Organization Name
+organizationalUnitName          = Organizational Unit Name
+commonName                      = Common Name
+emailAddress                    = Email Address
+
+# Optionally, specify some defaults.
+countryName_default             =
+stateOrProvinceName_default     =
+localityName_default            =
+0.organizationName_default      =
+organizationalUnitName_default  =
+emailAddress_default            =
+
+[ v3_ca ]
+# Extensions for a typical CA (`man x509v3_config`).
+subjectKeyIdentifier = hash
+authorityKeyIdentifier = keyid:always,issuer
+basicConstraints = critical, CA:true
+keyUsage = critical, digitalSignature, cRLSign, keyCertSign
+
+[ v3_intermediate_ca ]
+# Extensions for a typical intermediate CA (`man x509v3_config`).
+subjectKeyIdentifier = hash
+authorityKeyIdentifier = keyid:always,issuer
+basicConstraints = critical, CA:true, pathlen:0
+keyUsage = critical, digitalSignature, cRLSign, keyCertSign
+
+[ usr_cert ]
+# Extensions for client certificates (`man x509v3_config`).
+basicConstraints = CA:FALSE
+nsCertType = client, email
+nsComment = "OpenSSL Generated Client Certificate"
+subjectKeyIdentifier = hash
+authorityKeyIdentifier = keyid,issuer
+keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
+extendedKeyUsage = clientAuth, emailProtection
+
+[ server_cert ]
+# Extensions for server certificates (`man x509v3_config`).
+basicConstraints = CA:FALSE
+nsCertType = server, client
+nsComment = "OpenSSL Generated Server Certificate"
+subjectKeyIdentifier = hash
+authorityKeyIdentifier = keyid,issuer:always
+keyUsage = critical, digitalSignature, keyEncipherment, nonRepudiation
+extendedKeyUsage = serverAuth, clientAuth
+
+[ crl_ext ]
+# Extension for CRLs (`man x509v3_config`).
+authorityKeyIdentifier=keyid:always
+
+[ ocsp ]
+# Extension for OCSP signing certificates (`man ocsp`).
+basicConstraints = CA:FALSE
+subjectKeyIdentifier = hash
+authorityKeyIdentifier = keyid,issuer
+keyUsage = critical, digitalSignature
+extendedKeyUsage = critical, OCSPSigning
index 7b208b8..6459ad2 100644 (file)
@@ -5,23 +5,6 @@ services:
     ports:
       - "8100:8100"
       - "8433:8433"
-    environment:
-      - LOG_LEVEL
-      - PRH_LOG_LEVEL
-    container_name: prh
-    depends_on:
-      cbs:
-        condition: service_healthy
-      dmaap-mr:
-        condition: service_started
-      aai:
-        condition: service_started
-
-  ssl_prh:
-    image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest
-    ports:
-      - "8200:8100"
-      - "8533:8433"
     volumes:
       - ./simulator/certs:/tmp/certs
     environment:
@@ -30,7 +13,7 @@ services:
       - HOSTNAME
       - CONSUL_HOST
       - CONFIG_BINDING_SERVICE
-    container_name: ssl_prh
+    container_name: prh
     depends_on:
       cbs:
         condition: service_healthy
@@ -72,11 +55,11 @@ services:
     image: consul:1.0.6
     restart: on-failure
     command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-prh", '{
-                                              "dmaap.dmaapConsumerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT",
+                                              "dmaap.dmaapConsumerConfiguration.dmaapUrl":"https://dmaap-mr:2223/events/unauthenticated.VES_PNFREG_OUTPUT",
                                               "dmaap.dmaapConsumerConfiguration.dmaapHostName":"dmaap-mr",
-                                              "dmaap.dmaapConsumerConfiguration.dmaapPortNumber":2222,
+                                              "dmaap.dmaapConsumerConfiguration.dmaapPortNumber":2223,
                                               "dmaap.dmaapConsumerConfiguration.dmaapTopicName": "events/unauthenticated.VES_PNFREG_OUTPUT",
-                                              "dmaap.dmaapConsumerConfiguration.dmaapProtocol":"http",
+                                              "dmaap.dmaapConsumerConfiguration.dmaapProtocol":"https",
                                               "dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin",
                                               "dmaap.dmaapConsumerConfiguration.dmaapUserPassword":"admin",
                                               "dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json",
@@ -85,20 +68,20 @@ services:
                                               "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
                                               "dmaap.dmaapConsumerConfiguration.messageLimit": -1,
 
-                                              "dmaap.dmaapProducerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.PNF_READY",
+                                              "dmaap.dmaapProducerConfiguration.dmaapUrl":"https://dmaap-mr:2223/events/unauthenticated.PNF_READY",
                                               "dmaap.dmaapProducerConfiguration.dmaapHostName":"dmaap-mr",
-                                              "dmaap.dmaapProducerConfiguration.dmaapPortNumber":2222,
+                                              "dmaap.dmaapProducerConfiguration.dmaapPortNumber":2223,
                                               "dmaap.dmaapProducerConfiguration.dmaapTopicName": "events/unauthenticated.PNF_READY",
-                                              "dmaap.dmaapProducerConfiguration.dmaapProtocol":"http",
+                                              "dmaap.dmaapProducerConfiguration.dmaapProtocol":"https",
                                               "dmaap.dmaapProducerConfiguration.dmaapUserName":"admin",
                                               "dmaap.dmaapProducerConfiguration.dmaapUserPassword":"admin",
                                               "dmaap.dmaapProducerConfiguration.dmaapContentType": "application/json",
 
-                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.PNF_UPDATE",
+                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapUrl":"https://dmaap-mr:2223/events/unauthenticated.PNF_UPDATE",
                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapHostName": "dmaap-mr",
-                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapPortNumber": 2222,
+                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapPortNumber": 2223,
                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapTopicName": "events/unauthenticated.PNF_UPDATE",
-                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapProtocol": "http",
+                                              "dmaap.dmaapUpdateProducerConfiguration.dmaapProtocol": "https",
                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin",
                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin",
                                               "dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json",
@@ -121,24 +104,24 @@ services:
                                                         "Authorization": "Basic QUFJOkFBSQ=="
                                               },
 
-                                              "security.trustStorePath":"change it",
-                                              "security.trustStorePasswordPath":"change it",
-                                              "security.keyStorePath":"change it",
-                                              "security.keyStorePasswordPath":"change it",
-                                              "security.enableAaiCertAuth":false,
-                                              "security.enableDmaapCertAuth":false,
+                                              "security.trustStorePath":"/tmp/certs/truststore.jks",
+                                              "security.trustStorePasswordPath":"/tmp/certs/truststore.password",
+                                              "security.keyStorePath":"/tmp/certs/keystore.p12",
+                                              "security.keyStorePasswordPath":"/tmp/certs/keystore.password",
+                                              "security.enableAaiCertAuth":true,
+                                              "security.enableDmaapCertAuth":true,
 
                                               "streams_publishes":{
                                                 "pnf-update":{
                                                   "type": "message_router",
                                                   "dmaap_info":{
-                                                    "topic_url":"http://dmaap-mr:2222/events/unauthenticated.PNF_UPDATE"
+                                                    "topic_url":"https://dmaap-mr:2223/events/unauthenticated.PNF_UPDATE"
                                                   }
                                                 },
                                                 "pnf-ready":{
                                                   "type": "message_router",
                                                   "dmaap_info":{
-                                                    "topic_url":"http://dmaap-mr:2222/events/unauthenticated.PNF_READY"
+                                                    "topic_url":"https://dmaap-mr:2223/events/unauthenticated.PNF_READY"
                                                   }
                                                 }
                                               },
@@ -146,7 +129,7 @@ services:
                                                 "ves-reg-output":{
                                                   "type": "message_router",
                                                   "dmaap_info":{
-                                                    "topic_url":"http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT"
+                                                    "topic_url":"https://dmaap-mr:2223/events/unauthenticated.VES_PNFREG_OUTPUT"
                                                   }
                                                 }
                                               }
@@ -240,6 +223,3 @@ services:
       timeout: 2s
       retries: 20
     container_name: cbs
-
-
-
index 663f2ea..1fae100 100644 (file)
@@ -13,7 +13,7 @@ Verify PNF ready sent
     Add PNF entry in AAI    ${pnf_entry}
     Set VES event in DMaaP    ${ves_event}
     Wait Until Keyword Succeeds    10x    3000ms    Check CBS ready
-    Wait Until Keyword Succeeds    30x    3000ms    Check recorded PNF_READY notification    ${expected_pnf_ready_event}
+    Wait Until Keyword Succeeds    10x    3000ms    Check recorded PNF_READY notification    ${expected_pnf_ready_event}
 
 Verify PNF ready sent and logical link created
     [Arguments]    ${test_case_directory}
@@ -33,7 +33,7 @@ Verify incorrect JSON event is logged
     [Arguments]    ${test_case_directory}
     ${invalid_ves_event}=    Get Data From File    ${test_case_directory}/invalid-ves-event.json
     Set VES event in DMaaP    ${invalid_ves_event}
-    Wait Until Keyword Succeeds    10x    3000ms    Check PRH log    |Element is neither JSON Object or Array
+    Wait Until Keyword Succeeds    10x    3000ms    Check PRH log    |com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonArray
 
 Verify missing AAI record is logged
     [Timeout]    100s
@@ -96,8 +96,12 @@ Set VES event in DMaaP
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Should Be Equal As JSON
-    [Arguments]    ${given}    ${expected}
-    Should Be True    ${given}==${expected}
+    [Arguments]    ${actual}    ${expected}
+    Log    EXPECTED: ${expected}
+    Log    ACTUAL: ${actual}
+    ${expected_json}=    Evaluate    json.loads("""${expected}""")    json
+    ${actual_json}=    Evaluate    json.loads("""${actual}""")    json
+    Should Be Equal    ${actual_json}    ${expected_json}
 
 Create sessions
     Create Session    dmaap_setup_session    ${DMAAP_SIMULATOR_SETUP_URL}
index 4457ef1..ff36803 100644 (file)
@@ -143,7 +143,7 @@ class AAIHandler(BaseHTTPRequestHandler):
 def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"):
     handler_class.protocol_version = protocol
     httpServerLib.start_http_endpoint(3333, AAIHandler)
-    httpServerLib.start_https_endpoint(3334, AAIHandler, keyfile="certs/org.onap.aai.key", certfile="certs/aai_aai.onap.org.cer", ca_certs="certs/ca_local_0.cer")
+    httpServerLib.start_https_endpoint(3334, AAIHandler, keyfile="certs/aai.key", certfile="certs/aai.crt", ca_certs="certs/root.crt")
     httpServerLib.start_http_endpoint(3335, AAISetup)
     while 1:
         time.sleep(10)
index 92985cb..ce9858d 100644 (file)
@@ -41,7 +41,7 @@ class DmaapSetup(BaseHTTPRequestHandler):
                 global ves_event
                 ves_event = httpServerLib.get_payload(self)
                 httpServerLib.set_response_200_ok(self)
-                logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK')
+                logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK, content: ' + ves_event.decode("utf-8"))
             else:
                 httpServerLib.set_response_404_not_found(self)
                 logger.info('DmaapSetup PUT ' + self.path + ' -> 404 Not found')
@@ -73,7 +73,8 @@ class DMaaPHandler(BaseHTTPRequestHandler):
                 global captured_prh_event
                 captured_prh_event = httpServerLib.get_payload(self)
                 httpServerLib.set_response_200_ok(self)
-                logger.debug('DMaaPHandler POST /events/unauthenticated.PNF_READY -> 200')
+                logger.debug('DMaaPHandler POST /events/unauthenticated.PNF_READY -> 200, content: '
+                             + captured_prh_event.decode("utf-8"))
             else:
                 httpServerLib.set_response_404_not_found(self)
                 logger.info('DMaaPHandler POST ' + self.path + ' -> 404 Not found')
@@ -86,6 +87,9 @@ class DMaaPHandler(BaseHTTPRequestHandler):
             if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDCAE-c12/c12', self.path):
                 global ves_event
                 httpServerLib.set_response_200_ok(self, payload = ves_event)
+                logger.debug(
+                    'DMaaPHandler GET /events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12 -> 200, content: '
+                    + ves_event.decode("utf-8"))
                 ves_event = DMAAP_EMPTY
                 logger.debug('DMaaPHandler GET /events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12 -> 200')
             else:
@@ -98,7 +102,7 @@ class DMaaPHandler(BaseHTTPRequestHandler):
 def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"):
     handler_class.protocol_version = protocol
     httpServerLib.start_http_endpoint(2222, DMaaPHandler)
-    httpServerLib.start_https_endpoint(2223, DMaaPHandler, keyfile="certs/org.onap.dmaap-bc.key", certfile="certs/dmaap_bc_topic_mgr_dmaap_bc.onap.org.cer", ca_certs="certs/ca_local_0.cer")
+    httpServerLib.start_https_endpoint(2223, DMaaPHandler, keyfile="certs/dmaap-mr.key", certfile="certs/dmaap-mr.crt", ca_certs="certs/root.crt")
     httpServerLib.start_http_endpoint(2224, DmaapSetup)
     while 1:
         time.sleep(10)
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/aai.crt b/tests/dcaegen2/prh-testcases/resources/simulator/certs/aai.crt
new file mode 100644 (file)
index 0000000..6de63ad
--- /dev/null
@@ -0,0 +1,87 @@
+Certificate:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 2 (0x2)
+        Signature Algorithm: sha256WithRSAEncryption
+        Issuer: C=US, O=ONAP, OU=OSAAF, CN=intermediate
+        Validity
+            Not Before: May 28 06:34:02 2019 GMT
+            Not After : May  4 06:34:02 2119 GMT
+        Subject: C=US, O=ONAP, OU=OSAAF, CN=aai
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+                RSA Public-Key: (2048 bit)
+                Modulus:
+                    00:82:9f:3d:41:06:47:03:cb:53:3b:dc:03:60:91:
+                    b7:f0:60:03:52:24:f7:67:53:f9:9e:5e:98:07:29:
+                    8b:d7:6b:cc:5b:10:8d:cb:b2:2e:44:9c:1e:e8:f6:
+                    7b:61:64:57:54:e5:d3:d9:44:55:79:b8:91:0e:97:
+                    4a:63:b7:7a:20:98:fa:34:5d:91:98:3b:ef:86:7d:
+                    13:4b:ab:e7:36:61:59:98:8d:32:e0:16:f1:33:e8:
+                    6c:d4:b4:bb:9e:62:3a:e5:d8:92:2d:19:1b:a0:c7:
+                    4c:0d:3d:74:26:68:05:f7:ff:cc:03:ee:73:93:01:
+                    98:e5:9a:e4:96:09:e7:89:bb:91:81:69:7e:1a:6a:
+                    2c:15:38:e3:43:1a:19:99:67:b8:c8:49:31:34:c6:
+                    fb:d4:f7:7e:84:0a:75:21:49:9b:6d:fe:a4:6f:9c:
+                    0d:44:24:1f:c7:86:ce:52:7b:85:4f:c7:a9:53:5d:
+                    87:fc:3d:7a:ae:23:42:20:0d:5e:3d:86:52:e1:6c:
+                    f3:0a:69:d4:3c:96:8d:b2:8a:d8:9a:48:c2:47:b0:
+                    b6:75:5a:de:a8:6f:da:0d:16:50:5c:71:ea:b7:b5:
+                    f5:cf:31:55:72:96:cb:2e:00:8d:69:73:71:ec:6e:
+                    65:7b:90:c2:30:83:43:f5:7f:25:68:20:02:c7:95:
+                    78:03
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha256WithRSAEncryption
+         c0:cd:d8:83:c2:c1:89:d5:87:58:91:30:36:e5:fc:95:62:d1:
+         66:13:05:2e:4d:8c:0e:21:54:73:6f:d7:4a:05:a4:91:25:35:
+         80:db:01:aa:e3:7a:cb:48:62:66:f1:11:b7:a0:c3:d9:9d:7b:
+         36:8c:9e:74:85:5d:25:1c:0f:57:21:25:71:c8:55:ed:f2:ea:
+         4a:b7:98:92:f4:5a:f7:4d:90:df:5b:dc:ff:34:01:df:31:f5:
+         85:1f:e1:63:7a:4b:7e:9d:37:63:fd:cb:c6:59:42:01:af:d1:
+         eb:32:5d:d5:43:cb:28:68:39:25:ed:37:88:3a:0c:d2:f4:0e:
+         d5:f3:18:59:7a:41:17:f3:d3:35:d5:bb:04:ec:77:a8:c2:bd:
+         29:65:dd:7c:8d:f2:f7:a5:a3:88:25:c4:e6:0f:4f:31:b8:9c:
+         77:bf:35:39:27:78:a7:a6:37:c5:f3:a2:16:10:38:8a:cd:cb:
+         c2:75:8a:29:dc:8d:16:82:2e:28:b7:93:2e:88:e8:f7:59:9e:
+         91:de:58:77:d6:3b:54:bc:e2:b1:79:c4:f7:b2:53:d1:d4:a3:
+         c9:71:ac:01:f9:79:98:5c:2c:2d:30:30:e8:d2:71:3e:32:6f:
+         9d:ca:d4:fc:61:4a:bc:ea:b7:85:6a:70:30:12:08:4c:ec:ab:
+         43:91:4b:e0:65:56:a9:14:d5:c5:57:4d:15:89:9b:e6:a7:b3:
+         43:aa:39:f0:8e:c2:5f:36:cd:1c:fb:38:0b:ed:2b:96:14:3d:
+         20:05:3b:04:e4:33:8f:fe:0d:ca:38:6a:01:d9:c2:59:d4:e4:
+         3f:18:58:cd:e7:6e:e3:93:34:20:ff:9f:fc:40:c4:17:65:af:
+         0c:d5:22:81:40:24:6e:34:98:2a:fc:62:4f:7a:fe:7d:4d:e3:
+         a9:a9:2a:de:ea:10:3e:fc:39:e6:af:2f:2c:d9:88:f7:c0:60:
+         40:d2:ff:b2:a5:d7:50:db:9e:24:d1:1b:ad:c6:71:1f:36:04:
+         06:d8:b6:32:db:0c:27:3e:71:1a:49:9f:85:4f:12:00:bc:ab:
+         dd:96:fb:ce:d1:08:94:54:d7:bb:e2:38:41:a0:06:17:a2:07:
+         3c:88:99:1d:7d:f4:b1:25:38:18:c2:12:fb:9a:e0:55:d0:55:
+         72:dd:f5:13:59:1e:e0:d6:69:f1:b6:f8:33:3b:63:af:e8:d8:
+         2b:16:d1:50:9e:6a:63:fd:50:30:27:63:ac:ed:83:22:a7:a0:
+         b0:29:ac:1e:fa:0a:cb:af:4a:c4:c8:ec:e6:5c:d9:14:1e:8d:
+         82:71:93:ee:a8:fe:ba:e3:92:b2:99:80:22:78:f2:7c:d1:80:
+         a2:c0:2c:e0:90:62:90:e5
+-----BEGIN CERTIFICATE-----
+MIID8zCCAdsCAQIwDQYJKoZIhvcNAQELBQAwQzELMAkGA1UEBhMCVVMxDTALBgNV
+BAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRUwEwYDVQQDDAxpbnRlcm1lZGlhdGUw
+IBcNMTkwNTI4MDYzNDAyWhgPMjExOTA1MDQwNjM0MDJaMDoxCzAJBgNVBAYTAlVT
+MQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVPU0FBRjEMMAoGA1UEAwwDYWFpMIIB
+IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgp89QQZHA8tTO9wDYJG38GAD
+UiT3Z1P5nl6YBymL12vMWxCNy7IuRJwe6PZ7YWRXVOXT2URVebiRDpdKY7d6IJj6
+NF2RmDvvhn0TS6vnNmFZmI0y4BbxM+hs1LS7nmI65diSLRkboMdMDT10JmgF9//M
+A+5zkwGY5ZrklgnnibuRgWl+GmosFTjjQxoZmWe4yEkxNMb71Pd+hAp1IUmbbf6k
+b5wNRCQfx4bOUnuFT8epU12H/D16riNCIA1ePYZS4WzzCmnUPJaNsorYmkjCR7C2
+dVreqG/aDRZQXHHqt7X1zzFVcpbLLgCNaXNx7G5le5DCMIND9X8laCACx5V4AwID
+AQABMA0GCSqGSIb3DQEBCwUAA4ICAQDAzdiDwsGJ1YdYkTA25fyVYtFmEwUuTYwO
+IVRzb9dKBaSRJTWA2wGq43rLSGJm8RG3oMPZnXs2jJ50hV0lHA9XISVxyFXt8upK
+t5iS9Fr3TZDfW9z/NAHfMfWFH+Fjekt+nTdj/cvGWUIBr9HrMl3VQ8soaDkl7TeI
+OgzS9A7V8xhZekEX89M11bsE7Heowr0pZd18jfL3paOIJcTmD08xuJx3vzU5J3in
+pjfF86IWEDiKzcvCdYop3I0Wgi4ot5MuiOj3WZ6R3lh31jtUvOKxecT3slPR1KPJ
+cawB+XmYXCwtMDDo0nE+Mm+dytT8YUq86reFanAwEghM7KtDkUvgZVapFNXFV00V
+iZvmp7NDqjnwjsJfNs0c+zgL7SuWFD0gBTsE5DOP/g3KOGoB2cJZ1OQ/GFjN527j
+kzQg/5/8QMQXZa8M1SKBQCRuNJgq/GJPev59TeOpqSre6hA+/Dnmry8s2Yj3wGBA
+0v+ypddQ254k0RutxnEfNgQG2LYy2wwnPnEaSZ+FTxIAvKvdlvvO0QiUVNe74jhB
+oAYXogc8iJkdffSxJTgYwhL7muBV0FVy3fUTWR7g1mnxtvgzO2Ov6NgrFtFQnmpj
+/VAwJ2Os7YMip6CwKawe+grLr0rEyOzmXNkUHo2CcZPuqP6645KymYAiePJ80YCi
+wCzgkGKQ5Q==
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/aai_aai.onap.org.cer b/tests/dcaegen2/prh-testcases/resources/simulator/certs/aai_aai.onap.org.cer
deleted file mode 100644 (file)
index 327f57b..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIE5TCCA82gAwIBAgIJAI5fEseaW2LVMA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNV
-BAYTAlVTMQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVPU0FBRjEZMBcGA1UEAwwQ
-aW50ZXJtZWRpYXRlQ0FfMjAeFw0xODEwMTgxMDM3MzJaFw0xOTA0MTgxMDM3MzJa
-MGYxDDAKBgNVBAMMA2FhaTEPMA0GCSqGSIb3DQEJARYAMRkwFwYDVQQLDBBhYWlA
-YWFpLm9uYXAub3JnMQ4wDAYDVQQLDAVPU0FBRjENMAsGA1UECgwET05BUDELMAkG
-A1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCCnz1BBkcD
-y1M73ANgkbfwYANSJPdnU/meXpgHKYvXa8xbEI3Lsi5EnB7o9nthZFdU5dPZRFV5
-uJEOl0pjt3ogmPo0XZGYO++GfRNLq+c2YVmYjTLgFvEz6GzUtLueYjrl2JItGRug
-x0wNPXQmaAX3/8wD7nOTAZjlmuSWCeeJu5GBaX4aaiwVOONDGhmZZ7jISTE0xvvU
-936ECnUhSZtt/qRvnA1EJB/Hhs5Se4VPx6lTXYf8PXquI0IgDV49hlLhbPMKadQ8
-lo2yitiaSMJHsLZ1Wt6ob9oNFlBcceq3tfXPMVVylssuAI1pc3HsbmV7kMIwg0P1
-fyVoIALHlXgDAgMBAAGjggGzMIIBrzAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIF
-4DAgBgNVHSUBAf8EFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwVAYDVR0jBE0wS4AU
-BASNACQ4xpx414BXQWdJBoDmckehMKQuMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYD
-VQQKDARPTkFQMQswCQYDVQQGEwJVU4IBAjAdBgNVHQ4EFgQUMghLmZ4l0T+MY3uk
-AR6YBJP5gwMwgfoGA1UdEQSB8jCB74IDYWFpgoHnYWFpLmFwaS5zaW1wbGVkZW1v
-Lm9uYXAub3JnIGFhaS5lbGFzdGljc2VhcmNoLnNpbXBsZWRlbW8ub25hcC5vcmcg
-YWFpLmdyZW1saW5zZXJ2ZXIuc2ltcGxlZGVtby5vbmFwLm9yZyBhYWkuaGJhc2Uu
-c2ltcGxlZGVtby5vbmFwLm9yZyBhYWkub25hcCBhYWkuc2VhcmNoc2VydmljZS5z
-aW1wbGVkZW1vLm9uYXAub3JnIGFhaS5zaW1wbGVkZW1vLm9uYXAub3JnIGFhaS51
-aS5zaW1wbGVkZW1vLm9uYXAub3JnMA0GCSqGSIb3DQEBCwUAA4IBAQBJyXk6ZTfA
-f9mYi5ey/ZpchB9egJfwEXXOqSKeYYTjqUr3uXXk+usb8YXsFVoD9Id5do3Hnxv+
-J3ISGmyPTgQfV/9KDmtHPTyclR9mLji+j4GviZnIpAIsI/duPKlEfLcym9smAC7Q
-+HYanUQ7s8sjJJ4ORdBLOy1HkfTu9pjNKZ1CcEnJZ8Y5juLOeEj+Xa+QzcywSK2E
-iuPXJwFFtcX9fO+ojiQV9g0L9JgABMqm4Q6si03gXofYEgvAUJSxsirydB8kcqPU
-jCgw8/XIsHj4VRNNWlwkvzskeX9ZlcFMmn6DTfyDD1Rrij1efotO2ie3OrKUEzpH
-N1G5vCuZqOla
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEVDCCAjygAwIBAgIBAjANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVPU0FB
-RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwOTI0MTE0MjE2WhcN
-MjMwOTI0MTE0MjE2WjBHMQswCQYDVQQGEwJVUzENMAsGA1UECgwET05BUDEOMAwG
-A1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVkaWF0ZUNBXzIwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCjPFeAho7BtWjB4Enww/KXD0tTuoda/Fkc
-o/yv2waNNsx+pOYGdJwNHYvNS7/RLBHc8kCN+TbKnYZ6AE97wD1Pzrc7AZ58qpjq
-Ob7aTp4u3IAMWR5YOkDyjiibA5X7z9N/wveG/Ei2SgN2pY7O2lK5ucm6igarfxll
-rZC1MA9zAXrfmd5bLJQQqACT6q15KQaCIwhqwoXp8w+s0rXcZ2/L303lFIUXoHUp
-kzMsIPhJ/ZoEvAEkXIPgT2uFgOwIyWmr8Rg5jYzZhV7vey3bQUBlue9aiMIXih3d
-b4AVD6J6eF/NmJygtUfHFrWeTAYLppA0d69BWUQZ+XQgCwjOMLaNAgMBAAGjZjBk
-MB0GA1UdDgQWBBQEBI0AJDjGnHjXgFdBZ0kGgOZyRzAfBgNVHSMEGDAWgBTtc8Wb
-I4DL8Bm6CVi8//GsTyq8NTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQE
-AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAt4VCLb2UHiZpDfSQbe62vlFzsGlODYKF
-k7BhW9Q5jfIXpPhhtBLFwJFEKAWFLVWubz+YIa7I5wtniS6zEPC/5t3JOiEXMJQY
-PfaPDSsovZ+eShu0QtrjjldFwL2MiqNsd2IWLSIRQUP63RZGBRTTxSsxB0VAfRyT
-cu/8znpmZsHna3DspGZQputm7qsxgUhAcPCdo9RQtG6Ox6L1wTXUJmTPHdKQtZjr
-qqSQ7kn8u3i5KQYYapmc3UO+CBbzoLPD5Rrlq+ROBbiNd9R/j5vVgRO7vsU9SHnm
-AaKFEjDPTSjDtMOxu1BsTNmftaE2jcYa9/ZW67H8URCuo92NE0cZRxBqHkPUjH3/
-/S43/TBAfjfarF5WW7iMAEZfEGhrQu26JWXBMcZshStuHUEPl2b+RC5LZcBMYKgi
-SqSOXzpiJeRNASpXKCQQZG8n03c/jBf1U20HaK/4Z2ikOql5B21suxhUbixG1EQN
-DOrFGOFUqG4Eyw+xjUR5rTfDnpKgQfJo0/aohZs9p5x+UwitkrQkJQ1ZmEzeVDjm
-7xsmOcAJS2T9DLle6fDWvyh76InymAPxzk1/2AWOp8uw8iwNfFxE+p+M7h0psZxp
-SnvlgASASdWlZLcMQtNiiKzMK75FW9SMctQfA/RfohNEwivpp6tNpgJozoKmhoPK
-zs5HS/mx8GI=
------END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/ca_local_0.cer b/tests/dcaegen2/prh-testcases/resources/simulator/certs/ca_local_0.cer
deleted file mode 100644 (file)
index ff37eaf..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFPjCCAyagAwIBAgIJAMhpcvbx/8/AMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV
-BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA4MDMx
-MzI2NTBaFw0zODA3MjkxMzI2NTBaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK
-DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
-ggIBAO4j7nmAY9KX/ceFCITuWAMCHAmSoeHCTs+lgkYX7DpXPidsF5t0ijPaElUC
-rwwMnXz5h1o8FzXD64FMbqMVEseLUDZGelRZ7Rkz+hy0Y5i8QKsBTfeo7sP7ZEaC
-vpqom9imPLFUn4oDeYspCKjMF93Z69Cv8pxFYCFpZwY3eR9V4xOB613k8guBJtHR
-ccY9/NbdfbkrtUz5kNuQqwLj5ttvesqxPq0L4m3bPjkubQCb+QiJxx10Xcx6fcfu
-wIu7NR63qDlWFYstsDnH/VIT1pSCBHEw+muSEQ44sgPFy+AxB8O8HKd8wRfmkV2d
-YNPyotTLD+aLzDlCWtC0pGnTTJimdu9+hZRIZz5YT4m8BdLQ/jTBd6Gx2tVLvWso
-9IJSjfkhj6EtVxyZ81jM+rLAnKy3qPXDCN6CIKL07hNuSzIIhCrK2L4f82JWS7dP
-mg2acuhCH56qrhEr42Kjeak181KM/QKiRPgNyOSygJ7uRaLbqOQRh46c68NcmW4F
-13OwJQAsrjgaQY1ZWnFsvRYK9NnUqK+2XuCQFS7EYm02M2UwO2GCD88In8PCzzv8
-Q0Zj8Hb4h79fVRjG8/3MnQCJ164+9PfXyu9dj5l6XkkSvdj1IsewaSMy9NccGx7Q
-rE7yRPMB6FlAnGPj0KbJXHXJyiujPHSCF0D+Hbl9rxU7FRAbAgMBAAGjYzBhMB0G
-A1UdDgQWBBTtc8WbI4DL8Bm6CVi8//GsTyq8NTAfBgNVHSMEGDAWgBTtc8WbI4DL
-8Bm6CVi8//GsTyq8NTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAN
-BgkqhkiG9w0BAQsFAAOCAgEAW4IYy1PUrV/wHblIGFTBo5z7EB33rpHfAJzbDkop
-2n5wOlmh78pkeRNb1TOKcSHJPw0MdkwVBPI1wm/SOpHUPmKTW1muO6RUnFjZ68y9
-DiVa6zCW/RBFeG3f8kywxgqPLml1TbikRuMBU0ucOa/bXZ98P2hMLkjWTgeARGSj
-QCb7QyqeFzG0mPmAuX6zMj5xwpdyPB0zCoRGXa/BIWEvYjgkaRM+E+9oRWt/6BHQ
-4uw11R7gAV4/TSu7qYNfTMllBaLJ0o/1q0QF16e4mV1E4erDfWKlrvUlgCaHCx8Q
-3PL7ovM4jjrTNAjnX0q5xtWbF0mlJhJk/NbPDb7hArBv4vp9XoITyRW1vcbe94jv
-GzqLKlvBQUxGue4kLYDmUFdog7gaCkEH3N4mH3ad4HZUsOMeanvVgbVZr10VOlNq
-TEWqDPATayJdo+VhJCGc6hVa+IJsDTAa/z2MLybqcoOfNT/rxYIdvlX4OjSqAqOj
-bSivsCe9c4km56pP2ufA/woPzh+Z46Ukt+krGyFQwKdQQLh5Pp7Yuhvdld/5kd8M
-S2fqcBFpzzBSj+huVayw6jFi5qLlISouhCVsc0rBqvnfuQTQwmfFIlfaHBTSjniv
-5DdibZEtMqYYXl1VB4XUHTt5dOGHLEX2w/d5887DQVLUbaUKm1mfScb/vPjGgk6/
-re4=
------END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap-mr.crt b/tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap-mr.crt
new file mode 100644 (file)
index 0000000..3fc90f9
--- /dev/null
@@ -0,0 +1,87 @@
+Certificate:
+    Data:
+        Version: 1 (0x0)
+        Serial Number: 3 (0x3)
+        Signature Algorithm: sha256WithRSAEncryption
+        Issuer: C=US, O=ONAP, OU=OSAAF, CN=intermediate
+        Validity
+            Not Before: May 28 06:34:02 2019 GMT
+            Not After : May  4 06:34:02 2119 GMT
+        Subject: C=US, O=ONAP, OU=OSAAF, CN=dmaap-mr
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+                RSA Public-Key: (2048 bit)
+                Modulus:
+                    00:b3:69:90:49:e4:ac:84:ae:19:ac:0c:1c:f3:f4:
+                    0d:1d:98:94:54:82:e5:43:06:32:a2:f8:8f:7c:bd:
+                    bb:f2:65:75:39:74:98:a1:35:be:3f:31:54:d5:3b:
+                    fa:1f:02:84:14:bd:ea:f6:2f:7f:cb:59:b4:0e:38:
+                    4f:e1:fa:c7:a4:d5:55:4e:8e:4a:21:e0:af:e9:f2:
+                    2c:01:89:e9:fe:9e:74:3f:71:0e:87:70:09:7a:1b:
+                    59:9b:80:2d:c4:de:83:78:c9:5a:06:fd:75:19:85:
+                    14:9b:a1:3a:d1:0d:fa:63:a5:a0:92:5a:bc:bb:52:
+                    83:9e:06:09:cb:5f:d0:06:5f:1a:02:22:5b:8f:6b:
+                    e9:2f:ae:16:48:8d:dc:c8:dc:ff:a9:e2:38:fc:fc:
+                    47:b2:a0:47:50:52:3d:e8:67:0b:b4:b3:cb:0d:29:
+                    48:41:6a:16:a1:98:64:89:04:c7:ad:4e:12:c7:9f:
+                    e7:55:d5:a2:85:f7:34:47:4f:a3:1b:92:07:fa:60:
+                    db:f1:65:0d:9b:21:e7:68:78:a7:ae:de:44:af:5b:
+                    32:a5:4f:cd:c4:3f:8d:95:13:c5:3b:52:b8:0f:1e:
+                    34:b3:17:c0:96:ed:8b:14:29:65:0e:04:92:fd:77:
+                    1f:b1:ed:27:cb:f4:eb:2f:64:56:10:ba:08:3b:3f:
+                    4d:8d
+                Exponent: 65537 (0x10001)
+    Signature Algorithm: sha256WithRSAEncryption
+         d2:43:ab:0f:cb:02:ff:00:56:eb:6a:1a:58:b9:df:a3:0f:47:
+         cf:e2:f3:43:7a:c8:b5:74:68:36:3f:82:1c:58:3a:32:86:5d:
+         2b:d2:81:74:e8:0f:6b:1b:40:45:40:f4:3a:d5:e4:1d:d0:c8:
+         33:89:ce:a0:0a:7a:75:13:2a:fb:17:3b:f0:9b:23:07:b1:92:
+         16:0a:5a:e0:b2:b6:56:cc:47:7d:3f:4d:c9:ce:5e:1b:56:0a:
+         36:c0:b2:2a:6a:10:33:ec:b9:4c:ff:d2:a4:22:62:16:0e:30:
+         b6:bb:4c:c9:e5:c6:03:2f:45:62:1b:55:2c:fb:2b:c8:23:a7:
+         41:16:1b:cd:21:06:c0:01:5e:71:97:9b:bb:21:26:4c:0c:88:
+         c4:f4:3e:9a:07:5c:2c:c0:4e:06:18:0c:b4:fe:69:39:0e:9b:
+         49:91:30:3d:e3:7e:82:ad:6a:09:f2:7a:7f:c3:07:b2:22:98:
+         ef:74:00:6d:5b:d5:c5:1b:f7:00:3f:14:cc:41:ad:66:54:65:
+         94:26:b2:10:f3:06:87:da:45:79:44:f8:41:6a:9d:13:98:08:
+         c4:9e:de:45:4b:a4:ca:a5:1b:a3:82:a0:fc:e8:aa:29:c7:43:
+         84:cb:cf:1a:4a:27:c6:c1:85:bc:06:62:e4:bb:e0:93:0e:8b:
+         fd:33:06:c0:17:a2:e4:49:0f:5d:be:7d:f3:da:5c:b5:20:29:
+         b1:c6:95:5a:33:94:d9:2d:ea:f1:e3:f0:94:67:3a:db:a1:e3:
+         b1:d1:31:fd:a8:53:a9:c4:7e:13:7f:d7:6e:4b:cf:dc:6a:b7:
+         05:d1:4e:07:68:ba:05:ab:48:f1:17:d6:ed:3b:26:96:7d:aa:
+         f3:e6:4a:4e:27:5d:0a:b6:ed:8d:d7:0c:6a:c5:2c:96:d5:8b:
+         31:b3:13:07:c6:fa:42:a8:fe:30:99:eb:1b:57:b0:fa:22:dc:
+         f7:1b:ad:16:f0:70:36:c3:41:d8:97:0f:aa:c6:8c:c2:eb:98:
+         e1:89:2c:ec:8e:e5:6d:c7:1c:0f:00:88:c4:fa:cb:52:b1:c1:
+         2e:e1:4f:34:54:de:d9:25:45:bc:eb:37:6b:6a:a3:5e:e0:41:
+         aa:ca:f6:36:61:3a:89:63:40:16:cf:dd:bd:97:11:d6:75:48:
+         6d:c1:0e:64:a3:ad:ef:9e:6c:a4:0c:df:c2:0e:ac:12:7b:ff:
+         36:64:98:26:f0:96:c5:9a:9f:f3:c6:63:70:e3:e4:24:74:ad:
+         08:c8:d3:55:a0:15:7a:57:a4:ce:ae:ed:f6:68:f2:1e:7c:d8:
+         96:35:74:7a:79:d0:e9:56:2c:bd:c5:d3:40:d1:cd:f9:b3:cc:
+         fc:c7:46:3d:57:79:3f:a7
+-----BEGIN CERTIFICATE-----
+MIID+DCCAeACAQMwDQYJKoZIhvcNAQELBQAwQzELMAkGA1UEBhMCVVMxDTALBgNV
+BAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRUwEwYDVQQDDAxpbnRlcm1lZGlhdGUw
+IBcNMTkwNTI4MDYzNDAyWhgPMjExOTA1MDQwNjM0MDJaMD8xCzAJBgNVBAYTAlVT
+MQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVPU0FBRjERMA8GA1UEAwwIZG1hYXAt
+bXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzaZBJ5KyErhmsDBzz
+9A0dmJRUguVDBjKi+I98vbvyZXU5dJihNb4/MVTVO/ofAoQUver2L3/LWbQOOE/h
++sek1VVOjkoh4K/p8iwBien+nnQ/cQ6HcAl6G1mbgC3E3oN4yVoG/XUZhRSboTrR
+DfpjpaCSWry7UoOeBgnLX9AGXxoCIluPa+kvrhZIjdzI3P+p4jj8/EeyoEdQUj3o
+Zwu0s8sNKUhBahahmGSJBMetThLHn+dV1aKF9zRHT6Mbkgf6YNvxZQ2bIedoeKeu
+3kSvWzKlT83EP42VE8U7UrgPHjSzF8CW7YsUKWUOBJL9dx+x7SfL9OsvZFYQugg7
+P02NAgMBAAEwDQYJKoZIhvcNAQELBQADggIBANJDqw/LAv8AVutqGli536MPR8/i
+80N6yLV0aDY/ghxYOjKGXSvSgXToD2sbQEVA9DrV5B3QyDOJzqAKenUTKvsXO/Cb
+IwexkhYKWuCytlbMR30/TcnOXhtWCjbAsipqEDPsuUz/0qQiYhYOMLa7TMnlxgMv
+RWIbVSz7K8gjp0EWG80hBsABXnGXm7shJkwMiMT0PpoHXCzATgYYDLT+aTkOm0mR
+MD3jfoKtagnyen/DB7IimO90AG1b1cUb9wA/FMxBrWZUZZQmshDzBofaRXlE+EFq
+nROYCMSe3kVLpMqlG6OCoPzoqinHQ4TLzxpKJ8bBhbwGYuS74JMOi/0zBsAXouRJ
+D12+ffPaXLUgKbHGlVozlNkt6vHj8JRnOtuh47HRMf2oU6nEfhN/125Lz9xqtwXR
+TgdougWrSPEX1u07JpZ9qvPmSk4nXQq27Y3XDGrFLJbVizGzEwfG+kKo/jCZ6xtX
+sPoi3PcbrRbwcDbDQdiXD6rGjMLrmOGJLOyO5W3HHA8AiMT6y1KxwS7hTzRU3tkl
+RbzrN2tqo17gQarK9jZhOoljQBbP3b2XEdZ1SG3BDmSjre+ebKQM38IOrBJ7/zZk
+mCbwlsWan/PGY3Dj5CR0rQjI01WgFXpXpM6u7fZo8h582JY1dHp50OlWLL3F00DR
+zfmzzPzHRj1XeT+n
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap_bc_topic_mgr_dmaap_bc.onap.org.cer b/tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap_bc_topic_mgr_dmaap_bc.onap.org.cer
deleted file mode 100644 (file)
index 756dd3a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIELDCCAxSgAwIBAgIJAI5fEseaW2LbMA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNV
-BAYTAlVTMQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVPU0FBRjEZMBcGA1UEAwwQ
-aW50ZXJtZWRpYXRlQ0FfMjAeFw0xODEwMjIxMjM4MTZaFw0xOTA0MjIxMjM4MTZa
-MH8xETAPBgNVBAMMCGRtYWFwLWJjMQ8wDQYJKoZIhvcNAQkBFgAxLTArBgNVBAsM
-JGRtYWFwLWJjLXRvcGljLW1nckBkbWFhcC1iYy5vbmFwLm9yZzEOMAwGA1UECwwF
-T1NBQUYxDTALBgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0B
-AQEFAAOCAQ8AMIIBCgKCAQEAs2mQSeSshK4ZrAwc8/QNHZiUVILlQwYyoviPfL27
-8mV1OXSYoTW+PzFU1Tv6HwKEFL3q9i9/y1m0DjhP4frHpNVVTo5KIeCv6fIsAYnp
-/p50P3EOh3AJehtZm4AtxN6DeMlaBv11GYUUm6E60Q36Y6Wgklq8u1KDngYJy1/Q
-Bl8aAiJbj2vpL64WSI3cyNz/qeI4/PxHsqBHUFI96GcLtLPLDSlIQWoWoZhkiQTH
-rU4Sx5/nVdWihfc0R0+jG5IH+mDb8WUNmyHnaHinrt5Er1sypU/NxD+NlRPFO1K4
-Dx40sxfAlu2LFCllDgSS/Xcfse0ny/TrL2RWELoIOz9NjQIDAQABo4HiMIHfMAkG
-A1UdEwQCMAAwDgYDVR0PAQH/BAQDAgXgMCAGA1UdJQEB/wQWMBQGCCsGAQUFBwMB
-BggrBgEFBQcDAjBUBgNVHSMETTBLgBQEBI0AJDjGnHjXgFdBZ0kGgOZyR6EwpC4w
-LDEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTggEC
-MB0GA1UdDgQWBBTvkTjHV87v4IBJ8N/PqkjjWGKICjArBgNVHREEJDAigghkbWFh
-cC1iY4IWZG1hYXAtYmMgZG1hYXAtYmMub25hcDANBgkqhkiG9w0BAQsFAAOCAQEA
-EJFyoeQtkjDf/yUyWReewxiOfDdmmrDOO4gbxt6hd3ilOflmC7QolR1NAzmCML3b
-vmLS7a8zhwBsUU11wjasN8PI3qG7H36U7hP/NVwvql0YNGIcxvukPJJvDqW6V3MI
-fOaCFs4uJexSYeaXRWdk0Rq8GY9gB2j1TUsl+we9zJeErKr2vY2LAJI0iYJ+v6YY
-Ug14aPYu4m4ABUDhqfM+4z580h8GA+5ZkWNr5z9xfeJB520jAc6zx86obx9hep74
-OByfVqleMV0QfZeH9oLGYh2FnSSEG60GyWFIf9k76kh2LREVCbU+nOhFfVy9YD5Q
-+2TXjh/wMcv3RxAHqSeW9A==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEVDCCAjygAwIBAgIBAjANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVPU0FB
-RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwOTI0MTE0MjE2WhcN
-MjMwOTI0MTE0MjE2WjBHMQswCQYDVQQGEwJVUzENMAsGA1UECgwET05BUDEOMAwG
-A1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVkaWF0ZUNBXzIwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCjPFeAho7BtWjB4Enww/KXD0tTuoda/Fkc
-o/yv2waNNsx+pOYGdJwNHYvNS7/RLBHc8kCN+TbKnYZ6AE97wD1Pzrc7AZ58qpjq
-Ob7aTp4u3IAMWR5YOkDyjiibA5X7z9N/wveG/Ei2SgN2pY7O2lK5ucm6igarfxll
-rZC1MA9zAXrfmd5bLJQQqACT6q15KQaCIwhqwoXp8w+s0rXcZ2/L303lFIUXoHUp
-kzMsIPhJ/ZoEvAEkXIPgT2uFgOwIyWmr8Rg5jYzZhV7vey3bQUBlue9aiMIXih3d
-b4AVD6J6eF/NmJygtUfHFrWeTAYLppA0d69BWUQZ+XQgCwjOMLaNAgMBAAGjZjBk
-MB0GA1UdDgQWBBQEBI0AJDjGnHjXgFdBZ0kGgOZyRzAfBgNVHSMEGDAWgBTtc8Wb
-I4DL8Bm6CVi8//GsTyq8NTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQE
-AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAt4VCLb2UHiZpDfSQbe62vlFzsGlODYKF
-k7BhW9Q5jfIXpPhhtBLFwJFEKAWFLVWubz+YIa7I5wtniS6zEPC/5t3JOiEXMJQY
-PfaPDSsovZ+eShu0QtrjjldFwL2MiqNsd2IWLSIRQUP63RZGBRTTxSsxB0VAfRyT
-cu/8znpmZsHna3DspGZQputm7qsxgUhAcPCdo9RQtG6Ox6L1wTXUJmTPHdKQtZjr
-qqSQ7kn8u3i5KQYYapmc3UO+CBbzoLPD5Rrlq+ROBbiNd9R/j5vVgRO7vsU9SHnm
-AaKFEjDPTSjDtMOxu1BsTNmftaE2jcYa9/ZW67H8URCuo92NE0cZRxBqHkPUjH3/
-/S43/TBAfjfarF5WW7iMAEZfEGhrQu26JWXBMcZshStuHUEPl2b+RC5LZcBMYKgi
-SqSOXzpiJeRNASpXKCQQZG8n03c/jBf1U20HaK/4Z2ikOql5B21suxhUbixG1EQN
-DOrFGOFUqG4Eyw+xjUR5rTfDnpKgQfJo0/aohZs9p5x+UwitkrQkJQ1ZmEzeVDjm
-7xsmOcAJS2T9DLle6fDWvyh76InymAPxzk1/2AWOp8uw8iwNfFxE+p+M7h0psZxp
-SnvlgASASdWlZLcMQtNiiKzMK75FW9SMctQfA/RfohNEwivpp6tNpgJozoKmhoPK
-zs5HS/mx8GI=
------END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/keystore.p12 b/tests/dcaegen2/prh-testcases/resources/simulator/certs/keystore.p12
new file mode 100644 (file)
index 0000000..bd8e3c0
Binary files /dev/null and b/tests/dcaegen2/prh-testcases/resources/simulator/certs/keystore.p12 differ
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.jks b/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.jks
deleted file mode 100644 (file)
index e74ce64..0000000
Binary files a/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.jks and /dev/null differ
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.trust.jks b/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.trust.jks
deleted file mode 100644 (file)
index 10103cf..0000000
Binary files a/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.trust.jks and /dev/null differ
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/root.crt b/tests/dcaegen2/prh-testcases/resources/simulator/certs/root.crt
new file mode 100644 (file)
index 0000000..aea1159
--- /dev/null
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFbTCCA1WgAwIBAgIUG1QH8TpwSepBiBzrrt5Caw1NEf4wDQYJKoZIhvcNAQEL
+BQAwPTEPMA0GA1UEAwwGUm9vdENBMQ4wDAYDVQQLDAVPU0FBRjENMAsGA1UECgwE
+T05BUDELMAkGA1UEBhMCVVMwIBcNMTkwNTI4MDYzNDAyWhgPMjExOTA1MDQwNjM0
+MDJaMD0xDzANBgNVBAMMBlJvb3RDQTEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoM
+BE9OQVAxCzAJBgNVBAYTAlVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
+AgEA5h/bBKaDM7IrsuiADWFsXEyoEgiUWfXkmat7nxjVu5P5EK7eowWLGwKSI6N1
+mimOzxsVvc6o1X6GhhNDAQGrfzWFSTf00TyXZc46NaZp6ti2AcD1H3rImzchC8/B
+AM/eHcB8/ZMoq9A5z+ljlI3xT0JiF3GbSEaXPAaLlWhoEShb3JBDUWV8TRI6AYS7
+MxaAcbrT1uOstiB+cIVTmafk7LbcV9829OdJbEcKVjMyF5PxHU5t4B+zO6lrAGr3
+BIMwwiFoSbGEow58wMN/lL+zB48P5uV+0wZqB4+zgU0DEzBfJ3Q7XZj65t9VsF95
+/qVDYW5JgEUB7fi+KrHgpKbdoHpZsHRiE7GZibJphxDN6CHSfcSuDoJiIHWbaDF4
+dR8qIObMCfdkbu+5QFc+RZceCmmTtMSI8JBN/FMhBeRJ7enIphcsoinCwINYjwWN
+oNT5A5wPLWGkGC51r535I55x2kgvbd+bUZSWapJ4tgQBHm5J/dGcUHNJMO4FFjsF
+LplrHb3o83jhagfwEZ3TsbGY+bUXXWkydKi6A66JrbNGR5/RgYhz+p5KOyjiR+JI
+g7guB5UaK6ZCl4OeVEfpmF3OFEXnLMvr8iJ3tlwvPoj9mxRKtS7Os3+/fvi6hRpl
+VgoSMDN7Pv0f4KSPuNQDgRBH7U9ez/YTYakRg6Xv1ACVdisCAwEAAaNjMGEwHQYD
+VR0OBBYEFIkwGLo5okMt2o0Qca+IQsgiwu1iMB8GA1UdIwQYMBaAFIkwGLo5okMt
+2o0Qca+IQsgiwu1iMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0G
+CSqGSIb3DQEBCwUAA4ICAQC7uexRjHGGYpGZKmgTmgQwDboxOdtpAoYHesnWAj7V
+NjbAZhAvrN7kEMKp0RE5IIE/JwnMmmY3H+pGKsSb8AqArMKVLn00kQhHjg+j36rw
+wlxA16NJAzWIXQ97EjbG7U/a9MhAnnUMAEtdWVp3ux1ISZta4s2zSapFw+CIlLJC
+81Lz1344DbQJQsy5bOfPrgHtCgWQafSV0cU8XsJnPo2HsnL+q4hDi+KxE6jJshE1
+alMa2kX/DRLWPGCifPe3zQJdn9IdLjWsOrRFOIZJqwtxRzdK0IvS1P9clit5NJ88
+d6qCK1kl5nW7EyueUMSIRldu/uG8UTcWNP5Cu9KPE14GgigLt7RwW9nPgsdbTwK0
+4jAeF6LsZ7QU29cvBjI9LpiA7VFfexkFEeTU8gAmbZuOS6HIhuswHdTGutT9XmO5
+HkA1sA1+L5taR+9UMo/hvzBCIKhFMQlgCWIkJ1iiYKuQ+SZsDR3CZ5+ma5NlhP9j
+1j6J91kkxB5qs4JrgaHZ8cqysljf48PQF3qkEiQfOxw/0WLsxVPxPNYDszX69FRF
+d5+gpSAPQjdJ7OT49ccfl5r1kVfGHpDZn2dKw7K34yeLAAPcjyukdrHFBgtXUVb1
+Ivic5rrDAv1UrqaXh1r6Q+HLOJHSEP1jklyXX0q2IekyQbXRYOMhALfcVbmRleZX
+Qg==
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/truststore.jks b/tests/dcaegen2/prh-testcases/resources/simulator/certs/truststore.jks
new file mode 100644 (file)
index 0000000..2b2d8b4
Binary files /dev/null and b/tests/dcaegen2/prh-testcases/resources/simulator/certs/truststore.jks differ
diff --git a/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot b/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot
deleted file mode 100644 (file)
index 6e350ce..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-*** Settings ***
-Documentation     Integration tests for PRH.
-...               PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event. PRH comunicates with AAI and DMaaP through SSL
-Suite Setup       Run keywords   Create headers  AND  Create sessions  AND  Ensure Container Is Running  ssl_prh  AND  Ensure Container Is Exited  prh
-Suite Teardown    Ensure Container Is Running  prh
-Test Teardown     Reset Simulators
-Library           resources/PrhLibrary.py
-Resource          resources/prh_library.robot
-Resource          ../../common.robot
-
-*** Variables ***
-${TEST_CASES_DIR}    %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets
-
-${DMAAP_SIMULATOR_SETUP_URL}    http://${DMAAP_SIMULATOR_SETUP}
-${AAI_SIMULATOR_SETUP_URL}    http://${AAI_SIMULATOR_SETUP}
-${CONSUL_SETUP_URL}    http://${CONSUL_SETUP}
-
-*** Test Cases ***
-Valid DMaaP event can be converted to PNF_READY notification with ssl connection to AAI
-    [Template]    Verify PNF ready sent
-    ${TEST_CASES_DIR}/ves-event-without-additional-fields
\ No newline at end of file
index 6c3ec29..b91a671 100644 (file)
@@ -7,7 +7,7 @@ Library           Collections
 ${GLOBAL_NBI_SERVER_PROTOCOL}   http
 ${GLOBAL_INJECTED_NBI_IP_ADDR}  localhost
 ${GLOBAL_NBI_SERVER_PORT}       8080
-${NBI_HEALTH_CHECK_PATH}        /nbi/api/v3/status
+${NBI_HEALTH_CHECK_PATH}        /nbi/api/v4/status
 ${NBI_ENDPOINT}                 ${GLOBAL_NBI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_NBI_IP_ADDR}:${GLOBAL_NBI_SERVER_PORT}
 
 *** Test Cases ***
diff --git a/tests/policy/xacml-pdp/data/onap.policies.monitoring.cdap.tca.hi.lo.app.json b/tests/policy/xacml-pdp/data/onap.policies.monitoring.cdap.tca.hi.lo.app.json
new file mode 100644 (file)
index 0000000..1d1a4d6
--- /dev/null
@@ -0,0 +1,223 @@
+{
+    "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+    "policy_types": [
+        {
+            "onap.policies.Monitoring": {
+                "derived_from": "tosca.policies.Root",
+                "description": "a base policy type for all policies that governs monitoring provisioning"
+            }
+        },
+        {
+            "onap.policies.monitoring.cdap.tca.hi.lo.app": {
+                "derived_from": "onap.policies.Monitoring",
+                "version": "1.0.0",
+                "properties": {
+                    "tca_policy": {
+                        "type": "map",
+                        "description": "TCA Policy JSON",
+                        "entry_schema": {
+                            "type": "onap.datatypes.monitoring.tca_policy"
+                        }
+                    }
+                }
+            }
+        }
+    ],
+    "data_types": [
+        {
+            "onap.datatypes.monitoring.metricsPerEventName": {
+                "derived_from": "tosca.datatypes.Root",
+                "properties": {
+                    "controlLoopSchemaType": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
+                        "constraints": [
+                            {
+                                "valid_values": [
+                                    "VM",
+                                    "VNF"
+                                ]
+                            }
+                        ]
+                    },
+                    "eventName": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Event name to which thresholds need to be applied"
+                    },
+                    "policyName": {
+                        "type": "string",
+                        "required": true,
+                        "description": "TCA Policy Scope Name"
+                    },
+                    "policyScope": {
+                        "type": "string",
+                        "required": true,
+                        "description": "TCA Policy Scope"
+                    },
+                    "policyVersion": {
+                        "type": "string",
+                        "required": true,
+                        "description": "TCA Policy Scope Version"
+                    },
+                    "thresholds": {
+                        "type": "list",
+                        "required": true,
+                        "description": "Thresholds associated with eventName",
+                        "entry_schema": {
+                            "type": "onap.datatypes.monitoring.thresholds"
+                        }
+                    }
+                }
+            }
+        },
+        {
+            "onap.datatypes.monitoring.tca_policy": {
+                "derived_from": "tosca.datatypes.Root",
+                "properties": {
+                    "domain": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Domain name to which TCA needs to be applied",
+                        "default": "measurementsForVfScaling",
+                        "constraints": [
+                            {
+                                "equal": "measurementsForVfScaling"
+                            }
+                        ]
+                    },
+                    "metricsPerEventName": {
+                        "type": "list",
+                        "required": true,
+                        "description": "Contains eventName and threshold details that need to be applied to given eventName",
+                        "entry_schema": {
+                            "type": "onap.datatypes.monitoring.metricsPerEventName"
+                        }
+                    }
+                }
+            }
+        },
+        {
+            "onap.datatypes.monitoring.thresholds": {
+                "derived_from": "tosca.datatypes.Root",
+                "properties": {
+                    "closedLoopControlName": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Closed Loop Control Name associated with the threshold"
+                    },
+                    "closedLoopEventStatus": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Closed Loop Event Status of the threshold",
+                        "constraints": [
+                            {
+                                "valid_values": [
+                                    "ONSET",
+                                    "ABATED"
+                                ]
+                            }
+                        ]
+                    },
+                    "direction": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Direction of the threshold",
+                        "constraints": [
+                            {
+                                "valid_values": [
+                                    "LESS",
+                                    "LESS_OR_EQUAL",
+                                    "GREATER",
+                                    "GREATER_OR_EQUAL",
+                                    "EQUAL"
+                                ]
+                            }
+                        ]
+                    },
+                    "fieldPath": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
+                        "constraints": [
+                            {
+                                "valid_values": [
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
+                                    "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
+                                    "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
+                                    "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
+                                    "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
+                                    "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
+                                    "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
+                                    "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
+                                    "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
+                                    "$.event.measurementsForVfScalingFields.meanRequestLatency",
+                                    "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
+                                    "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
+                                    "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
+                                    "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
+                                    "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
+                                    "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
+                                ]
+                            }
+                        ]
+                    },
+                    "severity": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Threshold Event Severity",
+                        "constraints": [
+                            {
+                                "valid_values": [
+                                    "CRITICAL",
+                                    "MAJOR",
+                                    "MINOR",
+                                    "WARNING",
+                                    "NORMAL"
+                                ]
+                            }
+                        ]
+                    },
+                    "thresholdValue": {
+                        "type": "integer",
+                        "required": true,
+                        "description": "Threshold value for the field Path inside CEF message"
+                    },
+                    "version": {
+                        "type": "string",
+                        "required": true,
+                        "description": "Version number associated with the threshold"
+                    }
+                }
+            }
+        }
+    ]
+}
\ No newline at end of file
diff --git a/tests/policy/xacml-pdp/data/onap.policy.monitoring.decision.request.json b/tests/policy/xacml-pdp/data/onap.policy.monitoring.decision.request.json
new file mode 100644 (file)
index 0000000..f79f4eb
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "ONAPName": "DCAE",
+  "ONAPComponent": "PolicyHandler",
+  "ONAPInstance": "622431a4-9dea-4eae-b443-3b2164639c64",
+  "action": "configure",
+  "resource": {
+      "policy-id": "onap.restart.tca"
+  }
+}
\ No newline at end of file
diff --git a/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.deploy.json b/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.deploy.json
new file mode 100644 (file)
index 0000000..c0d157c
--- /dev/null
@@ -0,0 +1 @@
+{"policies":[{"policy-id":"onap.restart.tca"}]}
\ No newline at end of file
diff --git a/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json b/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json
new file mode 100644 (file)
index 0000000..fac5cfa
--- /dev/null
@@ -0,0 +1,51 @@
+{
+    "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+    "topology_template": {
+        "policies": [
+            {
+                "onap.restart.tca": {
+                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "version": "1.0.0",
+                    "type_version": "1.0.0",
+                    "metadata": {
+                        "policy-id": "onap.restart.tca"
+                    },
+                    "properties": {
+                        "tca_policy": {
+                            "domain": "measurementsForVfScaling",
+                            "metricsPerEventName": [
+                                {
+                                    "eventName": "Measurement_vGMUX",
+                                    "controlLoopSchemaType": "VNF",
+                                    "policyScope": "DCAE",
+                                    "policyName": "DCAE.Config_tca-hi-lo",
+                                    "policyVersion": "v0.0.1",
+                                    "thresholds": [
+                                        {
+                                            "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
+                                            "version": "1.0.2",
+                                            "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
+                                            "thresholdValue": 0,
+                                            "direction": "EQUAL",
+                                            "severity": "MAJOR",
+                                            "closedLoopEventStatus": "ABATED"
+                                        },
+                                        {
+                                            "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
+                                            "version": "1.0.2",
+                                            "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
+                                            "thresholdValue": 0,
+                                            "direction": "GREATER",
+                                            "severity": "CRITICAL",
+                                            "closedLoopEventStatus": "ONSET"
+                                        }
+                                    ]
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        ]
+    }
+}
index 1a626c0..86463c3 100644 (file)
@@ -26,3 +26,110 @@ Statistics
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
      Should Be Equal As Strings    ${resp.json()['code']}  200
+     
+ExecuteXacmlPolicy
+     Wait Until Keyword Succeeds    2 min    5 sec    CreateMonitorPolicyType
+     Wait Until Keyword Succeeds    2 min    5 sec    CreateNewMonitorPolicy
+     Wait Until Keyword Succeeds    2 min    5 sec    DeployMonitorPolicy
+     Wait Until Keyword Succeeds    2 min    10 sec   GetDecision
+     
+*** Keywords ***
+
+CreateMonitorPolicyType
+     [Documentation]    Create Monitoring Policy Type
+     ${auth}=    Create List    healthcheck    zb!XztG34
+     ${postjson}=  Get file  ${CURDIR}/data/onap.policies.monitoring.cdap.tca.hi.lo.app.json
+     Log    Creating session https://${POLICY_API_IP}:6969
+     ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Post Request   policy  /policy/api/v1/policytypes  data=${postjson}   headers=${headers}
+     Log    Received response from policy2 ${resp.text}
+     Should Be Equal As Strings    ${resp.status_code}     200
+     ${postjsonobject}   To Json    ${postjson}
+     Dictionary Should Contain Key    ${resp.json()}    tosca_definitions_version
+     Dictionary Should Contain Key    ${postjsonobject}    tosca_definitions_version
+
+CreateNewMonitorPolicy
+     [Documentation]    Create a new Monitoring policy
+     ${auth}=    Create List    healthcheck    zb!XztG34
+     ${postjson}=  Get file  ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.json
+     Log    Creating session https://${POLICY_API_IP}:6969
+     ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Post Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies  data=${postjson}   headers=${headers}
+     Log    Received response from policy4 ${resp.text}
+     ${postjsonobject}   To Json    ${postjson}
+     Should Be Equal As Strings    ${resp.status_code}     200
+     Dictionary Should Contain Key    ${resp.json()}    tosca_definitions_version
+     Dictionary Should Contain Key    ${postjsonobject}    tosca_definitions_version
+
+DeployMonitorPolicy
+     [Documentation]   Runs Policy PAP to deploy a policy
+     ${auth}=    Create List    healthcheck    zb!XztG34
+     ${postjson}=  Get file  ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.deploy.json
+     Log    Creating session https://${POLICY_PAP_IP}:6969
+     ${session}=    Create Session      policy  https://${POLICY_PAP_IP}:6969   auth=${auth}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Post Request   policy  /policy/pap/v1/pdps/policies  data=${postjson}   headers=${headers}
+     Log    Received response from policy5 ${resp.text}
+     ${postjsonobject}   To Json    ${postjson}
+     Should Be Equal As Strings    ${resp.status_code}     200
+
+GetStatisticsAfterDeployed
+     [Documentation]    Runs Policy Xacml PDP Statistics after policy is deployed
+     ${auth}=    Create List    healthcheck    zb!XztG34 
+     Log    Creating session https://${POLICY_PDPX_IP}:6969
+     ${session}=    Create Session      policy  https://${POLICY_PDPX_IP}:6969   auth=${auth}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Get Request     policy  /policy/pdpx/v1/statistics     headers=${headers}
+     Log    Received response from policy ${resp.text}
+     Should Be Equal As Strings    ${resp.status_code}     200
+     Should Be Equal As Strings    ${resp.json()['code']}  200
+     Should Be Equal As Strings    ${resp.json()['totalPoliciesCount']     1
+     
+GetDecision
+    [Documentation]    Get Decision from Policy Xacml PDP
+     ${auth}=    Create List    healthcheck    zb!XztG34
+     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.decision.request.json
+     Log    Creating session https://${POLICY_PDPX_IP}:6969
+     ${session}=    Create Session      policy  https://${POLICY_PDPX_IP}:6969   auth=${auth}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Post Request     policy  /policy/pdpx/v1/decision  data=${postjson}   headers=${headers}
+     Log    Received response from policy ${resp.text}
+     Should Be Equal As Strings    ${resp.status_code}     200
+     
+GetStatisticsAfterDecision
+     [Documentation]    Runs Policy Xacml PDP Statistics after Decision request
+     ${auth}=    Create List    healthcheck    zb!XztG34 
+     Log    Creating session https://${POLICY_PDPX_IP}:6969
+     ${session}=    Create Session      policy  https://${POLICY_PDPX_IP}:6969   auth=${auth}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Get Request     policy  /policy/pdpx/v1/statistics     headers=${headers}
+     Log    Received response from policy ${resp.text}
+     Should Be Equal As Strings    ${resp.status_code}     200
+     Should Be Equal As Strings    ${resp.json()['code']}  200
+     Should Be Equal As Strings    ${resp.json()['totalDecisionsCount']     1
+     
+UndeployMonitorPolicy
+     [Documentation]    Runs Policy PAP to undeploy a policy
+     ${auth}=    Create List    healthcheck    zb!XztG34
+     Log    Creating session https://${POLICY_PAP_IP}:6969
+     ${session}=    Create Session      policy  https://${POLICY_PAP_IP}:6969   auth=${auth}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Delete Request     policy  /policy/pap/v1/pdps/policies/onap.restart.tca     headers=${headers}
+     Log    Received response from policy ${resp.text}
+     Should Be Equal As Strings    ${resp.status_code}     200
+     
+GetStatisticsAfterUndeploy
+     [Documentation]    Runs Policy Xacml PDP Statistics after policy is undeployed
+     ${auth}=    Create List    healthcheck    zb!XztG34 
+     Log    Creating session https://${POLICY_PDPX_IP}:6969
+     ${session}=    Create Session      policy  https://${POLICY_PDPX_IP}:6969   auth=${auth}
+     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
+     ${resp}=   Get Request     policy  /policy/pdpx/v1/statistics     headers=${headers}
+     Log    Received response from policy ${resp.text}
+     Should Be Equal As Strings    ${resp.status_code}     200
+     Should Be Equal As Strings    ${resp.json()['code']}  200
+     Should Be Equal As Strings    ${resp.json()['totalPoliciesCount']     0
+
+