diff options
Diffstat (limited to 'plans/dcaegen2-services-pmsh')
5 files changed, 46 insertions, 179 deletions
diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/application_config.yaml b/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/application_config.yaml new file mode 100644 index 00000000..84c6c74b --- /dev/null +++ b/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/application_config.yaml @@ -0,0 +1,41 @@ +{ + "control_loop_name": "pmsh-control-loop", + "operational_policy_name": "pmsh-operational-policy", + "cert_path": "/opt/app/pmsh/etc/certs/cert.pem", + "enable_tls": true, + "ca_cert_path": "/opt/app/pmsh/etc/certs/cacert.pem", + "streams_publishes": { + "policy_pm_publisher": { + "dmaap_info": { + "client_id": "1475976809466", + "client_role": "org.onap.dcae.pmPublisher", + "topic_url": "http://mr-sim:3904/events/unauthenticated.DCAE_CL_OUTPUT", + "location": "san-francisco" + }, + "type": "message_router" + } + }, + "streams_subscribes": { + "aai_subscriber": { + "type": "message_router", + "dmaap_info": { + "client_id": "1575976809466", + "client_role": "org.onap.dcae.aaiSub", + "topic_url": "http://mr-sim:3904/events/AAI-EVENT", + "location": "san-francisco" + } + }, + "policy_pm_subscriber": { + "dmaap_info": { + "location": "san-francisco", + "topic_url": "http://mr-sim:3904/events/unauthenticated.PMSH_CL_INPUT", + "client_role": "org.onap.dcae.pmSubscriber", + "client_id": "1575876809456" + }, + "type": "message_router" + } + }, + "key_path": "/opt/app/pmsh/etc/certs/key.pem", + "aaf_identity": "dcae@dcae.onap.org", + "aaf_password": "demo123456!" +}
\ No newline at end of file diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs-initializer.json b/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs-initializer.json deleted file mode 100644 index 0c3592b4..00000000 --- a/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs-initializer.json +++ /dev/null @@ -1,124 +0,0 @@ -[ - { - "httpRequest": { - "path": "/service_component_all/.*" - }, - "httpResponse": { - "statusCode": 200, - "headers": { - "content-type": [ - "application/json" - ] - }, - "body": { - "type": "JSON", - "json": { - "config": { - "control_loop_name": "pmsh-control-loop", - "operational_policy_name": "pmsh-operational-policy", - "cert_path": "/opt/app/pmsh/etc/certs/cert.pem", - "enable_tls": true, - "ca_cert_path": "/opt/app/pmsh/etc/certs/cacert.pem", - "pmsh_policy": { - "subscription": { - "subscriptionName": "ExtraPM-All-gNB-R2B", - "administrativeState": "LOCKED", - "fileBasedGP": 15, - "fileLocation":"\/pm\/pm.xml", - "nfFilter": { - "nfNames": [ - "^pnf.*", - "^vnf.*" - ], - "modelInvariantIDs": [ - "7129e420-d396-4efb-af02-6b83499b12f8" - ], - "modelVersionIDs": [ - ], - "modelNames": [ - ] - }, - "measurementGroups": [ - { - "measurementGroup": { - "measurementTypes": [ - { - "measurementType": "countera" - }, - { - "measurementType": "counterb" - } - ], - "managedObjectDNsBasic": [ - { - "DN": "dna" - }, - { - "DN": "dnb" - } - ] - } - }, - { - "measurementGroup": { - "measurementTypes": [ - { - "measurementType": "counterc" - }, - { - "measurementType": "counterd" - } - ], - "managedObjectDNsBasic": [ - { - "DN": "dnc" - }, - { - "DN": "dnd" - } - ] - } - } - ] - } - }, - "streams_publishes": { - "policy_pm_publisher": { - "dmaap_info": { - "client_id": "1475976809466", - "client_role": "org.onap.dcae.pmPublisher", - "topic_url": "http://mr-sim:3904/events/unauthenticated.DCAE_CL_OUTPUT", - "location": "san-francisco" - }, - "type": "message_router" - } - }, - "streams_subscribes": { - "aai_subscriber": { - "type": "message_router", - "dmaap_info": { - "client_id": "1575976809466", - "client_role": "org.onap.dcae.aaiSub", - "topic_url": "http://mr-sim:3904/events/AAI-EVENT", - "location": "san-francisco" - } - }, - "policy_pm_subscriber": { - "dmaap_info": { - "location": "san-francisco", - "topic_url": "http://mr-sim:3904/events/unauthenticated.PMSH_CL_INPUT", - "client_role": "org.onap.dcae.pmSubscriber", - "client_id": "1575876809456" - }, - "type": "message_router" - } - }, - "key_path": "/opt/app/pmsh/etc/certs/key.pem", - "aaf_identity": "dcae@dcae.onap.org", - "aaf_password": "demo123456!" - } - } - } - } - } -] diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs_mockserver.properties b/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs_mockserver.properties deleted file mode 100644 index 0ef573f7..00000000 --- a/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs_mockserver.properties +++ /dev/null @@ -1,31 +0,0 @@ -####################################### -# MockServer & Proxy Example Settings # -####################################### - -# Socket & Port Settings - -# socket timeout in milliseconds (default 120000) -mockserver.maxSocketTimeout=120000 - -# Certificate Generation - -# delete KeyStore file on JVM shutdown (default true) -mockserver.deleteGeneratedKeyStoreOnExit=true -# certificate domain name (default "localhost") -mockserver.sslCertificateDomainName=localhost -# comma separated list of domain names for Subject Alternative Name domain names (default empty list) -mockserver.sslSubjectAlternativeNameDomains=cbs-sim,config-binding-service,config-binding-service.onap -# comma separated list of ip addresses for Subject Alternative Name ips (default empty list) -mockserver.sslSubjectAlternativeNameIps=127.0.0.1 - -mockserver.certificateAuthorityPrivateKey=/var/tmp/mock_server_key.pem -mockserver.certificateAuthorityCertificate=/var/tmp/mock_server_cacert.pem -#mockserver.tlsMutualAuthenticationRequired=true -#mockserver.tlsMutualAuthenticationCertificateChain=/var/tmp/cacert.pem - -# CORS - -# enable CORS for MockServer REST API -mockserver.enableCORSForAPI=true -# enable CORS for all responses -mockserver.enableCORSForAllResponses=true diff --git a/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml b/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml index a355c89c..5c37f448 100644 --- a/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml +++ b/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml @@ -30,24 +30,6 @@ services: aliases: - aai-sim - cbs-sim: - container_name: cbs-sim - image: nexus3.onap.org:10001/mockserver/mockserver:latest - command: -logLevel DEBUG -serverPort 10443 - ports: - - 10443:1080 - environment: - MOCKSERVER_PROPERTY_FILE: /config/mockserver.properties - MOCKSERVER_INITIALIZATION_JSON_PATH: /config/cbs-initializer.json - volumes: - - ./assets/cbs_sim/cbs_mockserver.properties:/config/mockserver.properties - - ./assets/cbs_sim/cbs-initializer.json:/config/cbs-initializer.json - - ./assets/ssl_certs/mock_server_cacert.pem:/var/tmp/mock_server_cacert.pem - - ./assets/ssl_certs/mock_server_key.pem:/var/tmp/mock_server_key.pem - networks: - net: - aliases: - - cbs-sim mr-sim: container_name: mr-sim image: nexus3.onap.org:10001/mockserver/mockserver:latest @@ -76,14 +58,15 @@ services: - ./assets/ssl_certs/cert.pem:/opt/app/pmsh/etc/certs/cert.pem - ./assets/ssl_certs/key.pem:/opt/app/pmsh/etc/certs/key.pem - ./assets/ssl_certs/mock_server_cacert.pem:/opt/app/pmsh/etc/certs/cacert.pem + - ./assets/cbs_sim/application_config.yaml:/app-config/application_config.yaml environment: HOSTNAME: "dcae-pmsh" - CONFIG_BINDING_SERVICE: cbs-sim PMSH_PG_URL: db PMSH_PG_USERNAME: $DB_USER PMSH_PG_PASSWORD: $DB_PASSWORD AAI_SERVICE_PORT: 1080 DCAE_CA_CERTPATH: '/opt/app/pmsh/etc/certs/cacert.pem' + CBS_CLIENT_CONFIG_PATH: '/app-config/application_config.yaml' networks: net: aliases: diff --git a/plans/dcaegen2-services-pmsh/testsuite/setup.sh b/plans/dcaegen2-services-pmsh/testsuite/setup.sh index a970c361..d96b62a1 100644 --- a/plans/dcaegen2-services-pmsh/testsuite/setup.sh +++ b/plans/dcaegen2-services-pmsh/testsuite/setup.sh @@ -5,7 +5,7 @@ export DB_PASSWORD=pmsh TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-pmsh/testsuite -docker-compose -f ${TEST_PLANS_DIR}/docker-compose.yml up -d db aai cbs-sim mr-sim +docker-compose -f ${TEST_PLANS_DIR}/docker-compose.yml up -d db aai mr-sim # Slow machine running CSITs can affect db coming up in time for PMSH echo "Waiting for postgres db to come up..." @@ -79,8 +79,7 @@ for i in {0..5}; do else sleep ${i} fi - if [[ $(docker inspect --format '{{ .State.Running }}' cbs-sim) ]] && \ - [[ $(docker inspect --format '{{ .State.Running }}' aai-sim) ]] && \ + if [[ $(docker inspect --format '{{ .State.Running }}' aai-sim) ]] && \ [[ $(docker inspect --format '{{ .State.Running }}' mr-sim) ]] && \ [[ $(docker inspect --format '{{ .State.Running }}' db) ]] && \ [[ $(docker inspect --format '{{ .State.Running }}' pmsh) ]] @@ -91,8 +90,7 @@ done [[ "$containers_ok" == "false" ]] && echo "Error: required container not running." && exit 1 DB_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" db) -CBS_SIM_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" cbs-sim) MR_SIM_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" mr-sim) #Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v PMSH_IP:${PMSH_IP} -v MR_SIM_IP_ADDRESS:${MR_SIM_IP_ADDRESS} -v DB_IP_ADDRESS:${DB_IP_ADDRESS} -v CBS_SIM_IP_ADDRESS:${CBS_SIM_IP_ADDRESS}" +ROBOT_VARIABLES="-v PMSH_IP:${PMSH_IP} -v MR_SIM_IP_ADDRESS:${MR_SIM_IP_ADDRESS} -v DB_IP_ADDRESS:${DB_IP_ADDRESS}" |