Add PMSH CSITs
Signed-off-by: AndyWalshe <andy.walshe@est.tech>
Issue-ID: DCAEGEN2-1842
Change-Id: I69e824f9ed74137f217285381ab5efe55010f4dc
diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/cert.pem b/plans/dcaegen2-services-pmsh/testsuite/assets/cert.pem
new file mode 100644
index 0000000..1f789ba
--- /dev/null
+++ b/plans/dcaegen2-services-pmsh/testsuite/assets/cert.pem
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFbTCCA1WgAwIBAgIUWBWdddkqFoaTksLso+0fNNWSeKkwDQYJKoZIhvcNAQEL
+BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
+GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAgFw0yMDAyMTcxNjM2NTdaGA8yMDUw
+MDIwOTE2MzY1N1owRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx
+ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCCAiIwDQYJKoZIhvcN
+AQEBBQADggIPADCCAgoCggIBAM8+IPmw6dYR1zgtpjiiXQS3Z1sYcnH0fx5N2mUw
+nOENZu9OZxAcMzL+kPavcqTG3eF+0Ow9/vuzDqf15B+TuYFAbGw9iPUVl+k4SOeF
+vgaeJCUEQSfrIcq1AR4/CApVMK2jwHJ2zSUHkXxaNtRCD+wj5n5E1ljJvh3YCJmW
+MiS7DXxs/Mi0I85rRXcUOdmr14dqF0xlzWwAfoo43GSKnDIVRxzMtb6AqIZTMtk9
+0/0qkeju8eTMNEswtkOs4Q3vTqqkgeOaN4TXXO2x34waM2bCDDCBNzpYGSWs+pwo
+i3qOZRP/kZZWI9SwU5RUygpA/i9PGD1Wfxx6HIGzfmVAaJR5YH4ow9hM5xGkiV//
+BAb4C/3J3GTugfypsc+0/JRtlYoaNplHHqNRBcvqPq+G0Pfi9kYDrNw4iTGCxuHT
+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BUmGIUyVZYKZdtZgDcz8gEVyHVvReRegpWK4PqTK1Sp5V4AL+KsvtB/Lkk1
+WA==
+-----END CERTIFICATE-----
diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/initializerJson.json b/plans/dcaegen2-services-pmsh/testsuite/assets/initializerJson.json
new file mode 100644
index 0000000..222aafd
--- /dev/null
+++ b/plans/dcaegen2-services-pmsh/testsuite/assets/initializerJson.json
@@ -0,0 +1,185 @@
+[
+ {
+ "httpRequest": {
+ "path": "/service_component_all/.*"
+ },
+ "httpResponse": {
+ "statusCode": 200,
+ "headers": {
+ "content-type": [
+ "application/json"
+ ]
+ },
+ "body": {
+ "type": "JSON",
+ "json": {
+ "policy": {
+ "subscription": {
+ "subscriptionName": "ExtraPM-All-gNB-R2B",
+ "administrativeState": "UNLOCKED",
+ "fileBasedGP": 15,
+ "fileLocation": "/pm/pm.xml",
+ "nfTypeModelInvariantId": "2829292",
+ "nfFilter": {
+ "swVersions": [
+ "1.0.0",
+ "1.0.1"
+ ],
+ "nfNames": [
+ "^pnf.*",
+ "^vnf.*"
+ ]
+ },
+ "measurementGroups": [
+ {
+ "measurementGroup": {
+ "measurementTypes": [
+ {
+ "measurementType": "countera"
+ },
+ {
+ "measurementType": "counterb"
+ }
+ ],
+ "managedObjectDNsBasic": [
+ {
+ "DN": "dna"
+ },
+ {
+ "DN": "dnb"
+ }
+ ]
+ }
+ },
+ {
+ "measurementGroup": {
+ "measurementTypes": [
+ {
+ "measurementType": "counterc"
+ },
+ {
+ "measurementType": "counterd"
+ }
+ ],
+ "managedObjectDNsBasic": [
+ {
+ "DN": "dnc"
+ },
+ {
+ "DN": "dnd"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "config": {
+ "cert_path": "/opt/app/pmsh/etc/certs/cert.pem",
+ "streams_publishes": {
+ "policy_pm_publisher": {
+ "dmaap_info": {
+ "client_id": "1475976809466",
+ "client_role": "org.onap.dcae.pmPublisher",
+ "topic_url": "https://node:30226/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+ "location": "san-francisco"
+ },
+ "type": "message_router"
+ },
+ "other_publisher": {
+ "dmaap_info": {
+ "location": "san-francisco",
+ "topic_url": "https://node:30226/events/org.onap.dmaap.mr.SOME_OTHER_TOPIC",
+ "client_role": "org.onap.dcae.pmControlPub",
+ "client_id": "1875976809466"
+ },
+ "type": "message_router"
+ }
+ },
+ "streams_subscribes": {
+ "aai_subscriber": {
+ "type": "message_router",
+ "dmaap_info": {
+ "client_id": "1575976809466",
+ "client_role": "org.onap.dcae.aaiSub",
+ "topic_url": "https://node:30226/events/AAI_EVENT",
+ "location": "san-francisco"
+ }
+ },
+ "policy_pm_subscriber": {
+ "dmaap_info": {
+ "location": "san-francisco",
+ "topic_url": "https://node:30226/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+ "client_role": "org.onap.dcae.pmSubscriber",
+ "client_id": "1575876809456"
+ },
+ "type": "message_router"
+ }
+ },
+ "key_path": "/opt/app/pmsh/etc/certs/key.pem",
+ "aaf_identity": "dcae@dcae.onap.org",
+ "aaf_password": "demo123456!"
+ }
+ }
+ }
+ }
+ },
+ {
+ "httpRequest": {
+ "path": "/aai/v16/query.*"
+ },
+ "httpResponse": {
+ "statusCode": 200,
+ "headers": {
+ "content-type": [
+ "application/json"
+ ]
+ },
+ "body": {
+ "type": "JSON",
+ "json": {
+ "results": [
+ {
+ "id": "327736",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/pnf207",
+ "properties": {
+ "pnf-name": "pnf207",
+ "pnf-id": "55e57cd1-ab8b-40cd-97d5-cfc774fef616",
+ "equip-type": "val8",
+ "equip-vendor": "Nokia",
+ "equip-model": "val6",
+ "ipaddress-v4-oam": "10.10.10.26",
+ "sw-version": "val7",
+ "in-maint": false,
+ "serial-number": "6061ZW3",
+ "ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
+ "resource-version": "1573066346347",
+ "nf-role": "gNB"
+ }
+ },
+ {
+ "id": "241864",
+ "node-type": "generic-vnf",
+ "url": "/aai/v16/network/generic-vnfs/generic-vnf/1083ecbb-f3b3-49da-b5f5-b5962140ee99",
+ "properties": {
+ "vnf-id": "1083ecbb-f3b3-49da-b5f5-b5962140ee99",
+ "vnf-name": "vnf",
+ "vnf-type": "demoVCPEvBNG/vCPE_vbng 5eb5661a-0cb6 0",
+ "service-id": "2db01c96-4baa-4393-8d79-af8d7bf4698e",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Inventoried",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1575541662410",
+ "model-invariant-id": "7129e420-d396-4efb-af02-6b83499b12f8",
+ "model-version-id": "e80a6ae3-cafd-4d24-850d-e14c084a5ca9",
+ "model-customization-id": "376dbe87-e9c5-4f2b-80e2-a420b373ee87"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+]
diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/key.pem b/plans/dcaegen2-services-pmsh/testsuite/assets/key.pem
new file mode 100644
index 0000000..eddafc1
--- /dev/null
+++ b/plans/dcaegen2-services-pmsh/testsuite/assets/key.pem
@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQDPPiD5sOnWEdc4
+LaY4ol0Et2dbGHJx9H8eTdplMJzhDWbvTmcQHDMy/pD2r3Kkxt3hftDsPf77sw6n
+9eQfk7mBQGxsPYj1FZfpOEjnhb4GniQlBEEn6yHKtQEePwgKVTCto8Byds0lB5F8
+WjbUQg/sI+Z+RNZYyb4d2AiZljIkuw18bPzItCPOa0V3FDnZq9eHahdMZc1sAH6K
+ONxkipwyFUcczLW+gKiGUzLZPdP9KpHo7vHkzDRLMLZDrOEN706qpIHjmjeE11zt
+sd+MGjNmwgwwgTc6WBklrPqcKIt6jmUT/5GWViPUsFOUVMoKQP4vTxg9Vn8cehyB
+s35lQGiUeWB+KMPYTOcRpIlf/wQG+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CMsSmCy4Hp
+7yY3aTniYpVp4dSCpave3J3XtgCTVWDPF+BR9dJxTeV0PBi38EVWYYQdbsVPu6o+
+UEiXFD5CKao3cVPfojDCE6jG76i26llKts6XkmKAdFTdEK9Jbn8vRmfcfRefqtAF
+fPnLmKBfncE0i8dm4KmvNk7lhD1aP3HArtOpU1EqwcvjZD4Z7N0/9M0xA/2mJfdT
+Tn13Bx9v6lw0llP+SPqc+aJ6un63dl38t5Ao8NiMmdcfhXlCzS+hPFI+z4XVwcGp
+eRiRiNvMwY+CL8b1S6Z20aZ/eTZ8PZukLogGkKbtEj2+3DMNXvlxy5ySrELG+woy
+LmgHbwKCAQB7OblCZS4Uw56c8o3zJA7ctn4t2YvOGHSXjtva5XP5duezuBiQ9si2
+TpWej2sJiEuxGusz1SblRnWFeanllyIYl9qIEBxOWLCVw6YZDtu/XysH5miAk5Qi
+RRHSt9MfKBgN4OkPSBCkB+ySk/T9in4muUVSd+OwToCKKZv4rgpu+hDn7U3bbzTV
+rX/cdAJnlkzAT4PsrnqoLr8jb2lGpXTm8xsW0wJWa6gzGC2kHHEsUbo0k3Vu1Uaz
+6yBjLYXBP7txiHjkLmoPlXfzEh6ls5yFsg8Yb63NRS0T1Kvb3U1edrf78axK1JBD
+hbGjpWWdg2ta42RD3MB/wgEAesncd+r4
+-----END PRIVATE KEY-----
diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/mockserver.properties b/plans/dcaegen2-services-pmsh/testsuite/assets/mockserver.properties
new file mode 100644
index 0000000..9c59230
--- /dev/null
+++ b/plans/dcaegen2-services-pmsh/testsuite/assets/mockserver.properties
@@ -0,0 +1,26 @@
+#######################################
+# MockServer & Proxy Example Settings #
+#######################################
+
+# Socket & Port Settings
+
+# socket timeout in milliseconds (default 120000)
+mockserver.maxSocketTimeout=120000
+
+# Certificate Generation
+
+# delete KeyStore file on JVM shutdown (default true)
+mockserver.deleteGeneratedKeyStoreOnExit=true
+# certificate domain name (default "localhost")
+mockserver.sslCertificateDomainName=localhost
+# comma separated list of domain names for Subject Alternative Name domain names (default empty list)
+mockserver.sslSubjectAlternativeNameDomains=www.example.com,www.another.com
+# comma separated list of ip addresses for Subject Alternative Name ips (default empty list)
+mockserver.sslSubjectAlternativeNameIps=127.0.0.1
+
+# CORS
+
+# enable CORS for MockServer REST API
+mockserver.enableCORSForAPI=true
+# enable CORS for all responses
+mockserver.enableCORSForAllResponses=true
diff --git a/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml b/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml
new file mode 100644
index 0000000..4ea89dc
--- /dev/null
+++ b/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml
@@ -0,0 +1,48 @@
+version: '3.3'
+
+services:
+ mockserver:
+ container_name: mockserver
+ image: mockserver/mockserver:mockserver-5.9.0
+ environment:
+ MOCKSERVER_PROPERTY_FILE: /config/mockserver.properties
+ MOCKSERVER_INITIALIZATION_JSON_PATH: /config/initializerJson.json
+ volumes:
+ - ./assets/mockserver.properties:/config/mockserver.properties
+ - ./assets/initializerJson.json:/config/initializerJson.json
+ networks:
+ pmsh-network:
+
+ db:
+ container_name: db
+ image: postgres
+ restart: always
+ environment:
+ POSTGRES_PASSWORD: $DB_PASSWORD
+ POSTGRES_USER: $DB_USER
+ networks:
+ pmsh-network:
+
+ pmsh:
+ container_name: pmsh
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pmsh
+ depends_on:
+ - db
+ volumes:
+ - ./assets/cert.pem:/opt/app/pmsh/etc/certs/cert.pem
+ - ./assets/key.pem:/opt/app/pmsh/etc/certs/key.pem
+ environment:
+ HOSTNAME: "dcae-pmsh"
+ CONFIG_BINDING_SERVICE_SERVICE_HOST: mockserver
+ CONFIG_BINDING_SERVICE_SERVICE_PORT: 1080
+ PMSH_PG_URL: db
+ PMSH_PG_USERNAME: $DB_USER
+ PMSH_PG_PASSWORD: $DB_PASSWORD
+ AAI_SERVICE_HOST: mockserver
+ AAI_SERVICE_PORT_AAI_SSL: 1080
+ networks:
+ pmsh-network:
+
+networks:
+ pmsh-network:
+ driver: bridge
diff --git a/plans/dcaegen2-services-pmsh/testsuite/setup.sh b/plans/dcaegen2-services-pmsh/testsuite/setup.sh
new file mode 100644
index 0000000..c70e02a
--- /dev/null
+++ b/plans/dcaegen2-services-pmsh/testsuite/setup.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+# Place the scripts in run order:
+source ${SCRIPTS}/common_functions.sh
+
+export DB_USER=pmsh
+export DB_PASSWORD=pmsh
+
+docker login -u docker -p docker nexus3.onap.org:10001
+
+TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-pmsh/testsuite
+
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d mockserver db
+
+# Slow machine running CSITs can affect db coming up in time for PMSH
+echo "Waiting for postgres db to come up..."
+for i in {1..30}; do
+ docker exec -i db bash -c "PGPASSWORD=$DB_PASSWORD;psql -U $DB_USER -c '\q'"
+ db_response=$?
+ if [ "$db_response" = "0" ]
+ then
+ break
+ else
+ sleep 2
+ fi
+done
+[ "$db_response" != "0" ] && echo "Error: postgres db not accessible" && exit 1
+
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d pmsh
+
+PMSH_IP=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" pmsh)
+
+# Slow machine running CSITs can affect PMSH coming up before CSITs are run
+echo "Waiting for PMSH to come up..."
+for i in {1..30}; do
+ pmsh_response=$(curl -k -s -o /dev/null -w "%{http_code}" https://$PMSH_IP:8443/healthcheck)
+ if [ "$pmsh_response" = "200" ]
+ then
+ break
+ else
+ sleep 2
+ fi
+done
+[ "$pmsh_response" != "200" ] && echo "Error: PMSH container state not healthy" && exit 1
+
+# Wait for initialization of Docker containers
+containers_ok=false
+for i in {1..5}; do
+ if [ $(docker inspect --format '{{ .State.Running }}' mockserver) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' db) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' pmsh) ]
+ then
+ echo "All required docker containers are up."
+ containers_ok=true
+ break
+ else
+ sleep $i
+ fi
+done
+[ "$containers_ok" = "false" ] && echo "Error: required container not running." && exit 1
+
+#Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v PMSH_IP:${PMSH_IP}"
diff --git a/plans/dcaegen2-services-pmsh/testsuite/teardown.sh b/plans/dcaegen2-services-pmsh/testsuite/teardown.sh
new file mode 100644
index 0000000..c5bac31
--- /dev/null
+++ b/plans/dcaegen2-services-pmsh/testsuite/teardown.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+echo "Starting teardown script"
+TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-pmsh/testsuite
+mkdir -p $WORKSPACE/archives
+docker exec pmsh /bin/sh -c "ls -l /var/log/ONAP/dcaegen2/services/pmsh/"
+docker exec pmsh /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pmsh/*"
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml logs --no-color > $WORKSPACE/archives/pmsh-docker-compose.log
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml down -v
diff --git a/plans/dcaegen2-services-pmsh/testsuite/testplan.txt b/plans/dcaegen2-services-pmsh/testsuite/testplan.txt
new file mode 100644
index 0000000..3bf1dd6
--- /dev/null
+++ b/plans/dcaegen2-services-pmsh/testsuite/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+dcaegen2-services-pmsh/testcases