Merge "Add CSIT for son-handler"
authorMorgan Richomme <morgan.richomme@orange.com>
Thu, 20 Aug 2020 09:15:29 +0000 (09:15 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 20 Aug 2020 09:15:29 +0000 (09:15 +0000)
90 files changed:
plans/dcaegen2-services-pmsh/testsuite/assets/mr_sim/mr-initializer.json
plans/modeling-etsicatalog/sanity-check/setup.sh
plans/oom-platform-cert-service/certservice/certs/Makefile [moved from plans/aaf/certservice/certs/Makefile with 93% similarity]
plans/oom-platform-cert-service/certservice/cmpServers.json [moved from plans/aaf/certservice/cmpServers.json with 76% similarity]
plans/oom-platform-cert-service/certservice/docker-compose.yml [moved from plans/aaf/certservice/docker-compose.yml with 58% similarity]
plans/oom-platform-cert-service/certservice/scripts/ejbca-configuration.sh [moved from plans/aaf/certservice/scripts/ejbca-configuration.sh with 100% similarity]
plans/oom-platform-cert-service/certservice/setup.sh [moved from plans/aaf/certservice/setup.sh with 69% similarity]
plans/oom-platform-cert-service/certservice/teardown.sh [moved from plans/aaf/certservice/teardown.sh with 85% similarity]
plans/oom-platform-cert-service/certservice/testplan.txt [moved from plans/aaf/certservice/testplan.txt with 73% similarity]
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/cds/resources/aai.cert
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/pnf-sw-upgrade.yang
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/startup.xml
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/aai-certificate/aai.cert [changed mode: 0755->0644]
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/root-certificate/root.crt [new file with mode: 0644]
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/docker-compose.yml
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/application.yaml
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/keystore.p12 [new file with mode: 0644]
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/org.onap.so.p12 [deleted file]
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/org.onap.so.trust.jks [deleted file]
plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/truststore.jks [new file with mode: 0644]
plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh
plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh
plans/vfc-gvnfm-vnfres/sanity-check/setup.sh
plans/vfc-nfvo-lcm/sanity-check/setup.sh
tests/aaf/certservice/resources/cert-service-properties.robot [deleted file]
tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json [deleted file]
tests/dcaegen2-services-pmsh/testcases/pmsh.robot
tests/dcaegen2/testcases/02__cert_basic_auth_tests.robot
tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json
tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-FaultSupervision.json
tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Heartbeat.json
tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-PerformanceAssurance.json
tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning.json
tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_namespace.json
tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_missing_namespace.json
tests/dcaegen2/testcases/resources/DMaaP.py [deleted file]
tests/dcaegen2/testcases/resources/DcaeLibrary.py [deleted file]
tests/dcaegen2/testcases/resources/collector.properties
tests/dcaegen2/testcases/resources/dcae_keywords.robot
tests/dcaegen2/testcases/resources/dcae_properties.robot
tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py [moved from tests/dcaegen2/testcases/resources/CertsLibrary.py with 100% similarity]
tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/DcaeVariables.py [moved from tests/dcaegen2/testcases/resources/DcaeVariables.py with 86% similarity]
tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/README.md [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/__init__.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPQueue.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/__init__.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/dmaap_test/__init__.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/dmaap_test/requirements.txt [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSQueue.py [new file with mode: 0644]
tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSimulator.py [new file with mode: 0644]
tests/oom-platform-cert-service/certservice/assets/invalid.csr [moved from tests/aaf/certservice/assets/invalid.csr with 100% similarity]
tests/oom-platform-cert-service/certservice/assets/invalid.key [moved from tests/aaf/certservice/assets/invalid.key with 100% similarity]
tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env [moved from tests/aaf/certservice/assets/invalid_client_docker.env with 55% similarity]
tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env [moved from tests/aaf/certservice/assets/invalid_client_docker_output_type.env with 62% similarity]
tests/oom-platform-cert-service/certservice/assets/valid_client.csr [moved from tests/aaf/certservice/assets/valid_client.csr with 100% similarity]
tests/oom-platform-cert-service/certservice/assets/valid_client.pk [moved from tests/aaf/certservice/assets/valid_client.pk with 100% similarity]
tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env [moved from tests/aaf/certservice/assets/valid_client_docker.env with 55% similarity]
tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env [moved from tests/aaf/certservice/assets/valid_client_docker_jks.env with 62% similarity]
tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env [moved from tests/aaf/certservice/assets/valid_client_docker_p12.env with 62% similarity]
tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env [moved from tests/aaf/certservice/assets/valid_client_docker_pem.env with 62% similarity]
tests/oom-platform-cert-service/certservice/assets/valid_ra.csr [moved from tests/aaf/certservice/assets/valid_ra.csr with 100% similarity]
tests/oom-platform-cert-service/certservice/assets/valid_ra.pk [moved from tests/aaf/certservice/assets/valid_ra.pk with 100% similarity]
tests/oom-platform-cert-service/certservice/cert-service-test.robot [moved from tests/aaf/certservice/cert-service-test.robot with 87% similarity]
tests/oom-platform-cert-service/certservice/libraries/ArtifactParser.py [moved from tests/aaf/certservice/libraries/ArtifactParser.py with 100% similarity]
tests/oom-platform-cert-service/certservice/libraries/CertClientManager.py [moved from tests/aaf/certservice/libraries/CertClientManager.py with 94% similarity]
tests/oom-platform-cert-service/certservice/libraries/EnvsReader.py [moved from tests/aaf/certservice/libraries/EnvsReader.py with 100% similarity]
tests/oom-platform-cert-service/certservice/libraries/JksArtifactsValidator.py [moved from tests/aaf/certservice/libraries/JksArtifactsValidator.py with 100% similarity]
tests/oom-platform-cert-service/certservice/libraries/P12ArtifactsValidator.py [moved from tests/aaf/certservice/libraries/P12ArtifactsValidator.py with 100% similarity]
tests/oom-platform-cert-service/certservice/libraries/PemArtifactsValidator.py [moved from tests/aaf/certservice/libraries/PemArtifactsValidator.py with 100% similarity]
tests/oom-platform-cert-service/certservice/resources/cert-service-keywords.robot [moved from tests/aaf/certservice/resources/cert-service-keywords.robot with 99% similarity]
tests/oom-platform-cert-service/certservice/resources/cert-service-properties.robot [new file with mode: 0644]
tests/policy/api/api-test.robot
tests/policy/api/data/onap.policy.monitoring.tcagen2.v1.json [moved from tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json with 99% similarity]
tests/policy/api/data/onap.policy.monitoring.tcagen2.v2.json [moved from tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json with 99% similarity]
tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json
tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json
tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json
tests/policy/pap/data/create.group.request.json
tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json
tests/policy/pap/pap-test.robot
tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json
tests/policy/xacml-pdp/xacml-pdp-test.robot

index 6b12a83..6c2c480 100644 (file)
@@ -1,7 +1,7 @@
 [
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -13,7 +13,7 @@
           "application/json"
         ]
       },
-      "body": "{}"
+      "body": []
     }
   },
   {
           "application/json"
         ]
       },
-      "body": {
-        "type": "JSON",
-        "json": {}
-      }
+      "body": []
     }
   },
   {
     "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
+      "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
           "application/json"
         ]
       },
-      "body": {
-        "type": "JSON",
-        "json": {}
-      }
+      "body": []
     }
   }
 ]
index e713af2..2e49416 100644 (file)
@@ -33,7 +33,7 @@ docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP -e "
 MSB_IP==`get-instance-ip.sh msb_internal_apigateway`
 echo MSB_IP=${MSB_IP}
 
-docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql -e MYSQL_ROOT_PASSWORD=root nexus3.onap.org:10001/library/mariadb
+docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql -e MYSQL_USER="etsicatalog" -e MYSQL_PASSWORD="etsicatalog" -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE="etsicatalog" nexus3.onap.org:10001/library/mariadb
 DB_IP=`get-instance-ip.sh vfc-db`
 echo DB_IP=${DB_IP}
 
@@ -56,7 +56,7 @@ echo sleep 60
 sleep 60
 
 # start modeling-etsicatalog
-docker run -d --name modeling-etsicatalog -v /var/lib/mysql -e MSB_ADDR=${DISCOVERY_IP}:10081 -e MYSQL_ADDR=${DB_IP}:3306 nexus3.onap.org:10001/onap/modeling/etsicatalog
+docker run -d --name modeling-etsicatalog -v /var/lib/mysql -e MSB_ADDR=${DISCOVERY_IP}:10081 -e DB_IP=${DB_IP} nexus3.onap.org:10001/onap/modeling/etsicatalog
 EtsiCatalog_IP=`get-instance-ip.sh modeling-etsicatalog`
 for i in {1..10}; do
     curl -sS -m 1 ${EtsiCatalog_IP}:8806 && break
@@ -63,16 +63,16 @@ step_8:
 #Generate certService private and public keys
 step_9:
        @echo "Generate certService private and public keys"
-       keytool -genkeypair -v -alias aaf-cert-service -keyalg RSA -keysize 2048 -validity 730 \
+       keytool -genkeypair -v -alias oom-cert-service -keyalg RSA -keysize 2048 -validity 730 \
     -keystore certServiceServer-keystore.jks -storetype JKS \
-    -dname "CN=aaf-cert-service,OU=certServiceServer company,O=certServiceServer org,L=Wroclaw,ST=Dolny Slask,C=PL" \
+    -dname "CN=oom-cert-service,OU=certServiceServer company,O=certServiceServer org,L=Wroclaw,ST=Dolny Slask,C=PL" \
     -keypass secret -storepass secret -ext BasicConstraints:critical="ca:false"
        @echo "####done####"
 
 #Generate certificate signing request for certService
 step_10:
        @echo "Generate certificate signing request for certService"
-       keytool -certreq -keystore certServiceServer-keystore.jks -alias aaf-cert-service -storepass secret -file certServiceServer.csr
+       keytool -certreq -keystore certServiceServer-keystore.jks -alias oom-cert-service -storepass secret -file certServiceServer.csr
        @echo "####done####"
 
 #Sign certService certificate by root CA
@@ -80,7 +80,7 @@ step_11:
        @echo "Sign certService certificate by root CA"
        keytool -gencert -v -keystore root-keystore.jks -storepass secret -alias root -infile certServiceServer.csr \
     -outfile certServiceServerByRoot.crt -rfc -ext bc=0  -ext ExtendedkeyUsage="serverAuth,clientAuth" \
-    -ext SubjectAlternativeName:="DNS:aaf-cert-service,DNS:localhost"
+    -ext SubjectAlternativeName:="DNS:oom-cert-service,DNS:localhost"
        @echo "####done####"
 
 #Import root certificate into server
@@ -92,7 +92,7 @@ step_12:
 #Import signed certificate into certService
 step_13:
        @echo "Import signed certificate into certService"
-       keytool -importcert -file certServiceServerByRoot.crt -destkeystore certServiceServer-keystore.jks -alias aaf-cert-service \
+       keytool -importcert -file certServiceServerByRoot.crt -destkeystore certServiceServer-keystore.jks -alias oom-cert-service \
     -storepass secret -noprompt
        @echo "####done####"
 
@@ -2,7 +2,7 @@
   "cmpv2Servers": [
     {
       "caName": "Client",
-      "url": "http://aafcert-ejbca:8080/ejbca/publicweb/cmp/cmp",
+      "url": "http://oomcert-ejbca:8080/ejbca/publicweb/cmp/cmp",
       "issuerDN": "CN=ManagementCA",
       "caMode": "CLIENT",
       "authentication": {
@@ -12,7 +12,7 @@
     },
     {
       "caName": "RA",
-      "url": "http://aafcert-ejbca:8080/ejbca/publicweb/cmp/cmpRA",
+      "url": "http://oomcert-ejbca:8080/ejbca/publicweb/cmp/cmpRA",
       "issuerDN": "CN=ManagementCA",
       "caMode": "RA",
       "authentication": {
@@ -4,7 +4,7 @@ services:
   ejbca:
     image: primekey/ejbca-ce:6.15.2.5
     hostname: cahostname
-    container_name: aafcert-ejbca
+    container_name: oomcert-ejbca
     ports:
       - "80:8080"
       - "443:8443"
@@ -18,22 +18,22 @@ services:
     networks:
       - certservice
 
-  aaf-cert-service:
-    image: nexus3.onap.org:10001/onap/org.onap.aaf.certservice.aaf-certservice-api:latest
+  oom-cert-service:
+    image: nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-api:latest
     volumes:
-      - $CONFIGURATION_PATH:/etc/onap/aaf/certservice/cmpServers.json
-      - ./certs/truststore.jks:/etc/onap/aaf/certservice/certs/truststore.jks
-      - ./certs/root.crt:/etc/onap/aaf/certservice/certs/root.crt
-      - ./certs/certServiceServer-keystore.jks:/etc/onap/aaf/certservice/certs/certServiceServer-keystore.jks
-      - ./certs/certServiceServer-keystore.p12:/etc/onap/aaf/certservice/certs/certServiceServer-keystore.p12
-    container_name: aafcert-service
+      - $CONFIGURATION_PATH:/etc/onap/oom/certservice/cmpServers.json
+      - ./certs/truststore.jks:/etc/onap/oom/certservice/certs/truststore.jks
+      - ./certs/root.crt:/etc/onap/oom/certservice/certs/root.crt
+      - ./certs/certServiceServer-keystore.jks:/etc/onap/oom/certservice/certs/certServiceServer-keystore.jks
+      - ./certs/certServiceServer-keystore.p12:/etc/onap/oom/certservice/certs/certServiceServer-keystore.p12
+    container_name: oomcert-service
     ports:
       - "8443:8443"
     depends_on:
       ejbca:
         condition: service_healthy
     healthcheck:
-      test: ["CMD-SHELL", "curl https://localhost:8443/actuator/health --cacert /etc/onap/aaf/certservice/certs/root.crt --cert-type p12 --cert /etc/onap/aaf/certservice/certs/certServiceServer-keystore.p12 --pass secret"]
+      test: ["CMD-SHELL", "curl https://localhost:8443/actuator/health --cacert /etc/onap/oom/certservice/certs/root.crt --cert-type p12 --cert /etc/onap/oom/certservice/certs/certServiceServer-keystore.p12 --pass secret"]
       interval: 10s
       timeout: 3s
       retries: 15
similarity index 69%
rename from plans/aaf/certservice/setup.sh
rename to plans/oom-platform-cert-service/certservice/setup.sh
index 1200e96..bee54cd 100644 (file)
@@ -20,7 +20,7 @@
 
 SCRIPT=`realpath $0`
 CURRENT_WORKDIR_PATH=`dirname $SCRIPT`
-PROJECT_DIRECTORY="plans/aaf/certservice"
+PROJECT_DIRECTORY="plans/oom-platform-cert-service/certservice"
 
 SCRIPTS_DIRECTORY="scripts"
 
@@ -75,35 +75,35 @@ export CONFIGURATION_PATH=${CONFIGURATION_PATH}
 export SCRIPTS_PATH=${SCRIPTS_PATH}
 
 #Generate keystores, truststores, certificates and keys
-mkdir -p ${WORKSPACE}/tests/aaf/certservice/assets/certs/
+mkdir -p ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/
 make all -C ./certs/
-cp ${WORKSPACE}/plans/aaf/certservice/certs/root.crt ${WORKSPACE}/tests/aaf/certservice/assets/certs/root.crt
+cp ${WORKSPACE}/plans/oom-platform-cert-service/certservice/certs/root.crt ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/root.crt
 echo "Generated keystores"
-openssl pkcs12 -in ${WORKSPACE}/plans/aaf/certservice/certs/certServiceServer-keystore.p12 -clcerts -nokeys -password pass:secret | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ${WORKSPACE}/tests/aaf/certservice/assets/certs/certServiceServer.crt
+openssl pkcs12 -in ${WORKSPACE}/plans/oom-platform-cert-service/certservice/certs/certServiceServer-keystore.p12 -clcerts -nokeys -password pass:secret | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/certServiceServer.crt
 echo "Generated server certificate"
-openssl pkcs12 -in ${WORKSPACE}/plans/aaf/certservice/certs/certServiceServer-keystore.p12 -nocerts -nodes -password pass:secret| sed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' > ${WORKSPACE}/tests/aaf/certservice/assets/certs/certServiceServer.key
+openssl pkcs12 -in ${WORKSPACE}/plans/oom-platform-cert-service/certservice/certs/certServiceServer-keystore.p12 -nocerts -nodes -password pass:secret| sed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' > ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/certServiceServer.key
 echo "Generated server key"
 
 docker-compose up -d
 
-AAFCERT_IP='none'
+OOMCERT_IP='none'
 # Wait container ready
 for i in {1..9}
 do
-   AAFCERT_IP=`get-instance-ip.sh aafcert-service`
+   OOMCERT_IP=`get-instance-ip.sh oomcert-service`
    RESP_CODE=$(curl -s https://localhost:8443/actuator/health --cacert ./certs/root.crt --cert-type p12 --cert ./certs/certServiceServer-keystore.p12 --pass secret | \
    python2 -c 'import json,sys;obj=json.load(sys.stdin);print obj["status"]')
    if [[ "$RESP_CODE" == "UP" ]]; then
-       echo 'AAF Cert Service is ready'
-       export AAFCERT_IP=${AAFCERT_IP}
-       docker exec aafcert-ejbca /opt/primekey/scripts/ejbca-configuration.sh
+       echo 'OOM Cert Service is ready'
+       export OOMCERT_IP=${OOMCERT_IP}
+       docker exec oomcert-ejbca /opt/primekey/scripts/ejbca-configuration.sh
        break
    fi
-   echo 'Waiting for AAF Cert Service to start up...'
+   echo 'Waiting for OOM Cert Service to start up...'
    sleep 30s
 done
 
-if [ "$AAFCERT_IP" == 'none' -o "$AAFCERT_IP" == '' ]; then
-    echo "AAF Cert Service is not ready!"
+if [ "$OOMCERT_IP" == 'none' -o "$OOMCERT_IP" == '' ]; then
+    echo "OOM Cert Service is not ready!"
     exit 1 # Return error code
 fi
similarity index 85%
rename from plans/aaf/certservice/teardown.sh
rename to plans/oom-platform-cert-service/certservice/teardown.sh
index 71e20b7..f531180 100644 (file)
@@ -19,7 +19,7 @@ docker-compose down
 
 make clear -C ./certs/
 echo "Removed old keystores"
-rm -rf ${WORKSPACE}/tests/aaf/certservice/assets/certs
+rm -rf ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs
 echo "Removed old certificates"
 
 kill-instance.sh ${ClientContainerName}
\ No newline at end of file
similarity index 73%
rename from plans/aaf/certservice/testplan.txt
rename to plans/oom-platform-cert-service/certservice/testplan.txt
index 270fc6d..ed9ee12 100755 (executable)
@@ -1,3 +1,3 @@
 # Test suites are relative paths under [integration/csit.git]/tests/.
 # Place the suites in run order.
-aaf/certservice
+oom-platform-cert-service/certservice
index 9acb8bb..266a8f2 100755 (executable)
@@ -1,31 +1,36 @@
 Bag Attributes
-    friendlyName: so@so.onap.org
-    localKeyID: 54 69 6D 65 20 31 35 36 34 30 35 32 33 31 34 37 38 3
-subject=CN = aai-simulator, emailAddress = , OU = so@so.onap.org, OU = OSAAF, O = ONAP, C = US
+    friendlyName: aai-cert
+    localKeyID: 59 C6 CE 53 FF 25 7B 6F 86 4D E4 3A 2D EB 48 98 E0 20 B9 5
+subject=C = US, O = ONAP, OU = OSAAF, CN = aai-simulator
 
-issuer=C = US, O = ONAP, OU = OSAAF, CN = intermediateCA_9
+issuer=C = US, O = ONAP, OU = OSAAF, CN = intermediate
 
 -----BEGIN CERTIFICATE-----
-MIIEBzCCAu+gAwIBAgIIdC1kel7DdnYwDQYJKoZIhvcNAQELBQAwRzELMAkGA1UE
-BhMCVVMxDTALBgNVBAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRkwFwYDVQQDDBBp
-bnRlcm1lZGlhdGVDQV85MB4XDTE5MDcyNTEwNTgzNFoXDTIwMDcyNTEwNTgzNFow
-bjEWMBQGA1UEAwwNYWFpLXNpbXVsYXRvcjEPMA0GCSqGSIb3DQEJARYAMRcwFQYD
-VQQLDA5zb0Bzby5vbmFwLm9yZzEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoMBE9O
-QVAxCzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
-185xCE6cmsY6XB5Dd/5GlfuWjN05KKk3akymxhbJLa9ektlusmuTPt4cnxD+e4b6
-dymqHzQ6C206TBK1jaDzcF07Ag7VTpxmlgaSukQ+aZoXfIcs80lWCLnNvC2MrOuh
-9uhUILAmuddo01cIHJvti5R2g6BEirCGsVKBSwmXRotxHyzUg9IwOpeGy0G1ZDjU
-OiMqY5qOonVTEz1AganctdiWK1/eZ5IBD7gQwckS5n1a6RYMVSnr1vKLoiZq76Bp
-wKy3EBX16jlmQMC5Aj9/GDezJg0bPvlikL3VUsC76DRShucsxS3SzVxeAJ5nsH8S
-qUElpbe3uabhFG2qKmtvdwIDAQABo4HPMIHMMAkGA1UdEwQCMAAwDgYDVR0PAQH/
-BAQDAgXgMCAGA1UdJQEB/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBUBgNVHSME
-TTBLgBSB95lbELnIjN7zUl7qTmmgQz6s3aEwpC4wLDEOMAwGA1UECwwFT1NBQUYx
-DTALBgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTggEHMB0GA1UdDgQWBBSQ54p+SID0
-2p21lUHY9YC1ZZfkZTAYBgNVHREEETAPgg1hYWktc2ltdWxhdG9yMA0GCSqGSIb3
-DQEBCwUAA4IBAQBRGK6Iyjc/0bC3+qjPuNwSlu1pUcgHtgxP/oTU5f9xMSkSjIP0
-weVnIEGOwlW8GRbDPQza14AHETTxJ17rv6p6h7l/dZZmbMPl2S+QXGptgDWR6zY7
-q5ROecGcQzgto6lTMcKgBMW+ct3Tb3khMqP6ewzGz85SY7BgyVE7HFG9M5BM3NhX
-ovAcj93C24DFKLDKxHrrsVIROlFk6QW2+kb0zo1YzVc6NNJY2ViXBrM5zrG21tDj
-VEv0JaHKPYhzWCb7ZcSSo/ftZ2yDsRGS8r6DK5sYCfLifloMVJhF04hOC+ZbxiiB
-JgYniQPmb0Zj5BfXWovdAe/89wr5aokQ3GZL
+MIIE/TCCAuUCAQIwDQYJKoZIhvcNAQELBQAwQzELMAkGA1UEBhMCVVMxDTALBgNV
+BAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRUwEwYDVQQDDAxpbnRlcm1lZGlhdGUw
+IBcNMjAwODEzMTUxMDI5WhgPMjEyMDA3MjAxNTEwMjlaMEQxCzAJBgNVBAYTAlVT
+MQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVPU0FBRjEWMBQGA1UEAwwNYWFpLXNp
+bXVsYXRvcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAM/5ReR7rfi1
+KKJSOKSzq+B+jLDOSeBzg6XtuSwcxW9glm09GzxRz7TGTdIRmGz3Y2SRY1En40Ep
+ZwEoyPgTBBNNR5hC+da9amvjFil/cvB1GqPS5v5PSNR38kmYjMGCUPtgqFv3Nl3L
+zAdgBBwrS4vitDXfq3oDyArGiY2DU1JZzGhPbLdrt8CNetk4csz5v/yHlcY3IMTz
+DYyuxfCRNBZvQd1rdusGo/FARLTRD4btMY3i/0/u0weXAsZrzjwiYiuA0i2qjmv7
+AeakNYLBC/nK/UTZFpwoZzFiAzcMs9fUwTDUhWm4nKoVSxRnkjlJoUx/vsctJbSl
++KKJBUYXrznkAQw34BhEZGQdjsUrpoIYti/pZ2w1O0xxfWMz98NE1qZH4TKKirNo
+cG7BZJ7EjqO25Ye6rZjfFdUa+Ri7pY7JBNobK8htR72BBX8+j1e8q3IuJ+GjUi9K
+fcSH1qK3ypztS8qjfFxYjehBktNt95MgaQdAvz2Xkyzpuj565+54B4YZtv+mfa98
+M/Osc11eox9GTY0nMw/8oohdNt9mzlgsUmCR3rK/3O5xkbmaOyWrgNj/0QlyjVsn
+w0pnmHTPmL321U/N5OQe21E54r0PI40DD6pfzUQ9CY/9j45o2f+eD29el4gjTf3l
+Bx4+9Hm116oHA9CxFqN7OOySAgrvLm5vAgMBAAEwDQYJKoZIhvcNAQELBQADggIB
+ALDeWIRGGVWLgYi1hbvTF/YrZyEPaHW2DSAZHVq+B6YE5O7hpcr5xesT52/zKwVJ
+wkithWEeYRkr3/zOtBWYA1luGNf3eQ3MbbaNfatGrv1NrMtp+x7QsLT8u1+YArwj
+Vr2Z4h7MHIO9EjdgH5IEMJRaUnOLRTZvvkNESJwVVy+Jlw3NVPvkw+wJcZF2n8Wf
+SNdE/FIBLLhJtX2/tiYeO+npn1WAcqifT5k0nOIRxZYEk0GdIq2P53nuaJ74GcWC
+enNI/CHjkJKix3yk8GlJPZkL/PfUbne6UwuNmAovoOcnd9hRbzv/IFXnJkmp4aun
+pdaSDpbWHyN/pEQBiSPN6QdgNzR7l+zkn+tprZtR143zAvsRBRf2JhpHQqI0EJLV
+HPVOGX9ph8f7Dixbka7EiCwy1yoaFuewQ0h/Ofqa8Nw7LPkTi3rp+FWZbZoZahlk
+A3k8StZwVOFvUIbvoj0bP3e2nJgnJKwfWppX29m6M0xUTn54hIm2TRkMy2SSIIHl
+7jYcaNKbmPibVeaW9Y8bjwBPkvvLbS7ZFb8QTYpYQbBUwLpkbuPImaQq+V4VqRJl
+Jzb5ZY7rSk/sp+vu2PuU4QkGGLC1X0bNCIi7ucwt9ie8uNCsYdNfQLYRy3x/BrWq
+BsmHg+f5zPyVmKd+qXBwfa7UeT2zJLs3IlFwBeg4sk3f
 -----END CERTIFICATE-----
index 3cba9cf..cbad3c5 100755 (executable)
@@ -73,6 +73,10 @@ module pnf-sw-upgrade {
                 description
                   "Free-text description of the UP.";
             }
+            leaf node-health {
+                type string;
+                description "Reflect Node Health Status";
+            }
         }
     }
 }
\ No newline at end of file
index e1ce243..ebf2af3 100755 (executable)
@@ -1,12 +1,13 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <software-upgrade xmlns="http://onap.org/pnf-sw-upgrade">
-  <upgrade-package>
-    <id>sw-id-1</id>
-    <current-status>CREATED</current-status>
-    <software-version>test_software_1</software-version>
-    <uri>sftp://127.0.0.1/test_software_1.img</uri>
-    <user>test_user</user>
-    <password>test_password</password>
-    <user-label>trial software update</user-label>
-  </upgrade-package>
+    <upgrade-package>
+        <id>sw-id-1</id>
+        <current-status>CREATED</current-status>
+        <software-version>test_software_1</software-version>
+        <uri>sftp://127.0.0.1/test_software_1.img</uri>
+        <user>test_user</user>
+        <password>test_password</password>
+        <user-label>trial software update</user-label>
+        <node-health>Ok</node-health>
+    </upgrade-package>
 </software-upgrade>
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 9acb8bb..266a8f2
@@ -1,31 +1,36 @@
 Bag Attributes
-    friendlyName: so@so.onap.org
-    localKeyID: 54 69 6D 65 20 31 35 36 34 30 35 32 33 31 34 37 38 3
-subject=CN = aai-simulator, emailAddress = , OU = so@so.onap.org, OU = OSAAF, O = ONAP, C = US
+    friendlyName: aai-cert
+    localKeyID: 59 C6 CE 53 FF 25 7B 6F 86 4D E4 3A 2D EB 48 98 E0 20 B9 5
+subject=C = US, O = ONAP, OU = OSAAF, CN = aai-simulator
 
-issuer=C = US, O = ONAP, OU = OSAAF, CN = intermediateCA_9
+issuer=C = US, O = ONAP, OU = OSAAF, CN = intermediate
 
 -----BEGIN CERTIFICATE-----
-MIIEBzCCAu+gAwIBAgIIdC1kel7DdnYwDQYJKoZIhvcNAQELBQAwRzELMAkGA1UE
-BhMCVVMxDTALBgNVBAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRkwFwYDVQQDDBBp
-bnRlcm1lZGlhdGVDQV85MB4XDTE5MDcyNTEwNTgzNFoXDTIwMDcyNTEwNTgzNFow
-bjEWMBQGA1UEAwwNYWFpLXNpbXVsYXRvcjEPMA0GCSqGSIb3DQEJARYAMRcwFQYD
-VQQLDA5zb0Bzby5vbmFwLm9yZzEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoMBE9O
-QVAxCzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
-185xCE6cmsY6XB5Dd/5GlfuWjN05KKk3akymxhbJLa9ektlusmuTPt4cnxD+e4b6
-dymqHzQ6C206TBK1jaDzcF07Ag7VTpxmlgaSukQ+aZoXfIcs80lWCLnNvC2MrOuh
-9uhUILAmuddo01cIHJvti5R2g6BEirCGsVKBSwmXRotxHyzUg9IwOpeGy0G1ZDjU
-OiMqY5qOonVTEz1AganctdiWK1/eZ5IBD7gQwckS5n1a6RYMVSnr1vKLoiZq76Bp
-wKy3EBX16jlmQMC5Aj9/GDezJg0bPvlikL3VUsC76DRShucsxS3SzVxeAJ5nsH8S
-qUElpbe3uabhFG2qKmtvdwIDAQABo4HPMIHMMAkGA1UdEwQCMAAwDgYDVR0PAQH/
-BAQDAgXgMCAGA1UdJQEB/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBUBgNVHSME
-TTBLgBSB95lbELnIjN7zUl7qTmmgQz6s3aEwpC4wLDEOMAwGA1UECwwFT1NBQUYx
-DTALBgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTggEHMB0GA1UdDgQWBBSQ54p+SID0
-2p21lUHY9YC1ZZfkZTAYBgNVHREEETAPgg1hYWktc2ltdWxhdG9yMA0GCSqGSIb3
-DQEBCwUAA4IBAQBRGK6Iyjc/0bC3+qjPuNwSlu1pUcgHtgxP/oTU5f9xMSkSjIP0
-weVnIEGOwlW8GRbDPQza14AHETTxJ17rv6p6h7l/dZZmbMPl2S+QXGptgDWR6zY7
-q5ROecGcQzgto6lTMcKgBMW+ct3Tb3khMqP6ewzGz85SY7BgyVE7HFG9M5BM3NhX
-ovAcj93C24DFKLDKxHrrsVIROlFk6QW2+kb0zo1YzVc6NNJY2ViXBrM5zrG21tDj
-VEv0JaHKPYhzWCb7ZcSSo/ftZ2yDsRGS8r6DK5sYCfLifloMVJhF04hOC+ZbxiiB
-JgYniQPmb0Zj5BfXWovdAe/89wr5aokQ3GZL
+MIIE/TCCAuUCAQIwDQYJKoZIhvcNAQELBQAwQzELMAkGA1UEBhMCVVMxDTALBgNV
+BAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRUwEwYDVQQDDAxpbnRlcm1lZGlhdGUw
+IBcNMjAwODEzMTUxMDI5WhgPMjEyMDA3MjAxNTEwMjlaMEQxCzAJBgNVBAYTAlVT
+MQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVPU0FBRjEWMBQGA1UEAwwNYWFpLXNp
+bXVsYXRvcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAM/5ReR7rfi1
+KKJSOKSzq+B+jLDOSeBzg6XtuSwcxW9glm09GzxRz7TGTdIRmGz3Y2SRY1En40Ep
+ZwEoyPgTBBNNR5hC+da9amvjFil/cvB1GqPS5v5PSNR38kmYjMGCUPtgqFv3Nl3L
+zAdgBBwrS4vitDXfq3oDyArGiY2DU1JZzGhPbLdrt8CNetk4csz5v/yHlcY3IMTz
+DYyuxfCRNBZvQd1rdusGo/FARLTRD4btMY3i/0/u0weXAsZrzjwiYiuA0i2qjmv7
+AeakNYLBC/nK/UTZFpwoZzFiAzcMs9fUwTDUhWm4nKoVSxRnkjlJoUx/vsctJbSl
++KKJBUYXrznkAQw34BhEZGQdjsUrpoIYti/pZ2w1O0xxfWMz98NE1qZH4TKKirNo
+cG7BZJ7EjqO25Ye6rZjfFdUa+Ri7pY7JBNobK8htR72BBX8+j1e8q3IuJ+GjUi9K
+fcSH1qK3ypztS8qjfFxYjehBktNt95MgaQdAvz2Xkyzpuj565+54B4YZtv+mfa98
+M/Osc11eox9GTY0nMw/8oohdNt9mzlgsUmCR3rK/3O5xkbmaOyWrgNj/0QlyjVsn
+w0pnmHTPmL321U/N5OQe21E54r0PI40DD6pfzUQ9CY/9j45o2f+eD29el4gjTf3l
+Bx4+9Hm116oHA9CxFqN7OOySAgrvLm5vAgMBAAEwDQYJKoZIhvcNAQELBQADggIB
+ALDeWIRGGVWLgYi1hbvTF/YrZyEPaHW2DSAZHVq+B6YE5O7hpcr5xesT52/zKwVJ
+wkithWEeYRkr3/zOtBWYA1luGNf3eQ3MbbaNfatGrv1NrMtp+x7QsLT8u1+YArwj
+Vr2Z4h7MHIO9EjdgH5IEMJRaUnOLRTZvvkNESJwVVy+Jlw3NVPvkw+wJcZF2n8Wf
+SNdE/FIBLLhJtX2/tiYeO+npn1WAcqifT5k0nOIRxZYEk0GdIq2P53nuaJ74GcWC
+enNI/CHjkJKix3yk8GlJPZkL/PfUbne6UwuNmAovoOcnd9hRbzv/IFXnJkmp4aun
+pdaSDpbWHyN/pEQBiSPN6QdgNzR7l+zkn+tprZtR143zAvsRBRf2JhpHQqI0EJLV
+HPVOGX9ph8f7Dixbka7EiCwy1yoaFuewQ0h/Ofqa8Nw7LPkTi3rp+FWZbZoZahlk
+A3k8StZwVOFvUIbvoj0bP3e2nJgnJKwfWppX29m6M0xUTn54hIm2TRkMy2SSIIHl
+7jYcaNKbmPibVeaW9Y8bjwBPkvvLbS7ZFb8QTYpYQbBUwLpkbuPImaQq+V4VqRJl
+Jzb5ZY7rSk/sp+vu2PuU4QkGGLC1X0bNCIi7ucwt9ie8uNCsYdNfQLYRy3x/BrWq
+BsmHg+f5zPyVmKd+qXBwfa7UeT2zJLs3IlFwBeg4sk3f
 -----END CERTIFICATE-----
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/root-certificate/root.crt b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/root-certificate/root.crt
new file mode 100644 (file)
index 0000000..03f676e
--- /dev/null
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFbTCCA1WgAwIBAgIUcuJ40Js2R5pukZRainsbfHjZMc8wDQYJKoZIhvcNAQEL
+BQAwPTEPMA0GA1UEAwwGUm9vdENBMQ4wDAYDVQQLDAVPU0FBRjENMAsGA1UECgwE
+T05BUDELMAkGA1UEBhMCVVMwIBcNMjAwODEzMTQ1ODM2WhgPMjEyMDA3MjAxNDU4
+MzZaMD0xDzANBgNVBAMMBlJvb3RDQTEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoM
+BE9OQVAxCzAJBgNVBAYTAlVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
+AgEA1hsnL+g+86ZvckGH2FF8etyyHkre0NioqsR2ppPXQmejhcL03yGjFPNNVsb5
+eXYmAets4sbNbgjbcEiNVYbj0KkYZvXN+YHPys3W7LADE0d+RyIvuw2v1OdZbAZU
+BexGDYIW+bz1Bvrw5Vw7n7mCGVgZgbTj6hXDKMOb8EyhhzOQj4trasuz63/kZPtZ
+NzlzXh7AU+FOVOkfWEGsAKzyOwqsTLD5IlD85vahYiSe8xMVYdMz+JAFwNvMdOGH
+uVdwFEa0bGh+GAonGK1bRhfqjrronOfhnVhMccS3uFyHHhRzT3JmifXRih0/v9Le
+EPyc1GwUJd1lMI1iITCAsxlOSwINr0H4FrhV576hUBlZCZxRYQ1Srt04BNP1NjrB
+wDQKPQhhlFZYwxn4YCG7T/ktN4ANtFiPa5/ZP4OSYHjF+v6L97vIGQ4DlQ+rvvsY
+6/HhRcDhnKm0v3DMY4rF2gPzVZQTVnHgQY3hXaILi7p2kGMVyD5J4lFMGNwYseXP
+wxtQL03vlXdLIOcxYP0WjeFyHe7mTZMAS++xzIkcwXPZBTZzOzzxB15V4Hl2WeNE
+DSTizLQjKw3vcSkmTEoLVCR/GelVhpXP3WmqmbtbMM6V8g6u+csmiERmoAyGR6hI
+h/9pKIBznJChEAdGKLZvsNCC2MjbLDa/n160Ho8G5zLKz5cCAwEAAaNjMGEwHQYD
+VR0OBBYEFFFA2kBuZQ5ypVzKvp5CSMztpaDdMB8GA1UdIwQYMBaAFFFA2kBuZQ5y
+pVzKvp5CSMztpaDdMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0G
+CSqGSIb3DQEBCwUAA4ICAQCezmNt0W5hHUMLCAYfvzw5C85HslIW1OsdYtv7Ck6Q
++qrVqku36/7EesziQfBhB1BYOoGkUbAizrkFVCSvHSenRYaukVirPR5EfmWtAocD
+1Tg8EepiFG7FeSWLBflyHbeoq66opVIqooJ9EZT6SDQRc/bYojMu+ZRQ6CJe9mlL
+1JAnfWpJJc4c/WevcXo6LqumB4JGA+Dg+ca2ELfEaGNjJs32mDDeWHcKeFzXOk/g
+jkfwuDmOc//j/M0ehT3RSnI1b3YXw5gHP0Axne/fFooXtoR8A4ofw8pCu/OsJIdD
+AgBtu81klFbPmXZtlcN0lC34KqcUZUkGPcBbKg741wFAmjqCl40FUSofhaARm4gS
+zn6CcDx11+JWtAu8kgr7gLtFFYm+pnQdHTnzL7Rd4Wuk4V5i8I/Vx9SCJEHWQx1V
+d0EQzZMbLxMxlg8eEUDHm8RBVQahbAmTLPtLxiPtw/a2YY5Ck2ilH1L0CPkJtlvB
+AW2uZFJ4DNaIQBDB4hbJgRuVK3K3hzZ5SHyJKmMO0XZ2O+zoQJ4Tl+yasu30lsZU
+0qiDgP+WjhzZh+pCS1WkxGZGL7HG0P0HVXkqW2yrzThGurrc5ACAN15UUhrYcuUT
+bgfv0R7oe+bp+ZtUQ/d8rU9vR+OcIL0pENfI9vIwtfmNpIWizeJLWc9Kafqd+c8j
+kw==
+-----END CERTIFICATE-----
index bea0dca..0886d9d 100755 (executable)
@@ -170,9 +170,9 @@ services:
       - "8081:8081"
     volumes:
       - /etc/localtime:/etc/localtime:ro
-      - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates
       - ${CONFIG_DIR_PATH}/override-files/bpmn-infra/onapheat:/app/config
       - ${CONFIG_DIR_PATH}/certificates/aai-certificate/aai.cert:/app/ca-certificates/aai.cert
+      - ${CONFIG_DIR_PATH}/certificates/root-certificate/root.crt:/app/ca-certificates/root.crt
     environment:
       - APP=bpmn-infra
       - JVM_ARGS=-Xms64m -Xmx512m
index 205abe4..3a40848 100755 (executable)
@@ -3,8 +3,8 @@ server:
    tomcat:
       max-threads: 4
    ssl:
-      key-store: classpath:keystore/org.onap.so.p12
-      key-store-password: u!@JQoYD])@ykq.NKM,O7iA.
+      key-store: classpath:keystore/keystore.p12
+      key-store-password: mYHC98!qX}7h?W}jRv}MIXTJ
       keyStoreType: PKCS12
 ssl-enable: true
 spring:
@@ -21,5 +21,5 @@ spring:
 http:
    client:
       ssl:
-         trust-store: classpath:truststore/org.onap.so.trust.jks
-         trust-store-password: '[)3KV.k*!IlkFhWEq0Nv2dDa'
\ No newline at end of file
+         trust-store: classpath:truststore/truststore.jks
+         trust-store-password: '*TQH?Lnszprs4LmlAj38yds('
\ No newline at end of file
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/keystore.p12 b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/keystore.p12
new file mode 100644 (file)
index 0000000..6b4340d
Binary files /dev/null and b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/keystore.p12 differ
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/org.onap.so.p12 b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/org.onap.so.p12
deleted file mode 100755 (executable)
index 015f2bf..0000000
Binary files a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/org.onap.so.p12 and /dev/null differ
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/org.onap.so.trust.jks b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/org.onap.so.trust.jks
deleted file mode 100755 (executable)
index 88d6184..0000000
Binary files a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/org.onap.so.trust.jks and /dev/null differ
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/truststore.jks b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/truststore.jks
new file mode 100644 (file)
index 0000000..d219aaf
Binary files /dev/null and b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/truststore.jks differ
index f82f228..3fd82d2 100755 (executable)
@@ -32,10 +32,16 @@ docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY
 MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
 echo MSB_IAG_IP=${MSB_IAG_IP}
 
-docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql nexus3.onap.org:10001/onap/vfc/db
+# Start Mysql
+docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql -e MYSQL_USER="gvnfm" -e MYSQL_PASSWORD="gvnfm" -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE="gvnfm" nexus3.onap.org:10001/library/mariadb
 VFC_DB_IP=`get-instance-ip.sh vfc-db`
 echo VFC_DB_IP=${VFC_DB_IP}
 
+# Start Redis
+docker run -d -p 6379:6379 --name vfc-redis redis
+VFC_REDIS_IP=`get-instance-ip.sh vfc-redis`
+echo VFC_REDIS_IP=${VFC_REDIS_IP}
+
 # Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
 for i in {1..10}; do
     curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break
@@ -55,7 +61,7 @@ echo sleep 30
 sleep 30
 
 # start vfc-vnflcm
-docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnflcm
+docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 -e REDIS_HOST=${VFC_REDIS_IP} nexus3.onap.org:10001/onap/vfc/vnflcm
 VNFLCM_IP=`get-instance-ip.sh vfc-vnflcm`
 
 # Wait for initialization
index 22dd8ae..b66662b 100755 (executable)
@@ -19,7 +19,6 @@
 
 source ${SCRIPTS}/common_functions.sh
 
-
 #start msb
 docker run -d -p 8500:8500  --name msb_consul consul:0.9.3
 MSB_CONSUL_IP=`get-instance-ip.sh msb_consul`
@@ -31,10 +30,16 @@ docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY
 MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
 echo MSB_IAG_IP=${MSB_IAG_IP}
 
-docker run -d -p 3306:3306 --name vfc-db nexus3.onap.org:10001/onap/vfc/db
+# Start Mysql
+docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql -e MYSQL_USER="gvnfm" -e MYSQL_PASSWORD="gvnfm" -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE="gvnfm" nexus3.onap.org:10001/library/mariadb
 VFC_DB_IP=`get-instance-ip.sh vfc-db`
 echo VFC_DB_IP=${VFC_DB_IP}
 
+# Start Redis
+docker run -d -p 6379:6379 --name vfc-redis redis
+VFC_REDIS_IP=`get-instance-ip.sh vfc-redis`
+echo VFC_REDIS_IP=${VFC_REDIS_IP}
+
 # Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
 for i in {1..10}; do
     curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break
@@ -54,7 +59,7 @@ echo sleep 60
 sleep 60
 
 # start vfc-vnflcm
-docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnflcm
+docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 -e REDIS_HOST=${VFC_REDIS_IP} nexus3.onap.org:10001/onap/vfc/vnflcm
 VNFLCM_IP=`get-instance-ip.sh vfc-vnflcm`
 
 # Wait for initialization
@@ -65,7 +70,7 @@ for i in {1..10}; do
 done
 
 # start vfc-vnfres
-docker run -d --name vfc-vnfmgr -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnfmgr
+docker run -d --name vfc-vnfmgr -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 -e REDIS_HOST=${VFC_REDIS_IP} nexus3.onap.org:10001/onap/vfc/vnfmgr
 VNFMGR_IP=`get-instance-ip.sh vfc-vnfmgr`
 
 # Wait for initialization
index e2ab259..358fa6c 100755 (executable)
@@ -19,7 +19,6 @@
 
 source ${SCRIPTS}/common_functions.sh
 
-
 #start msb
 docker run -d -p 8500:8500  --name msb_consul consul:0.9.3
 MSB_CONSUL_IP=`get-instance-ip.sh msb_consul`
@@ -31,10 +30,16 @@ docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY
 MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
 echo MSB_IAG_IP=${MSB_IAG_IP}
 
-docker run -d -p 3306:3306 --name vfc-db nexus3.onap.org:10001/onap/vfc/db
+# Start Mysql
+docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql -e MYSQL_USER="gvnfm" -e MYSQL_PASSWORD="gvnfm" -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE="gvnfm" nexus3.onap.org:10001/library/mariadb
 VFC_DB_IP=`get-instance-ip.sh vfc-db`
 echo VFC_DB_IP=${VFC_DB_IP}
 
+# Start Redis
+docker run -d -p 6379:6379 --name vfc-redis redis
+VFC_REDIS_IP=`get-instance-ip.sh vfc-redis`
+echo VFC_REDIS_IP=${VFC_REDIS_IP}
+
 # Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
 for i in {1..10}; do
     curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break
@@ -54,7 +59,7 @@ echo sleep 60
 sleep 60
 
 # start vfc-vnflcm
-docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnflcm
+docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 -e REDIS_HOST=${VFC_REDIS_IP} nexus3.onap.org:10001/onap/vfc/vnflcm
 VNFLCM_IP=`get-instance-ip.sh vfc-vnflcm`
 
 # Wait for initialization
@@ -65,7 +70,7 @@ for i in {1..10}; do
 done
 
 # start vfc-vnfres
-docker run -d --name vfc-vnfres -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnfres
+docker run -d --name vfc-vnfres -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 -e REDIS_HOST=${VFC_REDIS_IP} nexus3.onap.org:10001/onap/vfc/vnfres
 VNFRES_IP=`get-instance-ip.sh vfc-vnfres`
 
 # Wait for initialization
index 394a8af..6ed146f 100755 (executable)
@@ -32,10 +32,16 @@ docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY
 MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
 echo MSB_IAG_IP=${MSB_IAG_IP}
 
-docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql nexus3.onap.org:10001/onap/vfc/db
+# Mysql
+docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql -e MYSQL_USER="vfcnfvolcm" -e MYSQL_PASSWORD="vfcnfvolcm" -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE="vfcnfvolcm" nexus3.onap.org:10001/library/mariadb
 VFC_DB_IP=`get-instance-ip.sh vfc-db`
 echo VFC_DB_IP=${VFC_DB_IP}
 
+# Redis
+docker run -d -p 6379:6379 --name vfc-redis redis
+VFC_REDIS_IP=`get-instance-ip.sh vfc-redis`
+echo VFC_REDIS_IP=${VFC_REDIS_IP}
+
 # Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
 for i in {1..10}; do
     curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break
@@ -61,7 +67,7 @@ echo sleep 60
 sleep 60
 
 # start vfc-nslcm
-docker run -d --name vfc-nslcm -v /var/lib/mysql -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 -e REG_TO_MSB_WHEN_START=true nexus3.onap.org:10001/onap/vfc/nslcm
+docker run -d --name vfc-nslcm -v /var/lib/mysql -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 -e REDIS_HOST=${VFC_REDIS_IP} -e REG_TO_MSB_WHEN_START=true nexus3.onap.org:10001/onap/vfc/nslcm
 NSLCM_IP=`get-instance-ip.sh vfc-nslcm`
 
 # Wait for initialization
diff --git a/tests/aaf/certservice/resources/cert-service-properties.robot b/tests/aaf/certservice/resources/cert-service-properties.robot
deleted file mode 100644 (file)
index 54ddec1..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-*** Variables ***
-
-${CERT_SERVICE_CONTAINER_NAME}           aaf-cert-service
-${CERT_SERVICE_PORT}                     8443
-${AAFCERT_URL}                           https://localhost:${cert_service_port}
-${CLIENT_CA_NAME}                        Client
-${RA_CA_NAME}                            RA
-${CERT_SERVICE_ENDPOINT}                 /v1/certificate/
-${ROOTCA}                                %{WORKSPACE}/tests/aaf/certservice/assets/certs/root.crt
-${CERTSERVICE_SERVER_CRT}                %{WORKSPACE}/tests/aaf/certservice/assets/certs/certServiceServer.crt
-${CERTSERVICE_SERVER_KEY}                %{WORKSPACE}/tests/aaf/certservice/assets/certs/certServiceServer.key
-${VALID_CLIENT_CSR_FILE}                 %{WORKSPACE}/tests/aaf/certservice/assets/valid_client.csr
-${VALID_CLIENT_PK_FILE}                  %{WORKSPACE}/tests/aaf/certservice/assets/valid_client.pk
-${VALID_RA_CSR_FILE}                     %{WORKSPACE}/tests/aaf/certservice/assets/valid_ra.csr
-${VALID_RA_PK_FILE}                      %{WORKSPACE}/tests/aaf/certservice/assets/valid_ra.pk
-${INVALID_CSR_FILE}                      %{WORKSPACE}/tests/aaf/certservice/assets/invalid.csr
-${INVALID_PK_FILE}                       %{WORKSPACE}/tests/aaf/certservice/assets/invalid.key
-
-
-${CERT_SERVICE_ADDRESS}                  https://${CERT_SERVICE_CONTAINER_NAME}:${CERT_SERVICE_PORT}
-${VALID_ENV_FILE}                        %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker.env
-${VALID_ENV_FILE_JKS}                    %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker_jks.env
-${VALID_ENV_FILE_P12}                    %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker_p12.env
-${VALID_ENV_FILE_PEM}                    %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker_pem.env
-${INVALID_ENV_FILE_OUTPUT_TYPE}          %{WORKSPACE}/tests/aaf/certservice/assets/invalid_client_docker_output_type.env
-${INVALID_ENV_FILE}                      %{WORKSPACE}/tests/aaf/certservice/assets/invalid_client_docker.env
-${DOCKER_CLIENT_IMAGE}                   nexus3.onap.org:10001/onap/org.onap.aaf.certservice.aaf-certservice-client:latest
-${CLIENT_CONTAINER_NAME}                 %{ClientContainerName}
-${CERT_SERVICE_NETWORK}                  certservice_certservice
-${MOUNT_PATH}                            %{WORKSPACE}/tests/aaf/certservice/tmp
-${TRUSTSTORE_PATH}                       %{WORKSPACE}/plans/aaf/certservice/certs
index b70b41d..bad79d5 100644 (file)
@@ -84,7 +84,7 @@
                 "dmaap_info": {
                   "client_id": "1475976809466",
                   "client_role": "org.onap.dcae.pmPublisher",
-                  "topic_url": "https://mr-sim:3095/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+                  "topic_url": "https://mr-sim:3095/events/unauthenticated.DCAE_CL_OUTPUT",
                   "location": "san-francisco"
                 },
                 "type": "message_router"
               "policy_pm_subscriber": {
                 "dmaap_info": {
                   "location": "san-francisco",
-                  "topic_url": "https://mr-sim:3095/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+                  "topic_url": "https://mr-sim:3095/events/unauthenticated.PMSH_CL_INPUT",
                   "client_role": "org.onap.dcae.pmSubscriber",
                   "client_id": "1575876809456"
                 },
index 1a027f2..860672f 100644 (file)
@@ -1,7 +1,7 @@
 [
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -24,7 +24,7 @@
   },
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -36,7 +36,7 @@
           "application/json"
         ]
       },
-      "body": "{}"
+      "body": []
     }
   }
 ]
index e5c4dd8..8dd5818 100644 (file)
@@ -1,7 +1,7 @@
 [
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -24,7 +24,7 @@
   },
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -36,7 +36,7 @@
           "application/json"
         ]
       },
-      "body": "{}"
+      "body": []
     }
   }
 ]
index eba4e4e..cd75deb 100644 (file)
@@ -1,7 +1,7 @@
 [
   {
     "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
+      "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -24,7 +24,7 @@
   },
   {
     "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
+      "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
           "application/json"
         ]
       },
-      "body": {
-        "type": "JSON",
-        "json": {}
-      }
+      "body": []
     }
   }
 ]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
deleted file mode 100644 (file)
index f73fee8..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-[
-  {
-    "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
-      "queryStringParameters" : {
-        "timeout" : [ "1000" ]
-      }
-    },
-    "httpResponse": {
-      "statusCode": 200,
-      "headers": {
-        "content-type": [
-          "application/json"
-        ]
-      },
-      "body": [
-        "{\"name\": \"ResponseEvent\", \"nameSpace\": \"org.onap.policy.apex.onap.pmcontrol\", \"source\": \"APEX\", \"target\": \"DCAE\", \"version\": \"0.0.1\", \"status\": {\"subscriptionName\": \"ExtraPM-All-gNB-R2B\", \"nfName\": \"pnf_new\", \"changeType\": \"CREATE\", \"message\": \"success\"}}"
-      ]
-    },
-    "times": {
-      "remainingTimes": 1,
-      "unlimited": false
-    }
-  },
-  {
-    "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
-      "queryStringParameters" : {
-        "timeout" : [ "1000" ]
-      }
-    },
-    "httpResponse": {
-      "statusCode": 200,
-      "headers": {
-        "content-type": [
-          "application/json"
-        ]
-      },
-      "body": {
-        "type": "JSON",
-        "json": {}
-      }
-    }
-  }
-]
index a2b8cad..def53ca 100644 (file)
@@ -21,7 +21,6 @@ ${SUBSCRIPTIONS_ENDPOINT}           /subscriptions
 
 ${MR_EXPECTATION_AAI_PNF_CREATED}               %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
 ${MR_EXPECTATION_AAI_PNF_REMOVED}               %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
-${MR_EXPECTATION_POLICY_RESPONSE_PNF_NEW}       %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
 ${MR_EXPECTATION_POLICY_RESPONSE_PNF_EXISTING}  %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
 ${CBS_EXPECTATION_ADMIN_STATE_UNLOCKED}         %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
 
@@ -62,18 +61,18 @@ Verify PNF detected in AAI when administrative state unlocked
 Verify Policy response on MR is handled
     [Tags]                          PMSH_04
     [Documentation]                 Verify policy response on MR is handled
-    [Timeout]                       40 seconds
+    [Timeout]                       60 seconds
     SimulatePolicyResponse          ${MR_EXPECTATION_POLICY_RESPONSE_PNF_EXISTING}
-    Sleep                           15 seconds      Ensure Policy response on MR is picked up
+    Sleep                           31 seconds      Ensure Policy response on MR is picked up
     ${resp}=                        Get Request                      pmsh_session  ${SUBSCRIPTIONS_ENDPOINT}
     Should Be Equal As Strings      ${resp.json()[0]['network_functions'][0]['nf_sub_status']}     CREATED
 
 Verify AAI event on MR detailing new PNF being detected is handled
     [Tags]                          PMSH_05
     [Documentation]                 Verify PNF created AAI event on MR is handled
-    [Timeout]                       30 seconds
+    [Timeout]                       60 seconds
     SimulateNewPNF
-    Sleep                           15 seconds      Ensure AAI event on MR is picked up
+    Sleep                           31 seconds      Ensure AAI event on MR is picked up
     ${resp}=                        Get Request                      pmsh_session  ${SUBSCRIPTIONS_ENDPOINT}
     Should Be Equal As Strings      ${resp.json()[0]['network_functions'][1]['nf_name']}            pnf_newly_discovered
     Should Be Equal As Strings      ${resp.json()[0]['network_functions'][1]['orchestration_status']}   Active
@@ -82,9 +81,9 @@ Verify AAI event on MR detailing new PNF being detected is handled
 Verify AAI event on MR detailing PNF being deleted is handled
     [Tags]                          PMSH_06
     [Documentation]                 Verify PNF deleted AAI event on MR is handled
-    [Timeout]                       30 seconds
+    [Timeout]                       60 seconds
     SimulateDeletedPNF
-    Sleep                           12 seconds      Ensure AAI event on MR is picked up
+    Sleep                           31 seconds      Ensure AAI event on MR is picked up
     ${resp}=                        Get Request                      pmsh_session  ${SUBSCRIPTIONS_ENDPOINT}
     Should Not Contain              ${resp.text}            pnf_newly_discovered
 
index 216f405..6df6627 100644 (file)
@@ -123,41 +123,41 @@ Publish V7 Batch Event Without Auth And Cert
     Send Request And Validate Response  Publish Event To VES Collector  ${https_no_cert_no_auth_session}   ${VES_BATCH_EVENT_ENDPOINT_V7}  ${VES_VALID_BATCH_JSON_V7}  401
 
 Publish VES Event With Empty Stnd Domain Namespace Parameter
-    [Tags]    DCAE-VESC-R1
-    [Documentation]   Post single event with invalid data (empty stnd namespace parameter) to /eventListener/v7 endpoint, expect 400 Response Status Code and "Mandatory input event.commonEventHeader.stndDefinedNamespace is empty in request" message
-    Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STDN_DEFINED_EMMPTY_NAMESPACE}   400   Mandatory input attribute event.commonEventHeader.stndDefinedNamespace is empty in request
+    [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
+    [Documentation]   Post single event with invalid data (empty stnd namespace parameter) to /eventListener/v7 endpoint, expect 400 Response Status Code and "Mandatory input %1 %2 is empty in request" message
+    Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_EMPTY_NAMESPACE}   400   Mandatory input %1 %2 is empty in request
 
 Publish VES Event With Missing Stnd Domain Namespace Parameter
-    [Tags]    DCAE-VESC-R1
-    [Documentation]   Post single event with invalid data (missing stnd namespace parameter) to /eventListener/v7 endpoint, expect 400 Response Status Code and "Mandatory input attribute event.commonEventHeader.stndDefinedNamespace is missing from request" message
-    Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STDN_DEFINED_MISSING_NAMESPACE}    400   Mandatory input attribute event.commonEventHeader.stndDefinedNamespace is missing from request
+    [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
+    [Documentation]   Post single event with invalid data (missing stnd namespace parameter) to /eventListener/v7 endpoint, expect 400 Response Status Code and "Mandatory input %1 %2 is missing from request" message
+    Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_MISSING_NAMESPACE}    400   Mandatory input %1 %2 is missing from request
 
 Publish Single VES Event With Empty JSON
-    [Tags]    DCAE-VESC-R1
+    [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
     [Documentation]   Post single event with empty json and expect 400 Response Status Code
     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_EMPTY_JSON}  400
 
 Publish Single VES Event With Missing SourceName Parameter
-    [Tags]    DCAE-VESC-R1
+    [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
     [Documentation]   Post single event with empty json and expect 400 Response Status Code
     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_NAMESPACE_3GPP_PROVISIONING_MISSING_SOURCENAME}  400
 
 Publish Single VES Event With stndDefinedNamespace = 3GPP-Provisioning
-    [Tags]    DCAE-VESC-R1
+    [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
     [Documentation]   Post single event with stndDefinedNamespace = 3GPP-Provisioning and event should routed to topic unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
-    Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STDN_DEFINED_3GPP_PROVISIONING}  202  unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
+    Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_3GPP_PROVISIONING}  202  unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
 
 Publish Single VES Event With stndDefinedNamespace = 3GPP-Heartbeat
-    [Tags]    DCAE-VESC-R1
+    [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
     [Documentation]   Post single event with stndDefinedNamespace = 3GPP-Heartbeat and event should routed to topic unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT
-    Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STDN_DEFINED_3GPP_HEARTBEAT}  202  unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT
+    Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_3GPP_HEARTBEAT}  202  unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT
 
 Publish Single VES Event With stndDefinedNamespace = 3GPP-PerformanceAssurance
-    [Tags]    DCAE-VESC-R1
+    [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
     [Documentation]   Post single event with stndDefinedNamespace = 3GPP-PerformanceAssurance and event should routed to topic unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT
-    Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STDN_DEFINED_3GPP_PERFORMANCE_ASSURANCE}  202  unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT
+    Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_3GPP_PERFORMANCE_ASSURANCE}  202  unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT
 
 Publish Single VES Event With stndDefinedNamespace = 3GPP-FaultSupervision
-    [Tags]    DCAE-VESC-R1
+    [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
     [Documentation]   Post single event with stndDefinedNamespace = 3GPP-FaultSupervision and event should routed to topic unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
-    Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STDN_DEFINED_3GPP_FAULTSUPERVISION}  202  unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
\ No newline at end of file
+    Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_3GPP_FAULTSUPERVISION}  202  unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
index 5d40b9d..99b7ce3 100644 (file)
@@ -1,47 +1,52 @@
 {
   "event": {
     "commonEventHeader": {
+      "version": "4.1",
+      "vesEventListenerVersion": "7.2",
       "domain": "stndDefined",
       "eventId": "stndDefined-gNB_Nokia000001",
       "eventName": "stndDefined-gNB-Nokia-PowerLost",
       "stndDefinedNamespace": "3GPP-FaultSupervision",
-      "lastEpochMicrosec": 1234567890,
-      "priority": "Normal",
-      "reportingEntityName": "Nokia123456",
-      "sequence": 0,
-      "sourceName": "Nokia123456",
-      "startEpochMicrosec": 1234567890,
-      "version": "4.1",
-      "vesEventListenerVersion": "7.2"
+      "startEpochMicrosec": 1413378172000000,
+      "lastEpochMicrosec": 1413378172000000,
+      "reportingEntityName": "ibcx0001vm002oam001",
+      "sourceName": "scfx0001vm002cap001",
+      "sequence": 1,
+      "priority": "High"
     },
     "stndDefinedFields": {
-      "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+      "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
       "data": {
-        "header": {
-          "uri": "xyz",
-          "notificationId": "xyz",
-          "notificationType": "notifyNewAlarm",
-          "eventTime": "xyz",
-          "systemDN": "xyz"
+        "href": 1,
+        "uri": "1",
+        "notificationId": 1,
+        "notificationType": "notifyNewAlarm",
+        "eventTime": "xyz",
+        "systemDN": "xyz",
+        "probableCause": 1,
+        "perceivedSeverity": "INDETERMINATE",
+        "rootCauseIndicator": false,
+        "specificProblem": "xyz",
+        "correlatedNotifications": [],
+        "backedUpStatus": true,
+        "backUpObject": "xyz",
+        "trendIndication": "MORE_SEVERE",
+        "thresholdInfo": {
+          "observedMeasurement": "new",
+          "observedValue": 123
+        },
+        "stateChangeDefinition": {
+        },
+        "monitoredAttributes": {
+          "newAtt": "new"
+        },
+        "proposedRepairActions": "xyz",
+        "additionalText": "xyz",
+        "additionalInformation": {
+          "addInfo": "new"
         },
-        "body": {
-          "probableCause": "xyz",
-          "perceivedSeverity": "Major",
-          "rootCauseIndicator": false,
-          "specificProblem": "xyz",
-          "correlatedNotifications": [],
-          "backedUpStatus": true,
-          "backUpObject": "xyz",
-          "trendIndication": "No change",
-          "thresholdInfo": {},
-          "stateChangeDefinition": [],
-          "monitoredAttributes": [],
-          "proposedRepairActions": "xyz",
-          "additionalText": "xyz",
-          "additionalInformation": [],
-          "alarmId": "xyz",
-          "alarmType": "Environmental Alarm"
-        }
+        "alarmId": "1",
+        "alarmType": "COMMUNICATIONS_ALARM"
       },
       "stndDefinedFieldsVersion": "1.0"
     }
index aa026e7..0d749f3 100644 (file)
@@ -1,43 +1,52 @@
 {
   "event": {
     "commonEventHeader": {
+      "version": "4.1",
+      "vesEventListenerVersion": "7.2",
       "domain": "stndDefined",
       "eventId": "stndDefined-gNB_Nokia000001",
       "eventName": "stndDefined-gNB-Nokia-PowerLost",
       "stndDefinedNamespace": "3GPP-FaultSupervision",
-      "lastEpochMicrosec": 1234567890,
-      "priority": "Normal",
-      "reportingEntityName": "Nokia123456",
-      "sequence": 0,
-      "sourceName": "Nokia123456",
-      "startEpochMicrosec": 1234567890,
-      "version": "4.1",
-      "vesEventListenerVersion": "7.2"
+      "startEpochMicrosec": 1413378172000000,
+      "lastEpochMicrosec": 1413378172000000,
+      "reportingEntityName": "ibcx0001vm002oam001",
+      "sourceName": "scfx0001vm002cap001",
+      "sequence": 1,
+      "priority": "High"
     },
     "stndDefinedFields": {
-      "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+      "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
       "data": {
-        "uri": "xyz",
-        "notificationId": "xyz",
+        "href": 1,
+        "uri": "1",
+        "notificationId": 1,
         "notificationType": "notifyNewAlarm",
         "eventTime": "xyz",
         "systemDN": "xyz",
-        "probableCause": "xyz",
-        "perceivedSeverity": "Major",
+        "probableCause": 1,
+        "perceivedSeverity": "INDETERMINATE",
         "rootCauseIndicator": false,
         "specificProblem": "xyz",
         "correlatedNotifications": [],
         "backedUpStatus": true,
         "backUpObject": "xyz",
-        "trendIndication": "No change",
-        "thresholdInfo": {},
-        "stateChangeDefinition": [],
-        "monitoredAttributes": [],
+        "trendIndication": "MORE_SEVERE",
+        "thresholdInfo": {
+          "observedMeasurement": "new",
+          "observedValue": 123
+        },
+        "stateChangeDefinition": {
+        },
+        "monitoredAttributes": {
+          "newAtt": "new"
+        },
         "proposedRepairActions": "xyz",
         "additionalText": "xyz",
-        "additionalInformation": [],
-        "alarmId": "xyz",
-        "alarmType": "Environmental Alarm"
+        "additionalInformation": {
+          "addInfo": "new"
+        },
+        "alarmId": "1",
+        "alarmType": "COMMUNICATIONS_ALARM"
       },
       "stndDefinedFieldsVersion": "1.0"
     }
index 7e274c2..414904f 100644 (file)
@@ -1,43 +1,52 @@
 {
   "event": {
     "commonEventHeader": {
+      "version": "4.1",
+      "vesEventListenerVersion": "7.2",
       "domain": "stndDefined",
       "eventId": "stndDefined-gNB_Nokia000001",
       "eventName": "stndDefined-gNB-Nokia-PowerLost",
       "stndDefinedNamespace": "3GPP-Heartbeat",
-      "lastEpochMicrosec": 1234567890,
-      "priority": "Normal",
-      "reportingEntityName": "Nokia123456",
-      "sequence": 0,
-      "sourceName": "Nokia123456",
-      "startEpochMicrosec": 1234567890,
-      "version": "4.1",
-      "vesEventListenerVersion": "7.2"
+      "startEpochMicrosec": 1413378172000000,
+      "lastEpochMicrosec": 1413378172000000,
+      "reportingEntityName": "ibcx0001vm002oam001",
+      "sourceName": "scfx0001vm002cap001",
+      "sequence": 1,
+      "priority": "High"
     },
     "stndDefinedFields": {
-      "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+      "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
       "data": {
-        "uri": "xyz",
-        "notificationId": "xyz",
+        "href": 1,
+        "uri": "1",
+        "notificationId": 1,
         "notificationType": "notifyNewAlarm",
         "eventTime": "xyz",
         "systemDN": "xyz",
-        "probableCause": "xyz",
-        "perceivedSeverity": "Major",
+        "probableCause": 1,
+        "perceivedSeverity": "INDETERMINATE",
         "rootCauseIndicator": false,
         "specificProblem": "xyz",
         "correlatedNotifications": [],
         "backedUpStatus": true,
         "backUpObject": "xyz",
-        "trendIndication": "No change",
-        "thresholdInfo": {},
-        "stateChangeDefinition": [],
-        "monitoredAttributes": [],
+        "trendIndication": "MORE_SEVERE",
+        "thresholdInfo": {
+          "observedMeasurement": "new",
+          "observedValue": 123
+        },
+        "stateChangeDefinition": {
+        },
+        "monitoredAttributes": {
+          "newAtt": "new"
+        },
         "proposedRepairActions": "xyz",
         "additionalText": "xyz",
-        "additionalInformation": [],
-        "alarmId": "xyz",
-        "alarmType": "Environmental Alarm"
+        "additionalInformation": {
+          "addInfo": "new"
+        },
+        "alarmId": "1",
+        "alarmType": "COMMUNICATIONS_ALARM"
       },
       "stndDefinedFieldsVersion": "1.0"
     }
index 0652039..8e1f697 100644 (file)
@@ -1,43 +1,52 @@
 {
   "event": {
     "commonEventHeader": {
+      "version": "4.1",
+      "vesEventListenerVersion": "7.2",
       "domain": "stndDefined",
       "eventId": "stndDefined-gNB_Nokia000001",
       "eventName": "stndDefined-gNB-Nokia-PowerLost",
       "stndDefinedNamespace": "3GPP-PerformanceAssurance",
-      "lastEpochMicrosec": 1234567890,
-      "priority": "Normal",
-      "reportingEntityName": "Nokia123456",
-      "sequence": 0,
-      "sourceName": "Nokia123456",
-      "startEpochMicrosec": 1234567890,
-      "version": "4.1",
-      "vesEventListenerVersion": "7.2"
+      "startEpochMicrosec": 1413378172000000,
+      "lastEpochMicrosec": 1413378172000000,
+      "reportingEntityName": "ibcx0001vm002oam001",
+      "sourceName": "scfx0001vm002cap001",
+      "sequence": 1,
+      "priority": "High"
     },
     "stndDefinedFields": {
-      "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+      "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
       "data": {
-        "uri": "xyz",
-        "notificationId": "xyz",
+        "href": 1,
+        "uri": "1",
+        "notificationId": 1,
         "notificationType": "notifyNewAlarm",
         "eventTime": "xyz",
         "systemDN": "xyz",
-        "probableCause": "xyz",
-        "perceivedSeverity": "Major",
+        "probableCause": 1,
+        "perceivedSeverity": "INDETERMINATE",
         "rootCauseIndicator": false,
         "specificProblem": "xyz",
         "correlatedNotifications": [],
         "backedUpStatus": true,
         "backUpObject": "xyz",
-        "trendIndication": "No change",
-        "thresholdInfo": {},
-        "stateChangeDefinition": [],
-        "monitoredAttributes": [],
+        "trendIndication": "MORE_SEVERE",
+        "thresholdInfo": {
+          "observedMeasurement": "new",
+          "observedValue": 123
+        },
+        "stateChangeDefinition": {
+        },
+        "monitoredAttributes": {
+          "newAtt": "new"
+        },
         "proposedRepairActions": "xyz",
         "additionalText": "xyz",
-        "additionalInformation": [],
-        "alarmId": "xyz",
-        "alarmType": "Environmental Alarm"
+        "additionalInformation": {
+          "addInfo": "new"
+        },
+        "alarmId": "1",
+        "alarmType": "COMMUNICATIONS_ALARM"
       },
       "stndDefinedFieldsVersion": "1.0"
     }
index d940661..bb37d1e 100644 (file)
@@ -1,43 +1,52 @@
 {
   "event": {
     "commonEventHeader": {
+      "version": "4.1",
+      "vesEventListenerVersion": "7.2",
       "domain": "stndDefined",
       "eventId": "stndDefined-gNB_Nokia000001",
       "eventName": "stndDefined-gNB-Nokia-PowerLost",
       "stndDefinedNamespace": "3GPP-Provisioning",
-      "lastEpochMicrosec": 1234567890,
-      "priority": "Normal",
-      "reportingEntityName": "Nokia123456",
-      "sequence": 0,
-      "sourceName": "Nokia123456",
-      "startEpochMicrosec": 1234567890,
-      "version": "4.1",
-      "vesEventListenerVersion": "7.2"
+      "startEpochMicrosec": 1413378172000000,
+      "lastEpochMicrosec": 1413378172000000,
+      "reportingEntityName": "ibcx0001vm002oam001",
+      "sourceName": "scfx0001vm002cap001",
+      "sequence": 1,
+      "priority": "High"
     },
     "stndDefinedFields": {
-      "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+      "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
       "data": {
-        "uri": "xyz",
-        "notificationId": "xyz",
+        "href": 1,
+        "uri": "1",
+        "notificationId": 1,
         "notificationType": "notifyNewAlarm",
         "eventTime": "xyz",
         "systemDN": "xyz",
-        "probableCause": "xyz",
-        "perceivedSeverity": "Major",
+        "probableCause": 1,
+        "perceivedSeverity": "INDETERMINATE",
         "rootCauseIndicator": false,
         "specificProblem": "xyz",
         "correlatedNotifications": [],
         "backedUpStatus": true,
         "backUpObject": "xyz",
-        "trendIndication": "No change",
-        "thresholdInfo": {},
-        "stateChangeDefinition": [],
-        "monitoredAttributes": [],
+        "trendIndication": "MORE_SEVERE",
+        "thresholdInfo": {
+          "observedMeasurement": "new",
+          "observedValue": 123
+        },
+        "stateChangeDefinition": {
+        },
+        "monitoredAttributes": {
+          "newAtt": "new"
+        },
         "proposedRepairActions": "xyz",
         "additionalText": "xyz",
-        "additionalInformation": [],
-        "alarmId": "xyz",
-        "alarmType": "Environmental Alarm"
+        "additionalInformation": {
+          "addInfo": "new"
+        },
+        "alarmId": "1",
+        "alarmType": "COMMUNICATIONS_ALARM"
       },
       "stndDefinedFieldsVersion": "1.0"
     }
index bf5f095..49812e8 100644 (file)
@@ -1,45 +1,54 @@
 {
   "event": {
     "commonEventHeader": {
+      "version": "4.1",
+      "vesEventListenerVersion": "7.2",
       "domain": "stndDefined",
       "eventId": "stndDefined-gNB_Nokia000001",
       "eventName": "stndDefined-gNB-Nokia-PowerLost",
       "stndDefinedNamespace": "",
-      "lastEpochMicrosec": 1234567890,
-      "priority": "Normal",
-      "reportingEntityName": "Nokia123456",
-      "sequence": 0,
-      "sourceName": "Nokia123456",
-      "startEpochMicrosec": 1234567890,
-      "version": "4.1",
-      "vesEventListenerVersion": "7.2"
+      "startEpochMicrosec": 1413378172000000,
+      "lastEpochMicrosec": 1413378172000000,
+      "reportingEntityName": "ibcx0001vm002oam001",
+      "sourceName": "scfx0001vm002cap001",
+      "sequence": 1,
+      "priority": "High"
     },
     "stndDefinedFields": {
-      "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+      "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
       "data": {
-        "uri": "xyz",
-        "notificationId": "xyz",
+        "href": 1,
+        "uri": "1",
+        "notificationId": 1,
         "notificationType": "notifyNewAlarm",
         "eventTime": "xyz",
         "systemDN": "xyz",
-        "probableCause": "xyz",
-        "perceivedSeverity": "Major",
+        "probableCause": 1,
+        "perceivedSeverity": "INDETERMINATE",
         "rootCauseIndicator": false,
         "specificProblem": "xyz",
         "correlatedNotifications": [],
         "backedUpStatus": true,
         "backUpObject": "xyz",
-        "trendIndication": "No change",
-        "thresholdInfo": {},
-        "stateChangeDefinition": [],
-        "monitoredAttributes": [],
+        "trendIndication": "MORE_SEVERE",
+        "thresholdInfo": {
+          "observedMeasurement": "new",
+          "observedValue": 123
+        },
+        "stateChangeDefinition": {
+        },
+        "monitoredAttributes": {
+          "newAtt": "new"
+        },
         "proposedRepairActions": "xyz",
         "additionalText": "xyz",
-        "additionalInformation": [],
-        "alarmId": "xyz",
-        "alarmType": "Environmental Alarm"
+        "additionalInformation": {
+          "addInfo": "new"
+        },
+        "alarmId": "1",
+        "alarmType": "COMMUNICATIONS_ALARM"
       },
       "stndDefinedFieldsVersion": "1.0"
     }
   }
-}
+}
\ No newline at end of file
index 230dc54..a5a16d1 100644 (file)
@@ -1,44 +1,53 @@
 {
   "event": {
     "commonEventHeader": {
+      "version": "4.1",
+      "vesEventListenerVersion": "7.2",
       "domain": "stndDefined",
       "eventId": "stndDefined-gNB_Nokia000001",
       "eventName": "stndDefined-gNB-Nokia-PowerLost",
-      "lastEpochMicrosec": 1234567890,
-      "priority": "Normal",
-      "reportingEntityName": "Nokia123456",
-      "sequence": 0,
-      "sourceName": "Nokia123456",
-      "startEpochMicrosec": 1234567890,
-      "version": "4.1",
-      "vesEventListenerVersion": "7.2"
+      "startEpochMicrosec": 1413378172000000,
+      "lastEpochMicrosec": 1413378172000000,
+      "reportingEntityName": "ibcx0001vm002oam001",
+      "sourceName": "scfx0001vm002cap001",
+      "sequence": 1,
+      "priority": "High"
     },
     "stndDefinedFields": {
-      "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+      "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
       "data": {
-        "uri": "xyz",
-        "notificationId": "xyz",
+        "href": 1,
+        "uri": "1",
+        "notificationId": 1,
         "notificationType": "notifyNewAlarm",
         "eventTime": "xyz",
         "systemDN": "xyz",
-        "probableCause": "xyz",
-        "perceivedSeverity": "Major",
+        "probableCause": 1,
+        "perceivedSeverity": "INDETERMINATE",
         "rootCauseIndicator": false,
         "specificProblem": "xyz",
         "correlatedNotifications": [],
         "backedUpStatus": true,
         "backUpObject": "xyz",
-        "trendIndication": "No change",
-        "thresholdInfo": {},
-        "stateChangeDefinition": [],
-        "monitoredAttributes": [],
+        "trendIndication": "MORE_SEVERE",
+        "thresholdInfo": {
+          "observedMeasurement": "new",
+          "observedValue": 123
+        },
+        "stateChangeDefinition": {
+        },
+        "monitoredAttributes": {
+          "newAtt": "new"
+        },
         "proposedRepairActions": "xyz",
         "additionalText": "xyz",
-        "additionalInformation": [],
-        "alarmId": "xyz",
-        "alarmType": "Environmental Alarm"
+        "additionalInformation": {
+          "addInfo": "new"
+        },
+        "alarmId": "1",
+        "alarmType": "COMMUNICATIONS_ALARM"
       },
       "stndDefinedFieldsVersion": "1.0"
     }
   }
-}
+}
\ No newline at end of file
diff --git a/tests/dcaegen2/testcases/resources/DMaaP.py b/tests/dcaegen2/testcases/resources/DMaaP.py
deleted file mode 100644 (file)
index 4c24561..0000000
+++ /dev/null
@@ -1,418 +0,0 @@
-'''
-Created on Aug 15, 2017
-
-@author: sw6830
-'''
-import os
-import posixpath
-import BaseHTTPServer
-import urllib
-import urlparse
-import cgi
-import sys
-import shutil
-import mimetypes
-from jsonschema import validate
-import jsonschema
-import json
-import DcaeVariables
-import SimpleHTTPServer
-
-try:
-    from cStringIO import StringIO
-except ImportError:
-    from StringIO import StringIO
-
-EvtSchema = None
-DMaaPHttpd = None
-
-
-def clean_up_event():
-    sz = DcaeVariables.VESEventQ.qsize()
-    for i in range(sz):
-        try:
-            self.evtQueue.get_nowait()
-        except:
-            pass
-
-
-def enque_event(evt):
-    if DcaeVariables.VESEventQ is not None:
-        try:
-            DcaeVariables.VESEventQ.put(evt)
-            return True
-        except Exception as e:
-            print (str(e))
-            return False
-    return False
-
-
-def deque_event(wait_sec=25):
-    if DcaeVariables.IsRobotRun:
-        pass
-    try:
-        evt = DcaeVariables.VESEventQ.get(True, wait_sec)
-        return evt
-    except Exception as e:
-        if DcaeVariables.IsRobotRun:
-            pass
-
-        else:
-            print("DMaaP Event dequeue timeout")
-        return None
-
-
-class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
-      
-    def do_PUT(self):
-        self.send_response(405)
-        return
-        
-    def do_POST(self):
-        resp_code = 0
-        # Parse the form data posted
-        '''
-        form = cgi.FieldStorage(
-            fp=self.rfile, 
-            headers=self.headers,
-            environ={'REQUEST_METHOD':'POST',
-                     'CONTENT_TYPE':self.headers['Content-Type'],
-                     })
-        
-        
-        form = cgi.FieldStorage(
-        fp=self.rfile,
-        headers=self.headers,
-        environ={"REQUEST_METHOD": "POST"})
-
-        for item in form.list:
-            print "%s=%s" % (item.name, item.value)
-            
-        '''
-        
-        if 'POST' not in self.requestline:
-            resp_code = 405
-            
-        '''
-        if resp_code == 0:
-            if '/eventlistener/v5' not in self.requestline and '/eventlistener/v5/eventBatch' not in self.requestline and \
-                        '/eventlistener/v5/clientThrottlingState' not in self.requestline:
-                resp_code = 404
-         
-        
-        if resp_code == 0:
-            if 'Y29uc29sZTpaakprWWpsbE1qbGpNVEkyTTJJeg==' not in str(self.headers):
-                resp_code = 401
-        '''  
-        
-        if resp_code == 0:
-            topic = self.extract_topic_from_path()
-            content_len = int(self.headers.getheader('content-length', 0))
-            post_body = self.rfile.read(content_len)
-            
-            indx = post_body.index("{")
-            if indx != 0:
-                post_body = post_body[indx:]
-
-            event = "\""+topic+"\":" + post_body
-            if not enque_event(event):
-                print "enque event fails"
-                   
-            global EvtSchema
-            try:
-                if EvtSchema is None:
-                    with open(DcaeVariables.CommonEventSchema) as opened_file:
-                        EvtSchema = json.load(opened_file)
-                decoded_body = json.loads(post_body)
-                jsonschema.validate(decoded_body, EvtSchema)
-            except:
-                resp_code = 400
-        
-        # Begin the response
-        if not DcaeVariables.IsRobotRun:
-            print ("Response Message:")
-        
-        '''
-        {
-          "200" : {
-            "description" : "Success",
-            "schema" : {
-              "$ref" : "#/definitions/DR_Pub"
-            }
-        }
-        
-        rspStr = "{'responses' : {'200' : {'description' : 'Success'}}}"
-        rspStr1 = "{'count': 1, 'serverTimeMs': 3}"
-
-        '''
-        
-        if resp_code == 0:
-            if 'clientThrottlingState' in self.requestline:
-                self.send_response(204)
-            else:
-                self.send_response(200)
-                self.send_header('Content-Type', 'application/json')
-                self.end_headers()
-                self.wfile.write("{'count': 1, 'serverTimeMs': 3}")
-                self.wfile.close()
-        else:
-            self.send_response(resp_code)
-        
-        '''
-        self.end_headers()
-        self.wfile.write('Client: %s\n' % str(self.client_address))
-        self.wfile.write('User-agent: %s\n' % str(self.headers['user-agent']))
-        self.wfile.write('Path: %s\n' % self.path)
-        self.wfile.write('Form data:\n')
-        self.wfile.close()
-
-        # Echo back information about what was posted in the form
-        for field in form.keys():
-            field_item = form[field]
-            if field_item.filename:
-                # The field contains an uploaded file
-                file_data = field_item.file.read()
-                file_len = len(file_data)
-                del file_data
-                self.wfile.write('\tUploaded %s as "%s" (%d bytes)\n' % \
-                        (field, field_item.filename, file_len))
-            else:
-                # Regular form value
-                self.wfile.write('\t%s=%s\n' % (field, form[field].value))
-        '''
-        return
-
-    def extract_topic_from_path(self):
-        return self.path["/events/".__len__():]
-
-    def do_GET(self):
-        """Serve a GET request."""
-        f = self.send_head()
-        if f:
-            try:
-                self.copyfile(f, self.wfile)
-            finally:
-                f.close()
-
-    def do_HEAD(self):
-        """Serve a HEAD request."""
-        f = self.send_head()
-        if f:
-            f.close()
-
-    def send_head(self):
-        """Common code for GET and HEAD commands.
-
-        This sends the response code and MIME headers.
-
-        Return value is either a file object (which has to be copied
-        to the outputfile by the caller unless the command was HEAD,
-        and must be closed by the caller under all circumstances), or
-        None, in which case the caller has nothing further to do.
-
-        """
-        path = self.translate_path(self.path)
-        if os.path.isdir(path):
-            parts = urlparse.urlsplit(self.path)
-            if not parts.path.endswith('/'):
-                # redirect browser - doing basically what apache does
-                self.send_response(301)
-                new_parts = (parts[0], parts[1], parts[2] + '/',
-                             parts[3], parts[4])
-                new_url = urlparse.urlunsplit(new_parts)
-                self.send_header("Location", new_url)
-                self.end_headers()
-                return None
-            for index in "index.html", "index.htm":
-                index = os.path.join(path, index)
-                if os.path.exists(index):
-                    path = index
-                    break
-            else:
-                return self.list_directory(path)
-        ctype = self.guess_type(path)
-        try:
-            # Always read in binary mode. Opening files in text mode may cause
-            # newline translations, making the actual size of the content
-            # transmitted *less* than the content-length!
-            f = open(path, 'rb')
-        except IOError:
-            self.send_error(404, "File not found")
-            return None
-        try:
-            self.send_response(200)
-            self.send_header("Content-type", ctype)
-            fs = os.fstat(f.fileno())
-            self.send_header("Content-Length", str(fs[6]))
-            self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
-            self.end_headers()
-            return f
-        except:
-            f.close()
-            raise
-
-    def list_directory(self, path):
-        """Helper to produce a directory listing (absent index.html).
-
-        Return value is either a file object, or None (indicating an
-        error).  In either case, the headers are sent, making the
-        interface the same as for send_head().
-
-        """
-        try:
-            list_dir = os.listdir(path)
-        except os.error:
-            self.send_error(404, "No permission to list directory")
-            return None
-        list_dir.sort(key=lambda a: a.lower())
-        f = StringIO()
-        displaypath = cgi.escape(urllib.unquote(self.path))
-        f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">')
-        f.write("<html>\n<title>Directory listing for %s</title>\n" % displaypath)
-        f.write("<body>\n<h2>Directory listing for %s</h2>\n" % displaypath)
-        f.write("<hr>\n<ul>\n")
-        for name in list_dir:
-            fullname = os.path.join(path, name)
-            displayname = linkname = name
-            # Append / for directories or @ for symbolic links
-            if os.path.isdir(fullname):
-                displayname = name + "/"
-                linkname = name + "/"
-            if os.path.islink(fullname):
-                displayname = name + "@"
-                # Note: a link to a directory displays with @ and links with /
-            f.write('<li><a href="%s">%s</a>\n'
-                    % (urllib.quote(linkname), cgi.escape(displayname)))
-        f.write("</ul>\n<hr>\n</body>\n</html>\n")
-        length = f.tell()
-        f.seek(0)
-        self.send_response(200)
-        encoding = sys.getfilesystemencoding()
-        self.send_header("Content-type", "text/html; charset=%s" % encoding)
-        self.send_header("Content-Length", str(length))
-        self.end_headers()
-        return f
-
-    @staticmethod
-    def translate_path(path):
-        """Translate a /-separated PATH to the local filename syntax.
-
-        Components that mean special things to the local file system
-        (e.g. drive or directory names) are ignored.  (XXX They should
-        probably be diagnosed.)
-
-        """
-        # abandon query parameters
-        path = path.split('?', 1)[0]
-        path = path.split('#', 1)[0]
-        # Don't forget explicit trailing slash when normalizing. Issue17324
-        trailing_slash = path.rstrip().endswith('/')
-        path = posixpath.normpath(urllib.unquote(path))
-        words = path.split('/')
-        words = filter(None, words)
-        path = os.getcwd()
-        for word in words:
-            if os.path.dirname(word) or word in (os.curdir, os.pardir):
-                # Ignore components that are not a simple file/directory name
-                continue
-            path = os.path.join(path, word)
-        if trailing_slash:
-            path += '/'
-        return path
-
-    @staticmethod
-    def copyfile(source, outputfile):
-        """Copy all data between two file objects.
-
-        The SOURCE argument is a file object open for reading
-        (or anything with a read() method) and the DESTINATION
-        argument is a file object open for writing (or
-        anything with a write() method).
-
-        The only reason for overriding this would be to change
-        the block size or perhaps to replace newlines by CRLF
-        -- note however that this the default server uses this
-        to copy binary data as well.
-
-        """
-        shutil.copyfileobj(source, outputfile)
-
-    def guess_type(self, path):
-        """Guess the type of a file.
-
-        Argument is a PATH (a filename).
-
-        Return value is a string of the form type/subtype,
-        usable for a MIME Content-type header.
-
-        The default implementation looks the file's extension
-        up in the table self.extensions_map, using application/octet-stream
-        as a default; however it would be permissible (if
-        slow) to look inside the data to make a better guess.
-
-        """
-
-        base, ext = posixpath.splitext(path)
-        if ext in self.extensions_map:
-            return self.extensions_map[ext]
-        ext = ext.lower()
-        if ext in self.extensions_map:
-            return self.extensions_map[ext]
-        else:
-            return self.extensions_map['']
-
-    if not mimetypes.inited:
-        mimetypes.init()  # try to read system mime.types
-    extensions_map = mimetypes.types_map.copy()
-    extensions_map.update({
-        '': 'application/octet-stream',  # Default
-        '.py': 'text/plain',
-        '.c': 'text/plain',
-        '.h': 'text/plain',
-        })
-
-
-def test(handler_class=DMaaPHandler, server_class=BaseHTTPServer.HTTPServer, protocol="HTTP/1.0", port=3904):
-    print "Load event schema file: " + DcaeVariables.CommonEventSchema
-    with open(DcaeVariables.CommonEventSchema) as opened_file:
-        global EvtSchema
-        EvtSchema = json.load(opened_file)
-        
-    server_address = ('', port)
-
-    handler_class.protocol_version = protocol
-    httpd = server_class(server_address, handler_class)
-    
-    global DMaaPHttpd
-    DMaaPHttpd = httpd
-    DcaeVariables.HTTPD = httpd
-
-    sa = httpd.socket.getsockname()
-    print "Serving HTTP on", sa[0], "port", sa[1], "..."
-    # httpd.serve_forever()
-
-
-def _main_(handler_class=DMaaPHandler, server_class=BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
-    
-    if sys.argv[1:]:
-        port = int(sys.argv[1])
-    else:
-        port = 3904
-    
-    print "Load event schema file: " + DcaeVariables.CommonEventSchema
-    with open(DcaeVariables.CommonEventSchema) as opened_file:
-        global EvtSchema
-        EvtSchema = json.load(opened_file)
-        
-    server_address = ('', port)
-
-    handler_class.protocol_version = protocol
-    httpd = server_class(server_address, handler_class)
-
-    sa = httpd.socket.getsockname()
-    print "Serving HTTP on", sa[0], "port", sa[1], "..."
-    httpd.serve_forever()
-
-
-if __name__ == '__main__':
-    _main_()
diff --git a/tests/dcaegen2/testcases/resources/DcaeLibrary.py b/tests/dcaegen2/testcases/resources/DcaeLibrary.py
deleted file mode 100644 (file)
index a9d5def..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-'''
-Created on Aug 18, 2017
-
-@author: sw6830
-'''
-from robot.api import logger
-from Queue import Queue
-import uuid
-import time
-import datetime
-import json
-import threading
-import os
-import platform
-import subprocess
-import paramiko
-import DcaeVariables
-import DMaaP
-
-
-class DcaeLibrary(object):
-    
-    def __init__(self):
-        pass 
-    
-    @staticmethod
-    def setup_dmaap_server(port_num=3904):
-        if DcaeVariables.HttpServerThread is not None:
-            DMaaP.clean_up_event()
-            logger.console("Clean up event from event queue before test")
-            logger.info("DMaaP Server already started")
-            return "true"
-        
-        DcaeVariables.IsRobotRun = True
-        DMaaP.test(port=port_num)
-        try:
-            DcaeVariables.VESEventQ = Queue()
-            DcaeVariables.HttpServerThread = threading.Thread(name='DMAAP_HTTPServer', target=DMaaP.DMaaPHttpd.serve_forever)
-            DcaeVariables.HttpServerThread.start()
-            logger.console("DMaaP Mockup Sever started")
-            time.sleep(2)
-            return "true"
-        except Exception as e:
-            print (str(e))
-            return "false"
-            
-    @staticmethod
-    def shutdown_dmaap():
-        if DcaeVariables.HTTPD is not None:
-            DcaeVariables.HTTPD.shutdown()
-            logger.console("DMaaP Server shut down")
-            time.sleep(3)
-            return "true"
-        else:
-            return "false"
-            
-    @staticmethod
-    def cleanup_ves_events():
-        if DcaeVariables.HttpServerThread is not None:
-            DMaaP.clean_up_event()
-            logger.console("DMaaP event queue is cleaned up")
-            return "true"
-        logger.console("DMaaP server not started yet")
-        return "false"
-    
-    @staticmethod
-    def enable_vesc_with_certBasicAuth():
-        global client
-        if 'Windows' in platform.system():
-            try:
-                client = paramiko.SSHClient()
-                client.load_system_host_keys()
-                # client.set_missing_host_key_policy(paramiko.WarningPolicy)
-                client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
-                
-                client.connect(os.environ['CSIT_IP'], port=22, username=os.environ['CSIT_USER'], password=os.environ['CSIT_PD'])
-                stdin, stdout, stderr = client.exec_command('%{WORKSPACE}/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh')
-                logger.console(stdout.read())    
-            finally:
-                client.close()
-            return
-        ws = os.environ['WORKSPACE']
-        script2run = ws + "/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh"
-        logger.info("Running script: " + script2run)
-        logger.console("Running script: " + script2run)
-        subprocess.call(script2run)
-        time.sleep(5)
-        return
-
-    @staticmethod
-    def dmaap_message_receive_on_topic(evtobj, topic):
-
-        evt_str = DMaaP.deque_event()
-        while evt_str != None:
-            if evtobj in evt_str and topic in evt_str:
-                logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)
-                logger.info("On Expected Topic:\n" + topic)
-                return 'true'
-            evt_str = DMaaP.deque_event()
-        return 'false'
-
-    @staticmethod
-    def dmaap_message_receive(evtobj, action='contain'):
-        
-        evt_str = DMaaP.deque_event()
-        while evt_str != None:
-            if action == 'contain':
-                if evtobj in evt_str:
-                    logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)
-                    return 'true'
-            if action == 'sizematch':
-                if len(evtobj) == len(evt_str):
-                    return 'true'
-            if action == 'dictmatch':
-                evt_dict = json.loads(evt_str)
-                if cmp(evtobj, evt_dict) == 0:
-                    return 'true'
-            evt_str = DMaaP.deque_event()
-        return 'false'
-
-    @staticmethod
-    def is_json_empty(resp):
-        logger.info("Enter is_json_empty: resp.text: " + resp.text)
-        if resp.text is None or len(resp.text) < 2:
-            return 'True'
-        return 'False'
-    
-    @staticmethod
-    def generate_uuid():
-        """generate a uuid"""
-        return uuid.uuid4()
-    
-    @staticmethod
-    def get_json_value_list(jsonstr, keyval):
-        logger.info("Enter Get_Json_Key_Value_List")
-        if jsonstr is None or len(jsonstr) < 2:
-            logger.info("No Json data found")
-            return []
-        try:
-            data = json.loads(jsonstr)   
-            nodelist = []
-            for item in data:
-                nodelist.append(item[keyval])
-            return nodelist
-        except Exception as e:
-            logger.info("Json data parsing fails")
-            print str(e)
-            return []
-        
-    @staticmethod
-    def generate_millitimestamp_uuid():
-        """generate a millisecond timestamp uuid"""
-        then = datetime.datetime.now()
-        return int(time.mktime(then.timetuple())*1e3 + then.microsecond/1e3)
-    
-    @staticmethod
-    def test():
-        import json
-        from pprint import pprint
-
-        with open('robot/assets/dcae/ves_volte_single_fault_event.json') as data_file:    
-            data = json.load(data_file)
-
-        data['event']['commonEventHeader']['version'] = '5.0'
-        pprint(data)
-
-
-if __name__ == '__main__':
-    '''
-    dictStr = "action=getTable,Accept=application/json,Content-Type=application/json,X-FromAppId=1234908903284"
-    cls = DcaeLibrary()
-    #dict = cls.create_header_from_string(dictStr)
-    #print str(dict)
-    jsonStr = "[{'Node': 'onapfcnsl00', 'CheckID': 'serfHealth', 'Name': 'Serf Health Status', 'ServiceName': '', 'Notes': '', 'ModifyIndex': 6, 'Status': 'passing', 'ServiceID': '', 'ServiceTags': [], 'Output': 'Agent alive and reachable', 'CreateIndex': 6}]"
-    lsObj = cls.get_json_value_list(jsonStr, 'Status')
-    print lsObj
-    '''
-    
-    lib = DcaeLibrary()
-    lib.enable_vesc_https_auth()
-    
-    ret = lib.setup_dmaap_server()
-    print ret
-    time.sleep(100000)
index 088b635..cd41763 100755 (executable)
@@ -54,11 +54,11 @@ collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./e
 ## default no validation checkflag (-1)
 ## If enabled (1) - schema files locations must be specified, mapping file path must be specified, schema reference path
 ## in event json must be specified, path to stndDefined data field in event json must be specified
-collector.externalSchema.2ndStageValidation=-1
+collector.externalSchema.checkflag=1
 collector.externalSchema.schemasLocation=./etc/externalRepo/
 collector.externalSchema.mappingFileLocation=./etc/externalRepo/schema-map.json
-collector.externalSchema.schemaRefPath=/event/stndDefinedFields/schemaReference
-collector.externalSchema.stndDefinedDataPath=/event/stndDefinedFields/data
+event.externalSchema.schemaRefPath=/event/stndDefinedFields/schemaReference
+event.externalSchema.stndDefinedDataPath=/event/stndDefinedFields/data
 
 ## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
 collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance
index 52424e6..fb5fc1d 100644 (file)
@@ -1,13 +1,14 @@
 *** Settings ***
 Documentation     The main interface for interacting with DCAE. It handles low level stuff like managing the http request library and DCAE required fields
+Library                  robot_library.DcaeLibrary
+Library           robot_library.DmaapLibrary
+Library           robot_library.CertsLibrary
 Library              RequestsLibrary
-Library                  DcaeLibrary
 Library           OperatingSystem
 Library           Collections
-Library           CertsLibrary
-Variables         ../resources/DcaeVariables.py
+Variables         ./robot_library/DcaeVariables.py
 Resource          ../../../common.robot
-Resource          ../resources/dcae_properties.robot
+Resource          ./dcae_properties.robot
 
 *** Keywords ***
 Create sessions
index cab31af..f608b71 100644 (file)
@@ -46,13 +46,13 @@ ${EVENT_THROTTLING_STATE_DATA_FILE}      %{WORKSPACE}/tests/dcaegen2/testcases/a
 ${EVENT_PNF_REGISTRATION}                %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_pnf_registration_event.json
 ${EVENT_PNF_REGISTRATION_V7}             %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_pnf_registration_event.json
 ${DCAE_HEALTH_CHECK_BODY}                %{WORKSPACE}/tests/dcae/testcases/assets/json_events/dcae_healthcheck.json
-${VES_STDN_DEFINED_EMMPTY_NAMESPACE}     %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_namespace.json
-${VES_STDN_DEFINED_MISSING_NAMESPACE}    %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_missing_namespace.json
+${VES_STND_DEFINED_EMPTY_NAMESPACE}     %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_namespace.json
+${VES_STND_DEFINED_MISSING_NAMESPACE}    %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_missing_namespace.json
 ${VES_NAMESPACE_3GPP_PROVISIONING_MISSING_SOURCENAME}   %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning_missing_sourceName.json
-${VES_STDN_DEFINED_3GPP_PROVISIONING}    %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning.json
-${VES_STDN_DEFINED_3GPP_HEARTBEAT}       %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Heartbeat.json
-${VES_STDN_DEFINED_3GPP_FAULTSUPERVISION}  %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-FaultSupervision.json
-${VES_STDN_DEFINED_3GPP_PERFORMANCE_ASSURANCE}  %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-PerformanceAssurance.json
+${VES_STND_DEFINED_3GPP_PROVISIONING}    %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning.json
+${VES_STND_DEFINED_3GPP_HEARTBEAT}       %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Heartbeat.json
+${VES_STND_DEFINED_3GPP_FAULTSUPERVISION}  %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-FaultSupervision.json
+${VES_STND_DEFINED_3GPP_PERFORMANCE_ASSURANCE}  %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-PerformanceAssurance.json
 
 #DCAE Health Check
 ${CONFIG_BINDING_URL}                    http://localhost:8443
diff --git a/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py b/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py
new file mode 100644 (file)
index 0000000..a467431
--- /dev/null
@@ -0,0 +1,112 @@
+'''
+Created on Aug 18, 2017
+
+@author: sw6830
+'''
+from robot.api import logger
+import uuid
+import time
+import datetime
+import json
+import os
+import platform
+import subprocess
+import paramiko
+
+
+class DcaeLibrary(object):
+
+    def __init__(self):
+        pass
+    
+    @staticmethod
+    def enable_vesc_with_cert_basic_auth():
+        global client
+        if 'Windows' in platform.system():
+            try:
+                DcaeLibrary.enable_https_auth_for_windows_platform_system()
+            finally:
+                client.close()
+            return
+        DcaeLibrary.enable_https_auth_for_non_windows_platform_system()
+        return
+
+    @staticmethod
+    def enable_https_auth_for_non_windows_platform_system():
+        ws = os.environ['WORKSPACE']
+        script2run = ws + "/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh"
+        logger.info("Running script: " + script2run)
+        logger.console("Running script: " + script2run)
+        subprocess.call(script2run)
+        time.sleep(5)
+
+    @staticmethod
+    def enable_https_auth_for_windows_platform_system():
+        global client
+        client = paramiko.SSHClient()
+        client.load_system_host_keys()
+        client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+        client.connect(os.environ['CSIT_IP'], port=22, username=os.environ['CSIT_USER'], password=os.environ['CSIT_PD'])
+        stdin, stdout, stderr = client.exec_command(
+            '%{WORKSPACE}/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh')
+        logger.console(stdout.read())
+
+    @staticmethod
+    def is_json_empty(resp):
+        logger.info("Enter is_json_empty: resp.text: " + resp.text)
+        if resp.text is None or len(resp.text) < 2:
+            return 'True'
+        return 'False'
+    
+    @staticmethod
+    def generate_uuid():
+        """generate a uuid"""
+        return uuid.uuid4()
+    
+    @staticmethod
+    def get_json_value_list(jsonstr, keyval):
+        logger.info("Enter Get_Json_Key_Value_List")
+        if jsonstr is None or len(jsonstr) < 2:
+            logger.info("No Json data found")
+            return []
+        try:
+            return DcaeLibrary.extract_list_of_items_from_json_string(jsonstr, keyval)
+        except Exception as e:
+            logger.info("Json data parsing fails")
+            print str(e)
+            return []
+
+    @staticmethod
+    def extract_list_of_items_from_json_string(jsonstr, keyval):
+        data = json.loads(jsonstr)
+        nodelist = []
+        for item in data:
+            nodelist.append(item[keyval])
+        return nodelist
+
+    @staticmethod
+    def generate_millitimestamp_uuid():
+        """generate a millisecond timestamp uuid"""
+        then = datetime.datetime.now()
+        return int(time.mktime(then.timetuple())*1e3 + then.microsecond/1e3)
+    
+    @staticmethod
+    def test():
+        import json
+        from pprint import pprint
+
+        with open('robot/assets/dcae/ves_volte_single_fault_event.json') as data_file:    
+            data = json.load(data_file)
+
+        data['event']['commonEventHeader']['version'] = '5.0'
+        pprint(data)
+
+
+if __name__ == '__main__':
+
+    lib = DcaeLibrary()
+    lib.enable_vesc_https_auth()
+    
+    ret = lib.setup_dmaap_server()
+    print ret
+    time.sleep(100000)
@@ -10,8 +10,4 @@ DCAE_HEALTH_CHECK_URL1 = "http://135.205.228.170:8500"
 
 CommonEventSchema = get_environment_variable('WORKSPACE') + "/tests/dcaegen2/testcases/assets/json_events/CommonEventFormat_30.2_ONAP.json"
 
-HttpServerThread = None
-HTTPD = None
-VESEventQ = None
 IsRobotRun = False
-
diff --git a/tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py b/tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py
new file mode 100644 (file)
index 0000000..c9a0ff7
--- /dev/null
@@ -0,0 +1,79 @@
+from Queue import Queue
+
+import robot.api.logger as logger
+import threading
+import time
+
+import DcaeVariables
+from robot_library.dmaap_simulator import DMaaPServer
+from robot_library.dmaap_simulator.DMaaPQueue import DMaaPQueue
+
+class DmaapLibrary(object):
+
+    dmaap_queue = None
+    dmaap_server = None
+    server_thread = None
+
+    def __init__(self):
+        pass
+
+    @staticmethod
+    def setup_dmaap_server(port_num=3904):
+        try:
+            DmaapLibrary.start_dmaap_server_on_new_thread(port_num)
+            return "true"
+        except Exception as e:
+            print (str(e))
+            return "false"
+
+    @staticmethod
+    def start_dmaap_server_on_new_thread(port_num):
+        DmaapLibrary.dmaap_queue = DMaaPQueue(Queue())
+        DmaapLibrary.dmaap_server = DMaaPServer.create_dmaap_server(DmaapLibrary.dmaap_queue, port=port_num)
+        DmaapLibrary.server_thread = threading.Thread(name='DMAAP_HTTPServer',
+                                                      target=DmaapLibrary.dmaap_server.serve_forever)
+        DmaapLibrary.server_thread.start()
+        logger.console("DMaaP Mockup Sever started")
+        DcaeVariables.IsRobotRun = True
+        time.sleep(2)
+
+    @staticmethod
+    def shutdown_dmaap():
+        if DmaapLibrary.dmaap_server is not None:
+            DmaapLibrary.dmaap_server.shutdown()
+            logger.console("DMaaP Server shut down")
+            time.sleep(3)
+            return "true"
+        else:
+            return "false"
+
+    @staticmethod
+    def cleanup_ves_events():
+        if DmaapLibrary.server_thread is not None:
+            DmaapLibrary.dmaap_queue.clean_up_event()
+            logger.console("DMaaP event queue is cleaned up")
+            return "true"
+        logger.console("DMaaP server not started yet")
+        return "false"
+
+    @staticmethod
+    def dmaap_message_receive_on_topic(evtobj, topic):
+
+        evt_str = DmaapLibrary.dmaap_queue.deque_event()
+        while evt_str != None:
+            if evtobj in evt_str and topic in evt_str:
+                logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)
+                logger.info("On Expected Topic:\n" + topic)
+                return 'true'
+            evt_str = DmaapLibrary.dmaap_queue.deque_event()
+        return 'false'
+
+    @staticmethod
+    def dmaap_message_receive(evtobj):
+        evt_str = DmaapLibrary.dmaap_queue.deque_event()
+        while evt_str != None:
+            if evtobj in evt_str:
+                logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)
+                return 'true'
+            evt_str = DmaapLibrary.dmaap_queue.deque_event()
+        return 'false'
diff --git a/tests/dcaegen2/testcases/resources/robot_library/README.md b/tests/dcaegen2/testcases/resources/robot_library/README.md
new file mode 100644 (file)
index 0000000..ac432f7
--- /dev/null
@@ -0,0 +1,14 @@
+# Robot Library
+This catalog contains python files used in Robot tests for dcaegen2.ves.
+
+# DMaaP Simulator
+Catalog dmaap_simulator contains python implementation of DMaaP simulator. It uses python BaseHTTPServer to expose endpoints.
+
+# DMaaP Tests
+Catalog dmaap_test contains tests that are used to validate DMaaP simulator. Test are using "pytest" and "MagicMock". 
+
+### In order to run tests: 
+1. create virtual environemnt with Python 2.7;
+2. install requirements from file requirements.txt located in dmaap_test;
+3. set environement variable WORKSPACE to point root csit catalog
+4. run py.test command in catalog dmaap_test
diff --git a/tests/dcaegen2/testcases/resources/robot_library/__init__.py b/tests/dcaegen2/testcases/resources/robot_library/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py
new file mode 100644 (file)
index 0000000..f1c46e1
--- /dev/null
@@ -0,0 +1,73 @@
+'''
+Created on Aug 15, 2017
+
+@author: sw6830
+'''
+import os
+import posixpath
+import BaseHTTPServer
+import urllib
+import urlparse
+import cgi
+import sys
+import shutil
+import mimetypes
+from robot_library import DcaeVariables
+
+try:
+    from cStringIO import StringIO
+except ImportError:
+    from StringIO import StringIO
+
+
+class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+
+    def __init__(self, dmaap_simulator, *args):
+        self.dmaap_simulator = dmaap_simulator
+        BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args)
+
+    def do_POST(self):
+        if 'POST' not in self.requestline:
+            resp_code = 405
+        else:
+            resp_code = self.parse_the_posted_data()
+
+        if resp_code == 0:
+            self.send_successful_response()
+        else:
+            self.send_response(resp_code)
+
+    def parse_the_posted_data(self):
+        topic = self.extract_topic_from_path()
+        content_len = self.get_content_length()
+        post_body = self.rfile.read(content_len)
+        post_body = self.get_json_part_of_post_body(post_body)
+        event = "{\"" + topic + "\":" + post_body + "}"
+        if self.dmaap_simulator.enque_event(event):
+            resp_code = 0
+        else:
+            print "enque event fails"
+            resp_code = 500
+        return resp_code
+
+    def get_json_part_of_post_body(self, post_body):
+        indx = post_body.index("{")
+        if indx != 0:
+            post_body = post_body[indx:]
+        return post_body
+
+    def extract_topic_from_path(self):
+        return self.path["/events/".__len__():]
+
+    def get_content_length(self):
+        return int(self.headers.getheader('content-length', 0))
+
+    def send_successful_response(self):
+        if 'clientThrottlingState' in self.requestline:
+            self.send_response(204)
+        else:
+            self.send_response(200)
+            self.send_header('Content-Type', 'application/json')
+            self.end_headers()
+            self.wfile.write("{'count': 1, 'serverTimeMs': 3}")
+            self.wfile.close()
diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPQueue.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPQueue.py
new file mode 100644 (file)
index 0000000..3d3a81f
--- /dev/null
@@ -0,0 +1,48 @@
+class DMaaPQueue(object):
+
+    def __init__(self, event_queue, wait_timeout_sec=25):
+        self.event_queue = event_queue
+        self.wait_timeout_sec = wait_timeout_sec
+
+    def set_deque_event_timeout(self, wait_timeout_sec):
+        self.wait_timeout_sec = wait_timeout_sec
+
+    def clean_up_event(self):
+        if self.queue_is_valid():
+            with self.event_queue.mutex:
+                try:
+                    self.event_queue.queue.clear()
+                except:
+                    pass
+
+    def enque_event(self, event):
+        event_placed_on_queue = False
+        if self.queue_is_valid():
+            event_placed_on_queue = self._enque_event(event, event_placed_on_queue)
+        return event_placed_on_queue
+
+    def _enque_event(self, event, event_placed_on_queue):
+        try:
+            self.event_queue.put(event)
+            event_placed_on_queue = True
+        except Exception as e:
+            print (str(e))
+        return event_placed_on_queue
+
+    def deque_event(self, wait_sec=None):
+        if wait_sec is None:
+            wait_sec = self.wait_timeout_sec
+        event_from_queue = None
+        if self.queue_is_valid():
+            event_from_queue = self._deque_event(event_from_queue, wait_sec)
+        return event_from_queue
+
+    def _deque_event(self, event_from_queue, wait_sec):
+        try:
+            event_from_queue = self.event_queue.get(True, wait_sec)
+        except Exception as e:
+            print("DMaaP Event dequeue timeout")
+        return event_from_queue
+
+    def queue_is_valid(self):
+        return self.event_queue is not None
diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py
new file mode 100644 (file)
index 0000000..37499be
--- /dev/null
@@ -0,0 +1,22 @@
+import BaseHTTPServer
+import DMaaPHandler
+
+
+class DMaaPServer(BaseHTTPServer.HTTPServer):
+
+    def __init__(self, server_address, protocol, dmaap_simulator):
+
+        def handler_class_constructor(*args):
+            DMaaPHandler.DMaaPHandler(dmaap_simulator, *args)
+        DMaaPHandler.protocol_version = protocol
+        BaseHTTPServer.HTTPServer.__init__(self, server_address, handler_class_constructor)
+
+        serer_address = self.socket.getsockname()
+        print "Serving HTTP on", serer_address[0], "port", serer_address[1], "..."
+
+
+def create_dmaap_server(dmaap_simulator, protocol="HTTP/1.0", port=3904):
+    server_address = ('', port)
+    httpd = DMaaPServer(server_address, protocol, dmaap_simulator)
+
+    return httpd
diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/__init__.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/__init__.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/requirements.txt b/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/requirements.txt
new file mode 100644 (file)
index 0000000..7a68720
--- /dev/null
@@ -0,0 +1,23 @@
+atomicwrites==1.4.0
+attrs==19.3.0
+backports.functools-lru-cache==1.6.1
+configparser==4.0.2
+contextlib2==0.6.0.post1
+funcsigs==1.0.2
+httplib2==0.18.1
+importlib-metadata==1.7.0
+magicmock==0.3
+mock==3.0.5
+mocker==1.1.1
+more-itertools==5.0.0
+packaging==20.4
+pathlib2==2.3.5
+pluggy==0.13.1
+py==1.9.0
+pyparsing==2.4.7
+pytest==4.6.11
+pytest-mock==2.0.0
+scandir==1.10.0
+six==1.15.0
+wcwidth==0.2.5
+zipp==1.2.0
diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSQueue.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSQueue.py
new file mode 100644 (file)
index 0000000..f278a39
--- /dev/null
@@ -0,0 +1,52 @@
+from Queue import Queue
+import pytest
+from robot_library.dmaap_simulator.DMaaPQueue import DMaaPQueue
+
+wait_sec_for_dequeing_event = 0.1
+test_event = "\"topic\":{\"test\":123}"
+
+
+class TestDMaaPQueue:
+
+    dmaap_simulator = None
+
+    @pytest.fixture(autouse=True, scope="function")
+    def initiate_dmaap_simulator(self):
+        TestDMaaPQueue.dmaap_simulator = DMaaPQueue(Queue())
+        TestDMaaPQueue.dmaap_simulator.set_deque_event_timeout(wait_sec_for_dequeing_event)
+        yield
+
+    def test_when_queue_is_empty_then_deque_returns_none(self):
+        # when
+        event = TestDMaaPQueue.dmaap_simulator.deque_event()
+
+        # then
+        assert event is None
+
+    def test_when_enque_event_then_dequeue_return_same_event(self):
+        # when
+        TestDMaaPQueue.dmaap_simulator.enque_event(test_event)
+        event = TestDMaaPQueue.dmaap_simulator.deque_event()
+
+        # then
+        assert event == test_event
+
+    def test_when_enque_and_dequeue_event_then_deque_return_none(self):
+        # when
+        TestDMaaPQueue.dmaap_simulator.enque_event(test_event)
+        TestDMaaPQueue.dmaap_simulator.deque_event()
+        event = TestDMaaPQueue.dmaap_simulator.deque_event()
+
+        # then
+        assert event is None
+
+    def test_when_enque_few_events_and_clean_up_then_dequeu_return_none(self):
+        # when
+        TestDMaaPQueue.dmaap_simulator.enque_event(test_event)
+        TestDMaaPQueue.dmaap_simulator.enque_event(test_event)
+        TestDMaaPQueue.dmaap_simulator.enque_event(test_event)
+        TestDMaaPQueue.dmaap_simulator.clean_up_event()
+        event = TestDMaaPQueue.dmaap_simulator.deque_event()
+
+        # then
+        assert event is None
diff --git a/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSimulator.py b/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSimulator.py
new file mode 100644 (file)
index 0000000..82f95ff
--- /dev/null
@@ -0,0 +1,62 @@
+import sys
+import pytest
+from mock import MagicMock
+
+sys.modules['robot'] = MagicMock()
+sys.modules['robot.api'] = MagicMock()
+sys.modules['robot.api.logger'] = MagicMock()
+from robot_library.DmaapLibrary import DmaapLibrary
+
+wait_sec_for_dequeing_event = 0.1
+test_event = "{\"test\":\"123\"}"
+test_topic = "topic"
+test_message = "\"" + test_topic + "\":" + test_event
+
+
+class TestDMaaPSimulator:
+
+    @pytest.fixture(autouse=True, scope="class")
+    def initiate_dmaap_simulator(self):
+        DmaapLibrary.setup_dmaap_server()
+        DmaapLibrary.dmaap_queue.set_deque_event_timeout(wait_sec_for_dequeing_event)
+        yield
+        assert DmaapLibrary.shutdown_dmaap() == "true"
+
+    @pytest.fixture(autouse=True, scope="function")
+    def clear_dmaap_simulator(self):
+        yield
+        DmaapLibrary.cleanup_ves_events()
+
+    def test_start_stop_dmaap_server(self):
+        # when / then
+        assert DmaapLibrary.dmaap_queue is not None
+        assert DmaapLibrary.dmaap_server is not None
+        assert DmaapLibrary.server_thread is not None
+
+    def test_dmaap_server_returns_true_when_event_is_present_on_queue(self):
+        # when
+        DmaapLibrary.dmaap_queue.enque_event(test_message)
+
+        # then
+        assert DmaapLibrary.dmaap_message_receive(test_event) == 'true'
+
+    def test_dmaap_server_returns_true_when_event_is_present_on_given_topic_on_queue(self):
+        # when
+        DmaapLibrary.dmaap_queue.enque_event(test_message)
+
+        # then
+        assert DmaapLibrary.dmaap_message_receive_on_topic(test_event, test_topic) == 'true'
+
+    def test_dmaap_server_returns_timeout_when_event_is_not_present_on_queue(self):
+        # when / then
+        assert DmaapLibrary.dmaap_message_receive(test_event) == 'false'
+
+    def test_dmaap_server_returns_false_when_queue_was_cleared(self):
+        # when
+        DmaapLibrary.dmaap_queue.enque_event(test_message)
+        DmaapLibrary.dmaap_queue.enque_event(test_message)
+        DmaapLibrary.dmaap_queue.enque_event(test_message)
+        DmaapLibrary.cleanup_ves_events()
+
+        # then
+        assert DmaapLibrary.dmaap_message_receive_on_topic(test_event, test_topic) == 'false'
@@ -2,9 +2,9 @@
 REQUEST_TIMEOUT=5000
 OUTPUT_PATH=/var/certs
 CA_NAME=Invalid
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
 KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
 TRUSTSTORE_PASSWORD=secret
 #Csr config envs
 COMMON_NAME=onap.org
@@ -3,9 +3,9 @@ REQUEST_TIMEOUT=30000
 OUTPUT_PATH=/var/certs
 CA_NAME=RA
 OUTPUT_TYPE=INV
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
 KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
 TRUSTSTORE_PASSWORD=secret
 #Csr config envs
 COMMON_NAME=onap.org
@@ -2,9 +2,9 @@
 REQUEST_TIMEOUT=30000
 OUTPUT_PATH=/var/certs
 CA_NAME=RA
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
 KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
 TRUSTSTORE_PASSWORD=secret
 #Csr config envs
 COMMON_NAME=onap.org
@@ -3,9 +3,9 @@ REQUEST_TIMEOUT=30000
 OUTPUT_PATH=/var/certs
 CA_NAME=RA
 OUTPUT_TYPE=JKS
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
 KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
 TRUSTSTORE_PASSWORD=secret
 #Csr config envs
 COMMON_NAME=onap.org
@@ -3,9 +3,9 @@ REQUEST_TIMEOUT=30000
 OUTPUT_PATH=/var/certs
 CA_NAME=RA
 OUTPUT_TYPE=P12
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
 KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
 TRUSTSTORE_PASSWORD=secret
 #Csr config envs
 COMMON_NAME=onap.org
@@ -3,9 +3,9 @@ REQUEST_TIMEOUT=30000
 OUTPUT_PATH=/var/certs
 CA_NAME=RA
 OUTPUT_TYPE=PEM
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
 KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
 TRUSTSTORE_PASSWORD=secret
 #Csr config envs
 COMMON_NAME=onap.org
@@ -1,6 +1,6 @@
 *** Settings ***
 
-Documentation     AAF Cert Service API test case scenarios
+Documentation     OOM Cert Service API test case scenarios
 Library              RequestsLibrary
 Resource          ./resources/cert-service-keywords.robot
 
@@ -9,82 +9,82 @@ Suite Setup       Create sessions
 *** Test Cases ***
 
 Health Check
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]   Service is up and running
     Run health check
 
 Reload Configuration
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]   Configuration was changed
     Send Get Request And Validate Response  /reload  200
 
 Check if application is ready
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]   Send request to /ready endpoint and expect 200
     Send Get Request And Validate Response  /ready  200
 
 Generate Certificate In RA Mode For CA Name
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Send request to ${CERT_SERVICE_ENDPOINT}${RA_CA_NAME} endpoint and expect 200
     Send Get Request with Header And Expect Success  ${CERT_SERVICE_ENDPOINT}${RA_CA_NAME}  ${VALID_RA_CSR_FILE}  ${VALID_RA_PK_FILE}
 
 Report Not Found Error When Path To Service Is Not Valid
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Send request to ${CERT_SERVICE_ENDPOINT} endpoint and expect 404
     Send Get Request with Header And Expect Error  ${CERT_SERVICE_ENDPOINT}  ${VALID_CLIENT_CSR_FILE}  ${VALID_CLIENT_PK_FILE}  404
 
 Report Bad Request Error When Header Is Missing In Request
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Send request without header to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
     Send Get Request And Validate Response  ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME}  400
 
 Report Bad Request Error When CSR Is Not Valid
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Send request to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
     Send Get Request with Header And Expect Error  ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME}  ${INVALID_CSR_FILE}  ${VALID_CLIENT_PK_FILE}  400
 
 Report Bad Request Error When PK Is Not Valid
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Send request to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
     Send Get Request with Header And Expect Error  ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME}  ${VALID_CLIENT_CSR_FILE}  ${INVALID_PK_FILE}  400
 
 Cert Service Client successfully creates keystore.p12 and truststore.p12
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Run with correct env and expected exit code 0
     Run Cert Service Client And Validate PKCS12 File Creation And Client Exit Code  ${VALID_ENV_FILE}  0
 
 Cert Service Client successfully creates keystore.jks and truststore.jks
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Run with correct env and expected exit code 0
     Run Cert Service Client And Validate JKS File Creation And Client Exit Code  ${VALID_ENV_FILE_JKS}  0
 
 Cert Service Client successfully creates keystore and truststore with expected data with no OUTPUT_TYPE
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Run with correct env and PKCS12 files created with correct data
     Run Cert Service Client And Validate PKCS12 Files Contain Expected Data  ${VALID_ENV_FILE}  0
 
 Cert Service Client successfully creates keystore and truststore with expected data with OUTPUT_TYPE=JKS
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Run with correct env and JKS files created with correct data
     Run Cert Service Client And Validate JKS Files Contain Expected Data  ${VALID_ENV_FILE_JKS}  0
 
 Cert Service Client successfully creates keystore and truststore with expected data with OUTPUT_TYPE=P12
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Run with correct env and PKCS12 files created with correct data
     Run Cert Service Client And Validate PKCS12 Files Contain Expected Data  ${VALID_ENV_FILE_P12}  0
 
 Cert Service Client successfully creates keystore and truststore with expected data with OUTPUT_TYPE=PEM
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Run with correct env and PEM files created with correct data
     Run Cert Service Client And Validate PEM Files Contain Expected Data  ${VALID_ENV_FILE_PEM}  0
 
 Cert Service Client reports error when OUTPUT_TYPE is invalid
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Run with invalid OUTPUT_TYPE env and expected exit code 1
     Run Cert Service Client And Validate Client Exit Code  ${INVALID_ENV_FILE_OUTPUT_TYPE}  1
 
 Run Cert Service Client Container And Validate Exit Code And API Response
-    [Tags]      AAF-CERT-SERVICE
+    [Tags]      OOM-CERT-SERVICE
     [Documentation]  Run with invalid CaName env and expected exit code 5
     Run Cert Service Client And Validate Http Response Code And Client Exit Code  ${INVALID_ENV_FILE}  404  5
 
@@ -29,7 +29,7 @@ class CertClientManager:
             network=network,
             user='root',  # Run container as root to avoid permission issues with volume mount access
             mounts=[Mount(target='/var/certs', source=self.mount_path, type='bind'),
-                    Mount(target='/etc/onap/aaf/certservice/certs/', source=self.truststore_path, type='bind')],
+                    Mount(target='/etc/onap/oom-platform-cert-service/certservice/certs/', source=self.truststore_path, type='bind')],
             detach=True
         )
         exitcode = container.wait()
@@ -15,7 +15,7 @@ Library           ../libraries/PemArtifactsValidator.py  ${MOUNT_PATH}
 Create sessions
     [Documentation]  Create all required sessions
     ${certs}=  Create List  ${CERTSERVICE_SERVER_CRT}  ${CERTSERVICE_SERVER_KEY}
-    Create Client Cert Session  alias  ${AAFCERT_URL}  client_certs=${certs}  verify=${ROOTCA}
+    Create Client Cert Session  alias  ${OOMCERT_URL}  client_certs=${certs}  verify=${ROOTCA}
     Set Suite Variable  ${https_valid_cert_session}  alias
 
 Run Healthcheck
diff --git a/tests/oom-platform-cert-service/certservice/resources/cert-service-properties.robot b/tests/oom-platform-cert-service/certservice/resources/cert-service-properties.robot
new file mode 100644 (file)
index 0000000..ff0500a
--- /dev/null
@@ -0,0 +1,31 @@
+*** Variables ***
+
+${CERT_SERVICE_CONTAINER_NAME}           oom-cert-service
+${CERT_SERVICE_PORT}                     8443
+${OOMCERT_URL}                           https://localhost:${cert_service_port}
+${CLIENT_CA_NAME}                        Client
+${RA_CA_NAME}                            RA
+${CERT_SERVICE_ENDPOINT}                 /v1/certificate/
+${ROOTCA}                                %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/root.crt
+${CERTSERVICE_SERVER_CRT}                %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/certServiceServer.crt
+${CERTSERVICE_SERVER_KEY}                %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/certServiceServer.key
+${VALID_CLIENT_CSR_FILE}                 %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client.csr
+${VALID_CLIENT_PK_FILE}                  %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client.pk
+${VALID_RA_CSR_FILE}                     %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_ra.csr
+${VALID_RA_PK_FILE}                      %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_ra.pk
+${INVALID_CSR_FILE}                      %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/invalid.csr
+${INVALID_PK_FILE}                       %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/invalid.key
+
+
+${CERT_SERVICE_ADDRESS}                  https://${CERT_SERVICE_CONTAINER_NAME}:${CERT_SERVICE_PORT}
+${VALID_ENV_FILE}                        %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env
+${VALID_ENV_FILE_JKS}                    %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env
+${VALID_ENV_FILE_P12}                    %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env
+${VALID_ENV_FILE_PEM}                    %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env
+${INVALID_ENV_FILE_OUTPUT_TYPE}          %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env
+${INVALID_ENV_FILE}                      %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env
+${DOCKER_CLIENT_IMAGE}                   nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:latest
+${CLIENT_CONTAINER_NAME}                 %{ClientContainerName}
+${CERT_SERVICE_NETWORK}                  certservice_certservice
+${MOUNT_PATH}                            %{WORKSPACE}/tests/oom-platform-cert-service/certservice/tmp
+${TRUSTSTORE_PATH}                       %{WORKSPACE}/plans/oom-platform-cert-service/certservice/certs
index d3df9cc..c229bcf 100644 (file)
@@ -41,7 +41,7 @@ RetrievePolicyTypes
 CreateTCAPolicyTypeV1
      [Documentation]    Create TCA Policy Type Version 1. Trying to create an existing policy type with any change and same version should cause error.
      ${auth}=    Create List    healthcheck    zb!XztG34
-     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
+     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.tcagen2.v1.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
@@ -52,7 +52,7 @@ CreateTCAPolicyTypeV1
 CreateTCAPolicyTypeV2
      [Documentation]    Create TCA Policy Type Version 2
      ${auth}=    Create List    healthcheck    zb!XztG34
-     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json
+     ${postjson}=  Get file  ${CURDIR}/data/onap.policy.monitoring.tcagen2.v2.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
@@ -82,7 +82,7 @@ CreateNewMonitoringPolicyV1
      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}
+     ${resp}=   Post Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies  data=${postjson}   headers=${headers}
      Log    Received response from policy ${resp.text}
      ${postjsonobject}   To Json    ${postjson}
      Should Be Equal As Strings    ${resp.status_code}     200
@@ -121,7 +121,7 @@ RetrievePoliciesOfType
      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}=   Get Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies     headers=${headers}
+     ${resp}=   Get Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies     headers=${headers}
      Log    Received response from policy ${resp.text}
      ${expjsonobject}   To Json    ${expjson}
      Should Be Equal As Strings    ${resp.status_code}     200
@@ -173,10 +173,10 @@ DeleteSpecificPolicyV2
      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}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0     headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0     headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0     headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0     headers=${headers}
      Should Be Equal As Strings    ${resp.status_code}     404
 
 DeleteSpecificPolicyTypeV1
@@ -185,10 +185,10 @@ DeleteSpecificPolicyTypeV1
      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}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0    headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0    headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0    headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0    headers=${headers}
      Should Be Equal As Strings    ${resp.status_code}     404
 
 DeleteSpecificPolicyTypeV2
@@ -197,8 +197,8 @@ DeleteSpecificPolicyTypeV2
      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}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0    headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/2.0.0    headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
-     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0    headers=${headers}
+     ${resp}=   Delete Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/2.0.0    headers=${headers}
      Should Be Equal As Strings    ${resp.status_code}     404
@@ -6,11 +6,11 @@
       "version": "1.0.0",
       "description": "a base policy type for all policies that governs monitoring provisioning"
     },
-    "onap.policies.monitoring.cdap.tca.hi.lo.app": {
+    "onap.policies.monitoring.tcagen2": {
       "derived_from": "onap.policies.Monitoring",
       "version": "1.0.0",
       "properties": {
-        "tca_policy": {
+        "tca.policy": {
           "type": "onap.datatypes.monitoring.tca_policy",
           "description": "TCA Policy JSON"
         }
@@ -1,11 +1,11 @@
 {
   "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
   "policy_types": {
-    "onap.policies.monitoring.cdap.tca.hi.lo.app": {
+    "onap.policies.monitoring.tcagen2": {
       "derived_from": "onap.policies.Monitoring",
       "version": "2.0.0",
       "properties": {
-        "tca_policy": {
+        "tca.policy": {
           "type": "onap.datatypes.monitoring.tca_policy",
           "description": "TCA Policy JSON"
         }
index 1079c7c..d57a64c 100644 (file)
@@ -4,14 +4,14 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "1.0.0",
                     "type_version": "1.0.0",
                     "metadata": {
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy" : {
+                        "tca.policy" : {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index 35ad3c5..12e066e 100644 (file)
@@ -4,7 +4,7 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "1.0.0",
                     "type_version": "1.0.0",
                     "description": "monitoring policy",
@@ -12,7 +12,7 @@
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy" : {
+                        "tca.policy" : {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index c6b2ad2..cd4be20 100644 (file)
@@ -4,14 +4,14 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "2.0.0",
                     "type_version": "1.0.0",
                     "metadata": {
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy" : {
+                        "tca.policy" : {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index ea04c0e..1b63563 100644 (file)
@@ -13,7 +13,7 @@
                     "properties": {},
                     "supportedPolicyTypes": [
                         {
-                            "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                            "name": "onap.policies.monitoring.tcagen2",
                             "version": "1.0.0"
                         }
                     ],
@@ -25,7 +25,7 @@
                     "properties": {},
                     "supportedPolicyTypes": [
                         {
-                            "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                            "name": "onap.policies.monitoring.tcagen2",
                             "version": "1.0.0"
                         }
                     ],
index 3003d9a..8ec03fe 100644 (file)
@@ -4,14 +4,14 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "1.0.0",
                     "type_version": "1.0.0",
                     "metadata": {
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy": {
+                        "tca.policy": {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index 67a5782..5387e85 100644 (file)
@@ -12,7 +12,7 @@ LoadPolicy
      ${session}=    Create Session      policy  https://${POLICY_API_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
      ${postjson}=  Get file  ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.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}
+     ${resp}=   Post Request     policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies    data=${postjson}     headers=${headers}
      Log    Received response from API ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
 
index 3003d9a..8ec03fe 100644 (file)
@@ -4,14 +4,14 @@
         "policies": [
             {
                 "onap.restart.tca": {
-                    "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                    "type": "onap.policies.monitoring.tcagen2",
                     "version": "1.0.0",
                     "type_version": "1.0.0",
                     "metadata": {
                         "policy-id": "onap.restart.tca"
                     },
                     "properties": {
-                        "tca_policy": {
+                        "tca.policy": {
                             "domain": "measurementsForVfScaling",
                             "metricsPerEventName": [
                                 {
index 6e2fa00..150c97e 100644 (file)
@@ -52,7 +52,7 @@ CreateMonitorPolicy
      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}
+     ${resp}=   Post Request   policy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/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