aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rwxr-xr-xplans/aaf/certservice/testplan.txt3
-rwxr-xr-xplans/ccsdk-oran/polmansuite/FTC1.sh235
-rwxr-xr-xplans/ccsdk-oran/polmansuite/FTC150.sh113
-rwxr-xr-xplans/ccsdk-oran/polmansuite/setup.sh33
-rwxr-xr-xplans/ccsdk-oran/polmansuite/teardown.sh26
-rw-r--r--plans/ccsdk-oran/polmansuite/test_env.sh147
-rw-r--r--plans/ccsdk-oran/polmansuite/testplan.txt24
-rw-r--r--plans/ccsdk/healthcheck/setup.sh3
-rw-r--r--plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh8
-rwxr-xr-xplans/dcaegen2-collectors-datafile/Functional-suite/testplan.txt1
-rw-r--r--plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai-initializer.json58
-rw-r--r--plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai_mockserver.properties5
-rw-r--r--plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs-initializer.json16
-rw-r--r--plans/dcaegen2-services-pmsh/testsuite/assets/mr_sim/mr-initializer.json27
-rw-r--r--plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml6
-rw-r--r--plans/dcaegen2-services-pmsh/testsuite/setup.sh2
-rw-r--r--plans/dcaegen2-services-pmsh/testsuite/teardown.sh2
-rw-r--r--plans/dcaegen2-services-son-handler/testsuites/config/dmaap/MsgRtrApi.properties172
-rw-r--r--plans/dcaegen2-services-son-handler/testsuites/config/sonhms/config_all.json134
-rw-r--r--plans/dcaegen2-services-son-handler/testsuites/docker-compose.yaml94
-rw-r--r--plans/dcaegen2-services-son-handler/testsuites/setup.sh61
-rw-r--r--plans/dcaegen2-services-son-handler/testsuites/teardown.sh9
-rw-r--r--plans/dcaegen2-services-son-handler/testsuites/testplan.txt (renamed from plans/vfc-nfvo-driver-sfc/sanity-check/testplan.txt)2
-rwxr-xr-xplans/dcaegen2/testsuites/setup.sh2
-rw-r--r--plans/modeling-etsicatalog/sanity-check/setup.sh10
-rw-r--r--plans/oom-platform-cert-service/certservice/certs/Makefile (renamed from plans/aaf/certservice/certs/Makefile)10
-rw-r--r--plans/oom-platform-cert-service/certservice/cmpServers.json (renamed from plans/aaf/certservice/cmpServers.json)4
-rw-r--r--plans/oom-platform-cert-service/certservice/docker-compose.yml (renamed from plans/aaf/certservice/docker-compose.yml)20
-rwxr-xr-xplans/oom-platform-cert-service/certservice/scripts/ejbca-configuration.sh (renamed from plans/aaf/certservice/scripts/ejbca-configuration.sh)0
-rw-r--r--plans/oom-platform-cert-service/certservice/setup.sh (renamed from plans/aaf/certservice/setup.sh)29
-rw-r--r--plans/oom-platform-cert-service/certservice/teardown.sh (renamed from plans/aaf/certservice/teardown.sh)2
-rwxr-xr-x[-rw-r--r--]plans/oom-platform-cert-service/certservice/testplan.txt (renamed from plans/vfc-nfvo-driver-ems/sanity-check/testplan.txt)2
-rw-r--r--plans/oom-platform-cert-service/truststoremerger/setup.sh (renamed from plans/vfc-nfvo-multivimproxy/sanity-check/teardown.sh)18
-rw-r--r--[-rwxr-xr-x]plans/oom-platform-cert-service/truststoremerger/teardown.sh (renamed from plans/vfc-nfvo-driver-ems/sanity-check/teardown.sh)8
-rwxr-xr-x[-rw-r--r--]plans/oom-platform-cert-service/truststoremerger/testplan.txt (renamed from plans/vfc-nfvo-multivimproxy/sanity-check/testplan.txt)2
-rw-r--r--plans/policy/api/setup.sh25
-rw-r--r--plans/policy/pap/setup.sh7
-rw-r--r--plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh4
-rw-r--r--plans/sdnc/sdnc_netconf_tls_post_deploy/teardown.sh1
-rw-r--r--plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json2
-rw-r--r--plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json6
-rw-r--r--plans/usecases-5G-bulkpm/5G-bulkpm/composefile/docker-compose-e2e.yml3
-rw-r--r--plans/usecases-5G-bulkpm/5G-bulkpm/setup.sh7
-rwxr-xr-xplans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/cds/resources/aai.cert57
-rwxr-xr-xplans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/docker-compose.yml2
-rwxr-xr-xplans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/pnf-sw-upgrade.yang4
-rwxr-xr-xplans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/startup.xml19
-rw-r--r--[-rwxr-xr-x]plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/aai-certificate/aai.cert57
-rw-r--r--plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/root-certificate/root.crt32
-rwxr-xr-xplans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/docker-compose.yml2
-rwxr-xr-xplans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/application.yaml8
-rw-r--r--plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/keystore.p12bin0 -> 5526 bytes
-rwxr-xr-xplans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/org.onap.so.p12bin4047 -> 0 bytes
-rw-r--r--plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/truststore.jksbin0 -> 3202 bytes
-rwxr-xr-xplans/vfc-gvnfm-vnflcm/sanity-check/setup.sh10
-rwxr-xr-xplans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh13
-rwxr-xr-xplans/vfc-gvnfm-vnfres/sanity-check/setup.sh13
-rwxr-xr-xplans/vfc-nfvo-driver-ems/sanity-check/setup.sh62
-rwxr-xr-xplans/vfc-nfvo-driver-sfc/sanity-check/setup.sh62
-rwxr-xr-xplans/vfc-nfvo-driver-sfc/sanity-check/teardown.sh22
-rwxr-xr-xplans/vfc-nfvo-lcm/sanity-check/setup.sh10
-rw-r--r--plans/vfc-nfvo-multivimproxy/sanity-check/setup.sh44
-rw-r--r--plans/vfc-nfvo-resmanagement/sanity-check/setup.sh44
-rw-r--r--plans/vfc-nfvo-resmanagement/sanity-check/teardown.sh22
-rw-r--r--plans/vfc-nfvo-resmanagement/sanity-check/testplan.txt3
-rw-r--r--plans/vfc-nfvo-wfengine/sanity-check/setup.sh91
-rw-r--r--plans/vfc-nfvo-wfengine/sanity-check/teardown.sh29
-rw-r--r--plans/vfc-nfvo-wfengine/sanity-check/testplan.txt4
-rwxr-xr-xrun-csit.sh18
-rwxr-xr-xscripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh1
-rwxr-xr-xscripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh56
-rw-r--r--scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml5
-rw-r--r--scripts/dcaegen2-services-son-handler/sonhandler/Dockerfile15
-rw-r--r--scripts/dcaegen2-services-son-handler/sonhandler/configdb-oof-sim.py98
-rw-r--r--scripts/dcaegen2-services-son-handler/sonhandler/sim-data/cell_data.json13
-rw-r--r--scripts/dcaegen2-services-son-handler/sonhandler/sim-data/cell_list.json60
-rw-r--r--scripts/dcaegen2-services-son-handler/sonhandler/sim-data/oof_async_response.json14
-rw-r--r--scripts/dcaegen2-services-son-handler/sonhandler/sim-data/oof_syn_response.json6
-rw-r--r--scripts/dcaegen2-services-son-handler/sonhandler/sim-data/pci_value.json4
-rw-r--r--scripts/policy/docker-compose-drools.yml3
-rw-r--r--scripts/policy/docker-compose-pap.yml12
-rw-r--r--scripts/policy/drools-apps/custom/papDefaultConfig.json2
-rwxr-xr-xscripts/sdnc/netconf-pnp-simulator/docker-compose.yml2
-rw-r--r--tests/aaf/certservice/libraries/JksFilesValidator.py70
-rw-r--r--tests/aaf/certservice/resources/cert-service-properties.robot27
-rw-r--r--tests/ccsdk-oran/polmansuite/__init__.robot2
-rw-r--r--tests/ccsdk-oran/polmansuite/test.robot23
-rw-r--r--tests/dcaegen2-collectors-datafile/resources/common-keywords.robot18
-rwxr-xr-xtests/dcaegen2-collectors-datafile/testsuites/Functional-Single-File-suite/FuncSingleFile.robot238
-rwxr-xr-xtests/dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite/StrictHostChecking.robot112
-rwxr-xr-xtests/dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite/__init__.robot2
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/A20181004.0000-1000-0015-1000_5G.xml14
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.xml16
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/PM202007171301+020024C202007171207+0200-1215+0200_45678.xml88
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json2
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json42
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot75
-rw-r--r--tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py2
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json16
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json14
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json14
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json15
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json39
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/pmsh.robot21
-rw-r--r--tests/dcaegen2-services-son-handler/testcases/data/expected_payload_fm.json1
-rw-r--r--tests/dcaegen2-services-son-handler/testcases/data/expected_payload_pm.json1
-rw-r--r--tests/dcaegen2-services-son-handler/testcases/data/fault_notification.json35
-rw-r--r--tests/dcaegen2-services-son-handler/testcases/data/negative_ack_from_policy.json10
-rw-r--r--tests/dcaegen2-services-son-handler/testcases/data/performance_notification.json42
-rw-r--r--tests/dcaegen2-services-son-handler/testcases/sonhandler-test.robot95
-rw-r--r--tests/dcaegen2/testcases/01__no_auth_tests.robot107
-rw-r--r--tests/dcaegen2/testcases/02__cert_basic_auth_tests.robot (renamed from tests/dcaegen2/testcases/dcae_ves.robot)120
-rw-r--r--tests/dcaegen2/testcases/03__stndDefined_tests.robot87
-rw-r--r--tests/dcaegen2/testcases/__init__.robot9
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/CommonEventFormat_30.2_ONAP.json3087
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json54
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-FaultSupervision.json54
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Heartbeat.json54
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-PerformanceAssurance.json54
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning.json54
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning_missing_sourceName.json44
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_data_fields.json23
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_namespace.json54
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_incorrect_schema_ref.json54
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_data_fields_no_schema_ref.json22
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_type_data_field.json54
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_missing_namespace.json53
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_no_value.json54
-rw-r--r--tests/dcaegen2/testcases/resources/DMaaP.py413
-rw-r--r--tests/dcaegen2/testcases/resources/DcaeLibrary.py172
-rwxr-xr-xtests/dcaegen2/testcases/resources/collector_basic_auth.properties (renamed from tests/dcaegen2/testcases/resources/collector.properties)18
-rw-r--r--tests/dcaegen2/testcases/resources/collector_stnd_defined.properties73
-rw-r--r--tests/dcaegen2/testcases/resources/dcae_keywords.robot46
-rw-r--r--tests/dcaegen2/testcases/resources/dcae_properties.robot15
-rwxr-xr-xtests/dcaegen2/testcases/resources/override_collector_properties.sh (renamed from tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh)18
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py (renamed from tests/dcaegen2/testcases/resources/CertsLibrary.py)0
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py112
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/DcaeVariables.py (renamed from tests/dcaegen2/testcases/resources/DcaeVariables.py)6
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py79
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/README.md14
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/__init__.py0
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py73
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPQueue.py48
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py22
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/__init__.py0
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/dmaap_test/__init__.py0
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/dmaap_test/requirements.txt23
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSQueue.py52
-rw-r--r--tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSimulator.py62
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/invalid.csr (renamed from tests/aaf/certservice/assets/invalid.csr)0
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/invalid.key (renamed from tests/aaf/certservice/assets/invalid.key)0
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env (renamed from tests/aaf/certservice/assets/invalid_client_docker.env)4
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env17
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/valid_client.csr (renamed from tests/aaf/certservice/assets/valid_client.csr)0
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/valid_client.pk (renamed from tests/aaf/certservice/assets/valid_client.pk)0
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env (renamed from tests/aaf/certservice/assets/valid_client_docker.env)4
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env17
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env17
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env17
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/valid_ra.csr (renamed from tests/aaf/certservice/assets/valid_ra.csr)0
-rw-r--r--tests/oom-platform-cert-service/certservice/assets/valid_ra.pk (renamed from tests/aaf/certservice/assets/valid_ra.pk)0
-rw-r--r--tests/oom-platform-cert-service/certservice/cert-service-test.robot (renamed from tests/aaf/certservice/cert-service-test.robot)57
-rw-r--r--tests/oom-platform-cert-service/certservice/libraries/ArtifactParser.py40
-rw-r--r--tests/oom-platform-cert-service/certservice/libraries/CertClientManager.py (renamed from tests/aaf/certservice/libraries/CertClientManager.py)2
-rw-r--r--tests/oom-platform-cert-service/certservice/libraries/EnvsReader.py (renamed from tests/aaf/certservice/libraries/EnvsReader.py)0
-rw-r--r--tests/oom-platform-cert-service/certservice/libraries/JksArtifactsValidator.py45
-rw-r--r--tests/oom-platform-cert-service/certservice/libraries/P12ArtifactsValidator.py37
-rw-r--r--tests/oom-platform-cert-service/certservice/libraries/PemArtifactsValidator.py39
-rw-r--r--tests/oom-platform-cert-service/certservice/resources/cert-service-keywords.robot (renamed from tests/aaf/certservice/resources/cert-service-keywords.robot)47
-rw-r--r--tests/oom-platform-cert-service/certservice/resources/cert-service-properties.robot31
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jksbin0 -> 2560 bytes
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks.bakbin0 -> 2560 bytes
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/jksAndPemAndP12.jksbin0 -> 3923 bytes
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/pemAndP12.pem63
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_different_lists_size.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_duplicated_aliases.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_certs.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_file.env0
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_keystore_destination_path.env3
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_passwords.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_extension.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_file_password_pair.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_keystore_source_paths.env4
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_password_path.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/invalid_truststore_paths.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/truststores/empty.pem0
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.jksbin0 -> 2560 bytes
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.pass1
-rw-r--r--[-rwxr-xr-x]tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.jks (renamed from plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/org.onap.so.trust.jks)bin1413 -> 1413 bytes
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.p12bin0 -> 1530 bytes
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pem28
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreJks.pass1
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreP12.pass1
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/valid_envs_and_extra_optional.env4
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/valid_jks_pem_p12.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/valid_pem_p12.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/assets/valid_single_truststore.env2
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/libraries/EnvsReader.py11
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/libraries/JksValidator.py28
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/libraries/PemTruststoreValidator.py19
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/libraries/TrustMergerManager.py47
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot44
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-properties.robot61
-rw-r--r--tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot88
-rw-r--r--tests/policy/api/api-test.robot63
-rw-r--r--tests/policy/api/data/onap.policy.monitoring.tcagen2.v1.json (renamed from tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json)4
-rw-r--r--tests/policy/api/data/onap.policy.monitoring.tcagen2.v2.json (renamed from tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json)4
-rw-r--r--tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json51
-rw-r--r--tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json52
-rw-r--r--tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json51
-rw-r--r--tests/policy/pap/data/create.group.request.json4
-rw-r--r--tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json51
-rw-r--r--tests/policy/pap/pap-test.robot4
-rw-r--r--tests/policy/xacml-pdp/data/onap.policy.naming.decision.request.json2
-rw-r--r--tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json51
-rw-r--r--tests/policy/xacml-pdp/xacml-pdp-test.robot2
-rw-r--r--tests/sdnc/sdnc_netconf_tls_post_deploy/csr/netconf_pnp_simulator_csr.env1
-rw-r--r--tests/sdnc/sdnc_netconf_tls_post_deploy/csr/sdnc_csr.env1
-rw-r--r--tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/ClientManager.py76
-rwxr-xr-xtests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config_tls.sh104
-rw-r--r--tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot4
-rw-r--r--tests/so/etsi/data/notification.json26
-rw-r--r--tests/so/etsi/etsi_tests.robot9
-rw-r--r--tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot4
-rwxr-xr-xtests/vfc/nfvo-driver-ems/test.robot21
-rw-r--r--tests/vfc/nfvo-driver-sfc/test.robot21
-rw-r--r--tests/vfc/nfvo-lcm/test.robot44
-rw-r--r--tests/vfc/nfvo-multivimproxy/test.robot24
-rw-r--r--tests/vfc/nfvo-resmanagement/test.robot24
-rw-r--r--tests/vfc/nfvo-wfengine/workflow.robot113
231 files changed, 7904 insertions, 2289 deletions
diff --git a/.gitignore b/.gitignore
index aab016a5..5eb35781 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,6 @@ env.properties
*.pyc
/bin/
+/venv/*
+
+/tests/aaf/certservice/tmp/*
diff --git a/plans/aaf/certservice/testplan.txt b/plans/aaf/certservice/testplan.txt
deleted file mode 100755
index 270fc6d4..00000000
--- a/plans/aaf/certservice/testplan.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [integration/csit.git]/tests/.
-# Place the suites in run order.
-aaf/certservice
diff --git a/plans/ccsdk-oran/polmansuite/FTC1.sh b/plans/ccsdk-oran/polmansuite/FTC1.sh
new file mode 100755
index 00000000..26398d55
--- /dev/null
+++ b/plans/ccsdk-oran/polmansuite/FTC1.sh
@@ -0,0 +1,235 @@
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+
+
+TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete a policy using http/https and Agent REST/DMAAP with/without SDNC controller"
+
+#App names to exclude checking pulling images for, space separated list
+EXCLUDED_IMAGES="SDNC SDNC_ONAP"
+
+. ../common/testcase_common.sh $@
+. ../common/agent_api_functions.sh
+. ../common/ricsimulator_api_functions.sh
+
+#### TEST BEGIN ####
+
+
+generate_uuid
+
+####################################
+####################################
+######## LIMITED TEST SCOPE ########
+######## THIS FILE SHALL ########
+######## BE REMOVED WHEN ########
+######## THE SDNC IMAGE ########
+######## IS OK ########
+####################################
+####################################
+# Tested variants of REST/DMAAP/SDNC config
+TESTED_VARIANTS="REST DMAAP"
+#Test agent and simulator protocol versions (others are http only)
+TESTED_PROTOCOLS="HTTP HTTPS"
+
+for __httpx in $TESTED_PROTOCOLS ; do
+ for interface in $TESTED_VARIANTS ; do
+
+ echo "#####################################################################"
+ echo "#####################################################################"
+ echo "### Testing agent: $interface using $__httpx"
+ echo "#####################################################################"
+ echo "#####################################################################"
+
+ #Local vars in test script
+ ##########################
+
+ if [ $__httpx == "HTTPS" ]; then
+ # Path to callback receiver
+ CR_PATH="https://$CR_APP_NAME:$CR_EXTERNAL_SECURE_PORT/callbacks"
+ use_cr_https
+ else
+ # Path to callback receiver
+ CR_PATH="http://$CR_APP_NAME:$CR_EXTERNAL_PORT/callbacks"
+ use_cr_http
+ fi
+
+ # Clean container and start all needed containers #
+ clean_containers
+
+ if [ $__httpx == "HTTPS" ]; then
+ #"Using secure ports towards simulators"
+ use_simulator_https
+ else
+ #"Using non-secure ports towards simulators"
+ use_simulator_http
+ fi
+
+ start_ric_simulators ricsim_g1 1 OSC_2.1.0
+ start_ric_simulators ricsim_g2 1 STD_1.1.3
+
+ start_mr
+
+ if [ $__httpx == "HTTPS" ]; then
+ #echo "Using secure ports between agent and MR"
+ use_mr_https
+ else
+ #"Using non-secure ports between agent and MR"
+ use_mr_http
+ fi
+
+ start_cr
+
+ if [ $interface == "REST+SDNC" ] || [ $interface == "DMAAP+SDNC" ]; then
+
+ start_sdnc
+
+ if [ $__httpx == "HTTPS" ]; then
+ # "Using secure ports towards SDNC"
+ use_sdnc_https
+ else
+ #"Using non-secure ports towards SDNC"
+ use_sdnc_http
+ fi
+ fi
+
+ start_consul_cbs
+
+ if [ $interface == "REST+SDNC" ] || [ $interface == "DMAAP+SDNC" ]; then
+ prepare_consul_config SDNC ".consul_config.json"
+ else
+ prepare_consul_config NOSDNC ".consul_config.json"
+ fi
+
+ consul_config_app ".consul_config.json"
+
+ start_control_panel
+
+ start_policy_agent
+
+ set_agent_debug
+
+ if [ $interface == "DMAAP" ] || [ $interface == "DMAAP+SDNC" ]; then
+ if [ $__httpx == "HTTPS" ]; then
+ echo "Using secure ports towards dmaap"
+ use_agent_dmaap_https
+ else
+ echo "Using non-secure ports towards dmaap"
+ use_agent_dmaap_http
+ fi
+ else
+ if [ $__httpx == "HTTPS" ]; then
+ echo "Using secure ports towards the agent"
+ use_agent_rest_https
+ else
+ echo "Using non-secure ports towards the agent"
+ use_agent_rest_http
+ fi
+ fi
+
+
+ cr_equal received_callbacks 0
+ mr_equal requests_submitted 0
+
+ sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
+
+ api_equal json:rics 2 60
+
+ api_equal json:policy_schemas 2 120
+
+ api_equal json:policy_types 2
+
+ api_equal json:policies 0
+
+ api_equal json:policy_ids 0
+
+ echo "############################################"
+ echo "############## Health check ################"
+ echo "############################################"
+
+ api_get_status 200
+
+ echo "############################################"
+ echo "##### Service registry and supervision #####"
+ echo "############################################"
+
+ api_put_service 201 "serv1" 1000 "$CR_PATH/1"
+
+ api_get_service_ids 200 "serv1"
+
+ api_put_services_keepalive 200 "serv1"
+
+ echo "############################################"
+ echo "############## RIC Repository ##############"
+ echo "############################################"
+
+ api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
+
+ echo "############################################"
+ echo "########### A1 Policy Management ###########"
+ echo "############################################"
+
+ api_put_policy 201 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT testdata/OSC/pi1_template.json
+ api_put_policy 200 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT testdata/OSC/pi1_template.json
+
+ api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT testdata/STD/pi1_template.json
+ api_put_policy 200 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT testdata/STD/pi1_template.json
+
+ api_delete_policy 204 5000
+
+ api_delete_policy 204 5100
+
+ api_equal json:policies 0
+
+ api_equal json:policy_ids 0
+
+ cr_equal received_callbacks 0
+
+ if [ $interface == "DMAAP" ] || [ $interface == "DMAAP+SDNC" ]; then
+ VAL=11 # Number of Agent API calls over DMAAP
+ mr_equal requests_fetched $VAL
+ mr_equal responses_submitted $VAL
+ mr_equal responses_fetched $VAL
+ mr_equal current_requests 0
+ mr_equal current_responses 0
+ else
+ mr_equal requests_submitted 0
+ fi
+
+ if [ $interface == "REST+SDNC" ] || [ $interface == "DMAAP+SDNC" ]; then
+ sim_contains_str ricsim_g1_1 remote_hosts "a1-controller"
+ sim_contains_str ricsim_g2_1 remote_hosts "a1-controller"
+ else
+ sim_contains_str ricsim_g1_1 remote_hosts "policy-agent"
+ sim_contains_str ricsim_g2_1 remote_hosts "policy-agent"
+ fi
+
+ check_policy_agent_logs
+ check_control_panel_logs
+
+ store_logs "${__httpx}__${interface}"
+
+ done
+
+done
+
+#### TEST COMPLETE ####
+
+
+print_result
+
+auto_clean_containers
diff --git a/plans/ccsdk-oran/polmansuite/FTC150.sh b/plans/ccsdk-oran/polmansuite/FTC150.sh
new file mode 100755
index 00000000..b65b3a5f
--- /dev/null
+++ b/plans/ccsdk-oran/polmansuite/FTC150.sh
@@ -0,0 +1,113 @@
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+
+
+TC_ONELINE_DESCR="Sample tests of the SDNC A1 controller restconf API using http/https (no agent)"
+
+#App names to exclude checking pulling images for, space separated list
+EXCLUDED_IMAGES="PA CP SDNC_ONAP"
+
+. ../common/testcase_common.sh $@
+. ../common/controller_api_functions.sh
+. ../common/ricsimulator_api_functions.sh
+
+#### TEST BEGIN ####
+
+generate_uuid
+
+#Test agent and simulator protocol versions (others are http only)
+NB_TESTED_PROTOCOLS="HTTP"
+SB_TESTED_PROTOCOLS="HTTP HTTPS"
+
+for __nb_httpx in $NB_TESTED_PROTOCOLS ; do
+ for __sb_httpx in $SB_TESTED_PROTOCOLS ; do
+
+ echo "#####################################################################"
+ echo "#####################################################################"
+ echo "### Testing SDNC using Northbound: $__nb_httpx and Southbound: $__sb_httpx"
+ echo "#####################################################################"
+ echo "#####################################################################"
+
+
+ # Clean container and start all needed containers #
+ clean_containers
+
+ start_ric_simulators ricsim_g1 1 OSC_2.1.0
+ start_ric_simulators ricsim_g2 1 STD_1.1.3
+
+ start_sdnc
+
+ if [ $__nb_httpx == "HTTPS" ]; then
+ # "Using secure ports towards SDNC"
+ use_sdnc_https
+ else
+ #"Using non-secure ports towards SDNC"
+ use_sdnc_http
+ fi
+
+ if [ $__sb_httpx == "HTTPS" ]; then
+ # "Using secure ports towards SDNC"
+ use_simulator_https
+ else
+ #"Using non-secure ports towards SDNC"
+ use_simulator_http
+ fi
+
+ # API tests
+
+ controller_api_get_A1_policy_type 404 OSC ricsim_g1_1 1
+
+ sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
+
+
+ controller_api_get_A1_policy_ids 200 OSC ricsim_g1_1 1
+ controller_api_get_A1_policy_ids 200 STD ricsim_g2_1
+
+ controller_api_get_A1_policy_type 200 OSC ricsim_g1_1 1
+ controller_api_get_A1_policy_type 200 OSC ricsim_g1_1 1 testdata/OSC/sim_1.json
+ controller_api_get_A1_policy_type 404 OSC ricsim_g1_1 99
+
+ controller_api_put_A1_policy 200 OSC ricsim_g1_1 1 4000 testdata/OSC/pi1_template.json
+ controller_api_put_A1_policy 404 OSC ricsim_g1_1 5 1001 testdata/OSC/pi1_template.json
+ controller_api_put_A1_policy 200 STD ricsim_g2_1 5000 testdata/STD/pi1_template.json
+
+ controller_api_get_A1_policy_ids 200 OSC ricsim_g1_1 1 4000
+ controller_api_get_A1_policy_ids 200 STD ricsim_g2_1 5000
+
+ controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000
+ controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000
+
+ VAL='NOT IN EFFECT'
+ controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 "$VAL" "false"
+ controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 "UNDEFINED"
+
+ controller_api_delete_A1_policy 200 OSC ricsim_g1_1 1 4000
+ controller_api_delete_A1_policy 200 STD ricsim_g2_1 5000
+
+ store_logs "NB_"$__nb_httpx"_SB_"$__sb_httpx
+
+ done
+
+done
+
+#### TEST COMPLETE ####
+
+print_result
+
+auto_clean_containers \ No newline at end of file
diff --git a/plans/ccsdk-oran/polmansuite/setup.sh b/plans/ccsdk-oran/polmansuite/setup.sh
new file mode 100755
index 00000000..10fed96f
--- /dev/null
+++ b/plans/ccsdk-oran/polmansuite/setup.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+
+
+cd $WORKSPACE/archives
+
+git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
+
+AUTOTEST_ROOT=$WORKSPACE/archives/nonrtric/test/auto-test
+POLMAN_PLANS=$WORKSPACE/plans/ccsdk-oran/polmansuite
+
+#Copy test script, adapted to ONAP images
+cp $POLMAN_PLANS/FTC1.sh $WORKSPACE/archives/nonrtric/test/auto-test/FTC1.sh
+cp $POLMAN_PLANS/FTC150.sh $WORKSPACE/archives/nonrtric/test/auto-test/FTC150.sh
+
+#Make the env vars availble to the robot scripts
+ROBOT_VARIABLES="-b debug.log -v AUTOTEST_ROOT:${AUTOTEST_ROOT} -v POLMAN_PLANS:${POLMAN_PLANS}"
+
diff --git a/plans/ccsdk-oran/polmansuite/teardown.sh b/plans/ccsdk-oran/polmansuite/teardown.sh
new file mode 100755
index 00000000..6b0c5f6b
--- /dev/null
+++ b/plans/ccsdk-oran/polmansuite/teardown.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+
+# All started containers stopped and removed by the test case
+
+
+# Fix ownership. Mounted resources to consul changes ownership which prevents csit test cleanup
+cd $WORKSPACE/archives/nonrtric/test/simulator-group/
+sudo chown $(id -u):$(id -g) consul_cbs
+sudo chown $(id -u):$(id -g) consul_cbs/consul
+
diff --git a/plans/ccsdk-oran/polmansuite/test_env.sh b/plans/ccsdk-oran/polmansuite/test_env.sh
new file mode 100644
index 00000000..874c8bd7
--- /dev/null
+++ b/plans/ccsdk-oran/polmansuite/test_env.sh
@@ -0,0 +1,147 @@
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+
+# Set up the image and tags for the test. Do not add the image tag to the image names.
+
+# NOTE: A env var for each container is created by the test script.
+# This var will point to the local or remote var depending on how
+# the test script is started. The name format is <container-name>_IMAGE, ie with 'LOCAL' or 'REMOTE'.
+
+
+# Remote Policy Agent image and tag
+POLICY_AGENT_REMOTE_IMAGE="nexus3.onap.org:10003/onap/ccsdk-oran-a1policymanagementservice"
+POLICY_AGENT_REMOTE_IMAGE_TAG="1.1.0-SNAPSHOT"
+
+
+# Control Panel remote image and tag
+CONTROL_PANEL_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_REMOTE_IMAGE_TAG="2.0.0"
+
+
+# SDNC A1 Controller remote image and tag
+SDNC_A1_CONTROLLER_REMOTE_IMAGE="nexus3.onap.org:10003/onap/sdnc-image"
+SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="2.1.0-STAGING-latest"
+
+
+#SDNC DB remote image and tag
+SDNC_DB_REMOTE_IMAGE="mysql/mysql-server"
+SDNC_DB_REMOTE_IMAGE_TAG="5.6"
+#No local image for DB, remote image always used
+
+
+# Near RT RIC Simulator remote image and tag
+RIC_SIM_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator"
+RIC_SIM_REMOTE_IMAGE_TAG="2.0.0"
+
+
+#Consul remote image and tag
+CONSUL_REMOTE_IMAGE="consul"
+CONSUL_REMOTE_IMAGE_TAG="1.7.2"
+#No local image for Consul, remote image always used
+
+
+#CBS remote image and tag
+CBS_REMOTE_IMAGE="nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_REMOTE_IMAGE_TAG="2.3.0"
+#No local image for CBS, remote image always used
+
+
+#MR stub image and tag
+MRSTUB_LOCAL_IMAGE="mrstub"
+MRSTUB_LOCAL_IMAGE_TAG="latest"
+#No remote image for MR stub, local image always used
+
+#Callback receiver image and tag
+CR_LOCAL_IMAGE="callback-receiver"
+CR_LOCAL_IMAGE_TAG="latest"
+#No remote image for CR, local image always used
+
+# Common env var for auto-test. Vars used by docker-compose need to be exported
+export DOCKER_SIM_NWNAME="nonrtric-docker-net" # Name of docker private network
+
+export POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container)
+export POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container)
+export POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container)
+export POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container)
+
+export POLICY_AGENT_APP_NAME="policy-agent" # Name for Policy Agent container
+POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container
+export POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel
+
+export MR_EXTERNAL_PORT=3905 # MR stub container external port (host -> container)
+export MR_INTERNAL_PORT=3905 # MR stub container internal port (container -> container)
+export MR_EXTERNAL_SECURE_PORT=3906 # MR stub container external secure port (host -> container)
+export MR_INTERNAL_SECURE_PORT=3906 # MR stub container internal secure port (container -> container)
+export MR_APP_NAME="message-router" # Name for the MR
+export MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+export MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" # Path write messages to MR
+
+export CR_EXTERNAL_PORT=8090 # Callback receiver container external port (host -> container)
+export CR_INTERNAL_PORT=8090 # Callback receiver container internal port (container -> container)
+export CR_EXTERNAL_SECURE_PORT=8091 # Callback receiver container external secure port (host -> container)
+export CR_INTERNAL_SECURE_PORT=8091 # Callback receiver container internal secure port (container -> container)
+export CR_APP_NAME="callback-receiver" # Name for the Callback receiver
+
+export CONSUL_HOST="consul-server" # Host name of consul
+export CONSUL_EXTERNAL_PORT=8500 # Consul container external port (host -> container)
+export CONSUL_INTERNAL_PORT=8500 # Consul container internal port (container -> container)
+export CONSUL_APP_NAME="polman-consul" # Name for consul container
+
+export CBS_APP_NAME="polman-cbs" # Name for CBS container
+export CBS_EXTERNAL_PORT=10000 # CBS container external port (host -> container)
+export CBS_INTERNAL_PORT=10000 # CBS container internal port (container -> container)
+export CONFIG_BINDING_SERVICE="config-binding-service" # Host name of CBS
+
+export RIC_SIM_BASE="g" # Base name of the RIC Simulator container, shall be the group code
+ # Note, a prefix is added to each container name by the .env file in the 'ric' dir
+RIC_SIM_PREFIX="ricsim" # Prefix added to ric container name, added in the .env file in the 'ric' dir
+ # This prefix can be changed from the command line
+export RIC_SIM_INTERNAL_PORT=8085 # RIC Simulator container internal port (container -> container).
+ # (external ports allocated by docker)
+export RIC_SIM_INTERNAL_SECURE_PORT=8185 # RIC Simulator container internal secure port (container -> container).
+ # (external ports allocated by docker)
+
+export SDNC_APP_NAME="a1-controller" # Name of the SNDC A1 Controller container
+export SDNC_EXTERNAL_PORT=8282 # SNDC A1 Controller container external port (host -> container)
+export SDNC_INTERNAL_PORT=8181 # SNDC A1 Controller container internal port (container -> container)
+export SDNC_EXTERNAL_SECURE_PORT=8443 # SNDC A1 Controller container external securee port (host -> container)
+export SDNC_INTERNAL_SECURE_PORT=8443 # SNDC A1 Controller container internal secure port (container -> container)
+export SDNC_DB_APP_NAME="sdnc-db" # Name of the SDNC DB container
+export SDNC_A1_TRUSTSTORE_PASSWORD="a1adapter" # SDNC truststore password
+SDNC_USER="admin" # SDNC username
+SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" # SNDC PWD
+SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:" # Base url path for SNDC API
+SDNC_ALIVE_URL="/apidoc/explorer/" # Base url path for SNDC API docs (for alive check)
+SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log" # Path to karaf log
+
+
+export CONTROL_PANEL_APP_NAME="control-panel" # Name of the Control Panel container
+export CONTROL_PANEL_EXTERNAL_PORT=8080 # Control Panel container external port (host -> container)
+export CONTROL_PANEL_INTERNAL_PORT=8080 # Control Panel container external port (host -> container)
+CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log" # Path the application log in the Control Panel container
+
+UUID="" # UUID used as prefix to the policy id to simulate a real UUID
+ # Testscript need to set the UUID to use other this empty prefix is used
+
+RESTBASE="http://localhost:"$POLICY_AGENT_EXTERNAL_PORT # Base url to the Agent NB REST interface
+RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base url to the secure Agent NB REST interface
+DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT # Base url to the Dmaap adapter, http
+DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT # Base url to the Dmaap adapter, https
+ADAPTER=$RESTBASE # Adapter holds the address the agent R-APP interface (REST OR DMAAP)
+ # The values of this var is swiched between the two base url when needed
diff --git a/plans/ccsdk-oran/polmansuite/testplan.txt b/plans/ccsdk-oran/polmansuite/testplan.txt
new file mode 100644
index 00000000..29191bd8
--- /dev/null
+++ b/plans/ccsdk-oran/polmansuite/testplan.txt
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+
+
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+# Temporary change to trigger verify job.
+ccsdk-oran/polmansuite
+
diff --git a/plans/ccsdk/healthcheck/setup.sh b/plans/ccsdk/healthcheck/setup.sh
index bfc6e968..fae584d4 100644
--- a/plans/ccsdk/healthcheck/setup.sh
+++ b/plans/ccsdk/healthcheck/setup.sh
@@ -50,9 +50,6 @@ docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-odlsli-alpine-image:$CCSDK_DOCKER_IMAGE
docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION
docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION onap/ccsdk-dgbuilder-image:0.4-STAGING-latest
-docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-odlsli-image:$CCSDK_DOCKER_IMAGE_VERSION
-docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-odlsli-image:$CCSDK_DOCKER_IMAGE_VERSION onap/ccsdk-odlsli-image:0.4-STAGING-latest
-
# start CCSDK containers with docker compose and configuration from docker-compose.yml
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
diff --git a/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh b/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh
index bdee34ee..7736d4a7 100644
--- a/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh
+++ b/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh
@@ -52,11 +52,11 @@ docker build -t drsim_common:latest .
cd $SIMGROUP_ROOT
#Copy ftp config for the ftp servers
-cp -r ../ftps-sftp-server/configuration .
-cp -r ../ftps-sftp-server/tls .
+cp -r ../ftpes-sftp-server/configuration .
+cp -r ../ftpes-sftp-server/tls .
-cd ../ftps-sftp-server
-docker build -t ftps_vsftpd:latest -f Dockerfile-ftps .
+cd ../ftpes-sftp-server
+docker build -t ftpes_vsftpd:latest -f Dockerfile-ftpes .
#All containers will be started and stopped via the robot tests.
diff --git a/plans/dcaegen2-collectors-datafile/Functional-suite/testplan.txt b/plans/dcaegen2-collectors-datafile/Functional-suite/testplan.txt
index 30d7a2d7..052ab7c8 100755
--- a/plans/dcaegen2-collectors-datafile/Functional-suite/testplan.txt
+++ b/plans/dcaegen2-collectors-datafile/Functional-suite/testplan.txt
@@ -1,3 +1,4 @@
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
dcaegen2-collectors-datafile/testsuites/Functional-Single-File-suite
+dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite
diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai-initializer.json b/plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai-initializer.json
index 5406f99c..5705e325 100644
--- a/plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai-initializer.json
+++ b/plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai-initializer.json
@@ -1,7 +1,7 @@
[
{
"httpRequest": {
- "path": "/aai/v16/query.*"
+ "path": "/aai/v20/query.*"
},
"httpResponse": {
"statusCode": 200,
@@ -49,6 +49,8 @@
"serial-number": "6061ZW3",
"ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
"resource-version": "1573053304574",
+ "model-invariant-id": "7129e420-d396-4efb-af02-6b83499b12f8",
+ "model-version-id": "77c1a3d9-422a-4f78-bd8f-f7a357685b25",
"nf-role": "gNB",
"orchestration-status": "Active"
}
@@ -57,5 +59,57 @@
}
}
}
- }
+ },
+ {
+ "httpRequest":{
+ "path":"/aai/v20/service-design-and-creation/models/model.*"
+ },
+ "httpResponse":{
+ "statusCode":200,
+ "headers":{
+ "content-type":[
+ "application/json"
+ ]
+ },
+ "body":{
+ "type":"JSON",
+ "json":{
+ "model-version-id":"6d25b637-8bca-47e2-af1a-61258424183d",
+ "model-name":"PNF102",
+ "model-version":"1.0",
+ "model-description":"sartgserg",
+ "sdnc-model-name":"pm_control",
+ "sdnc-model-version":"1.0.0",
+ "resource-version":"1598626661947",
+ "relationship-list":{
+ "relationship":[
+ {
+ "related-to":"model-element",
+ "relationship-label":"org.onap.relationships.inventory.IsA",
+ "related-link":"/aai/v20/service-design-and-creation/models/model/c1a44771-3aa8-4888-a4f4-be89d1caa0cb/model-vers/model-ver/7256a992-10a7-4ac8-8c2c-63c67e5c48c8/model-elements/model-element/fddc70fe-8343-48c1-af2e-b54f551a32ee/model-elements/model-element/7bff45b7-8254-44e5-b7ad-6e10dee6dfc3",
+ "relationship-data":[
+ {
+ "relationship-key":"model.model-invariant-id",
+ "relationship-value":"c1a44771-3aa8-4888-a4f4-be89d1caa0cb"
+ },
+ {
+ "relationship-key":"model-ver.model-version-id",
+ "relationship-value":"7256a992-10a7-4ac8-8c2c-63c67e5c48c8"
+ },
+ {
+ "relationship-key":"model-element.model-element-uuid",
+ "relationship-value":"fddc70fe-8343-48c1-af2e-b54f551a32ee"
+ },
+ {
+ "relationship-key":"model-element.model-element-uuid",
+ "relationship-value":"7bff45b7-8254-44e5-b7ad-6e10dee6dfc3"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
]
diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai_mockserver.properties b/plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai_mockserver.properties
index 9c592303..04b9cc4e 100644
--- a/plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai_mockserver.properties
+++ b/plans/dcaegen2-services-pmsh/testsuite/assets/aai_sim/aai_mockserver.properties
@@ -14,10 +14,13 @@ mockserver.deleteGeneratedKeyStoreOnExit=true
# certificate domain name (default "localhost")
mockserver.sslCertificateDomainName=localhost
# comma separated list of domain names for Subject Alternative Name domain names (default empty list)
-mockserver.sslSubjectAlternativeNameDomains=www.example.com,www.another.com
+mockserver.sslSubjectAlternativeNameDomains=aai,aai.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
+
# CORS
# enable CORS for MockServer REST API
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
index 1a1ba9eb..8caf2001 100644
--- a/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs-initializer.json
+++ b/plans/dcaegen2-services-pmsh/testsuite/assets/cbs_sim/cbs-initializer.json
@@ -20,13 +20,15 @@
"fileBasedGP": 15,
"fileLocation": "/pm/pm.xml",
"nfFilter": {
- "swVersions": [
- "1.0.0",
- "1.0.1"
- ],
"nfNames": [
"^pnf.*",
"^vnf.*"
+ ],
+ "modelInvariantUUIDs": [
+ "7129e420-d396-4efb-af02-6b83499b12f8"
+ ],
+ "modelVersionIDs": [
+
]
},
"measurementGroups": [
@@ -77,12 +79,14 @@
"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": "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"
@@ -101,7 +105,7 @@
"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"
},
diff --git a/plans/dcaegen2-services-pmsh/testsuite/assets/mr_sim/mr-initializer.json b/plans/dcaegen2-services-pmsh/testsuite/assets/mr_sim/mr-initializer.json
index 2eac8406..6c2c4809 100644
--- a/plans/dcaegen2-services-pmsh/testsuite/assets/mr_sim/mr-initializer.json
+++ b/plans/dcaegen2-services-pmsh/testsuite/assets/mr_sim/mr-initializer.json
@@ -1,7 +1,10 @@
[
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -10,12 +13,15 @@
"application/json"
]
},
- "body": "{}"
+ "body": []
}
},
{
"httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS"
+ "path": "/events/unauthenticated.DCAE_CL_OUTPUT",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -24,15 +30,15 @@
"application/json"
]
},
- "body": {
- "type": "JSON",
- "json": {}
- }
+ "body": []
}
},
{
"httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+ "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -41,10 +47,7 @@
"application/json"
]
},
- "body": {
- "type": "JSON",
- "json": {}
- }
+ "body": []
}
}
]
diff --git a/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml b/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml
index ed991c38..6df60f1e 100644
--- a/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml
+++ b/plans/dcaegen2-services-pmsh/testsuite/docker-compose.yml
@@ -11,15 +11,18 @@ services:
networks:
pmsh-network:
- aai-sim:
+ aai:
container_name: aai-sim
image: mockserver/mockserver:mockserver-5.9.0
environment:
MOCKSERVER_PROPERTY_FILE: /config/mockserver.properties
MOCKSERVER_INITIALIZATION_JSON_PATH: /config/aai-initializer.json
+ LOG_LEVEL: "DEBUG"
volumes:
- ./assets/aai_sim/aai_mockserver.properties:/config/mockserver.properties
- ./assets/aai_sim/aai-initializer.json:/config/aai-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:
pmsh-network:
@@ -68,7 +71,6 @@ services:
PMSH_PG_URL: db
PMSH_PG_USERNAME: $DB_USER
PMSH_PG_PASSWORD: $DB_PASSWORD
- AAI_SERVICE_HOST: aai-sim
AAI_SERVICE_PORT: 1080
DCAE_CA_CERTPATH: '/opt/app/pmsh/etc/certs/cacert.pem'
networks:
diff --git a/plans/dcaegen2-services-pmsh/testsuite/setup.sh b/plans/dcaegen2-services-pmsh/testsuite/setup.sh
index eb2196a0..4b939fd0 100644
--- a/plans/dcaegen2-services-pmsh/testsuite/setup.sh
+++ b/plans/dcaegen2-services-pmsh/testsuite/setup.sh
@@ -6,7 +6,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-sim cbs-sim mr-sim
+docker-compose -f ${TEST_PLANS_DIR}/docker-compose.yml up -d db aai cbs-sim mr-sim
# Slow machine running CSITs can affect db coming up in time for PMSH
echo "Waiting for postgres db to come up..."
diff --git a/plans/dcaegen2-services-pmsh/testsuite/teardown.sh b/plans/dcaegen2-services-pmsh/testsuite/teardown.sh
index c5bac315..a01dfda0 100644
--- a/plans/dcaegen2-services-pmsh/testsuite/teardown.sh
+++ b/plans/dcaegen2-services-pmsh/testsuite/teardown.sh
@@ -2,7 +2,7 @@
echo "Starting teardown script"
TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-pmsh/testsuite
mkdir -p $WORKSPACE/archives
-docker exec pmsh /bin/sh -c "ls -l /var/log/ONAP/dcaegen2/services/pmsh/"
docker exec pmsh /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pmsh/*"
+docker cp pmsh:/var/log/ONAP/dcaegen2/services/pmsh/application.log $WORKSPACE/archives/
docker-compose -f $TEST_PLANS_DIR/docker-compose.yml logs --no-color > $WORKSPACE/archives/pmsh-docker-compose.log
docker-compose -f $TEST_PLANS_DIR/docker-compose.yml down -v
diff --git a/plans/dcaegen2-services-son-handler/testsuites/config/dmaap/MsgRtrApi.properties b/plans/dcaegen2-services-son-handler/testsuites/config/dmaap/MsgRtrApi.properties
new file mode 100644
index 00000000..712cbcb1
--- /dev/null
+++ b/plans/dcaegen2-services-son-handler/testsuites/config/dmaap/MsgRtrApi.properties
@@ -0,0 +1,172 @@
+# LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2020 Wipro Limited.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+###############################################################################
+###############################################################################
+##
+## Cambria API Server config
+##
+## - Default values are shown as commented settings.
+##
+
+###############################################################################
+##
+## HTTP service
+##
+## - 3904 is standard as of 7/29/14.
+#
+## Zookeeper Connection
+##
+## Both Cambria and Kafka make use of Zookeeper.
+##
+#config.zk.servers=172.18.1.1
+config.zk.servers=zookeeper:2181
+#config.zk.root=/fe3c/cambria/config
+
+
+###############################################################################
+##
+## Kafka Connection
+##
+## Items below are passed through to Kafka's producer and consumer
+## configurations (after removing "kafka.")
+## if you want to change request.required.acks it can take this one value
+#kafka.metadata.broker.list=localhost:9092,localhost:9093
+kafka.metadata.broker.list=kafka:9092
+##kafka.request.required.acks=-1
+#kafka.client.zookeeper=${config.zk.servers}
+consumer.timeout.ms=100
+zookeeper.connection.timeout.ms=6000
+zookeeper.session.timeout.ms=20000
+zookeeper.sync.time.ms=2000
+auto.commit.interval.ms=1000
+fetch.message.max.bytes =1000000
+auto.commit.enable=false
+
+#(backoff*retries > zksessiontimeout)
+kafka.rebalance.backoff.ms=10000
+kafka.rebalance.max.retries=6
+
+
+###############################################################################
+##
+## Secured Config
+##
+## Some data stored in the config system is sensitive -- API keys and secrets,
+## for example. to protect it, we use an encryption layer for this section
+## of the config.
+##
+## The key is a base64 encode AES key. This must be created/configured for
+## each installation.
+#cambria.secureConfig.key=
+##
+## The initialization vector is a 16 byte value specific to the secured store.
+## This must be created/configured for each installation.
+#cambria.secureConfig.iv=
+
+## Southfield Sandbox
+cambria.secureConfig.key=b/7ouTn9FfEw2PQwL0ov/Q==
+cambria.secureConfig.iv=wR9xP5k5vbz/xD0LmtqQLw==
+authentication.adminSecret=fe3cCompound
+#cambria.secureConfig.key[pc569h]=YT3XPyxEmKCTLI2NK+Sjbw==
+#cambria.secureConfig.iv[pc569h]=rMm2jhR3yVnU+u2V9Ugu3Q==
+
+
+###############################################################################
+##
+## Consumer Caching
+##
+## Kafka expects live connections from the consumer to the broker, which
+## obviously doesn't work over connectionless HTTP requests. The Cambria
+## server proxies HTTP requests into Kafka consumer sessions that are kept
+## around for later re-use. Not doing so is costly for setup per request,
+## which would substantially impact a high volume consumer's performance.
+##
+## This complicates Cambria server failover, because we often need server
+## A to close its connection before server B brings up the replacement.
+##
+
+## The consumer cache is normally enabled.
+#cambria.consumer.cache.enabled=true
+
+## Cached consumers are cleaned up after a period of disuse. The server inspects
+## consumers every sweepFreqSeconds and will clean up any connections that are
+## dormant for touchFreqMs.
+#cambria.consumer.cache.sweepFreqSeconds=15
+cambria.consumer.cache.touchFreqMs=120000
+##stickforallconsumerrequests=false
+## The cache is managed through ZK. The default value for the ZK connection
+## string is the same as config.zk.servers.
+#cambria.consumer.cache.zkConnect=${config.zk.servers}
+
+##
+## Shared cache information is associated with this node's name. The default
+## name is the hostname plus the HTTP service port this host runs on. (The
+## hostname is determined via InetAddress.getLocalHost ().getCanonicalHostName(),
+## which is not always adequate.) You can set this value explicitly here.
+##
+#cambria.api.node.identifier=<use-something-unique-to-this-instance>
+
+#cambria.rateLimit.maxEmptyPollsPerMinute=30
+#cambria.rateLimitActual.delay.ms=10
+
+###############################################################################
+##
+## Metrics Reporting
+##
+## This server can report its metrics periodically on a topic.
+##
+#metrics.send.cambria.enabled=true
+#metrics.send.cambria.topic=cambria.apinode.metrics #msgrtr.apinode.metrics.dmaap
+#metrics.send.cambria.sendEverySeconds=60
+
+cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
+consumer.timeout=17
+default.partitions=3
+default.replicas=3
+##############################################################################
+#100mb
+maxcontentlength=10000
+
+
+##############################################################################
+#AAF Properties
+msgRtr.namespace.aaf=org.onap.dmaap.mr.topic
+msgRtr.topicfactory.aaf=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
+enforced.topic.name.AAF=org.onap
+forceAAF=false
+transidUEBtopicreqd=false
+defaultNSforUEB=org.onap.dmaap.mr
+##############################################################################
+#Mirror Maker Agent
+msgRtr.mirrormakeradmin.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|admin
+msgRtr.mirrormakeruser.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|user
+msgRtr.mirrormakeruser.aaf.create=com.onap.dmaap.mr.dev.topicFactory|:com.onap.dmaap.mr.dev.topic:
+msgRtr.mirrormaker.timeout=15000
+msgRtr.mirrormaker.topic=com.onap.dmaap.mr.prod.mm.agent
+msgRtr.mirrormaker.consumergroup=mmagentserver
+msgRtr.mirrormaker.consumerid=1
+
+kafka.max.poll.interval.ms=300000
+kafka.heartbeat.interval.ms=60000
+kafka.session.timeout.ms=240000
+kafka.max.poll.records=1000
+
+
diff --git a/plans/dcaegen2-services-son-handler/testsuites/config/sonhms/config_all.json b/plans/dcaegen2-services-son-handler/testsuites/config/sonhms/config_all.json
new file mode 100644
index 00000000..8372142d
--- /dev/null
+++ b/plans/dcaegen2-services-son-handler/testsuites/config/sonhms/config_all.json
@@ -0,0 +1,134 @@
+{
+ "config": {
+ "sonhandler.badCountThreshold": 1,
+ "streams_subscribes": {
+ "performance_management_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.VES_MEASUREMENT_OUTPUT",
+ "client_role": "son-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-son-1"
+ },
+ "aaf_username": null
+ },
+ "fault_management_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.SEC_FAULT_OUTPUT",
+ "client_role": "son-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-son-1"
+ },
+ "aaf_username": null
+ },
+ "nbr_list_change_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO",
+ "client_role": "son-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-son-1"
+ },
+ "aaf_username": null
+ },
+ "dcae_cl_response_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP",
+ "client_role": "son-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-son-1"
+ },
+ "aaf_username": null
+ }
+ },
+ "postgres.port": "5432",
+ "sonhandler.pciOptimizer": "pci",
+ "sonhandler.maximumClusters": 5,
+ "sonhandler.numSolutions": 5,
+ "sonhandler.poorCountThreshold": 1,
+ "sonhandler.minCollision": 5,
+ "streams_publishes": {
+ "CL_topic": {
+ "aaf_password": null,
+ "type": "message-router",
+ "dmaap_info": {
+ "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT",
+ "client_role": "son-subscriber",
+ "location": "onap",
+ "client_id": "sdnr-son-1"
+ },
+ "aaf_username": null
+ }
+ },
+ "sonhandler.namespace": "onap",
+ "sonhandler.oof.endpoint": "/api/oof/v1/pci",
+ "postgres.password": "postgres",
+ "sonhandler.minConfusion": 5,
+ "sonhandler.sourceId": "SONHMS",
+ "postgres.username": "sonhms_admin",
+ "postgres.host": "postgres",
+ "sonhandler.policyRespTimer": 10,
+ "sonhandler.dmaap.server": [
+ "dmaap"
+ ],
+ "sonhandler.poorThreshold": 70,
+ "sonhandler.oofTriggerCountTimer": 30,
+ "cbsPollingInterval": 60,
+ "sonhandler.cg": "sonhms-cg",
+ "sonhandler.pollingInterval": 20,
+ "sonhandler.badThreshold": 50,
+ "sonhandler.bufferTime": 60,
+ "sonhandler.cid": "sonhms-cid",
+ "sonhandler.configDb.service": "http://configdb_oof_sim:5000",
+ "sonhandler.oofTriggerCountThreshold": 5,
+ "sonhandler.oof.service": "http://configdb_oof_sim:5000",
+ "sonhandler.pciAnrOptimizer": "pci_anr",
+ "sonhandler.policyNegativeAckThreshold": 1,
+ "sonhandler.policyFixedPciTimeInterval": 10000,
+ "sonhandler.pollingTimeout": 60,
+ "sonhandler.nfNamingCode": "RansimAgent",
+ "service_calls": {
+ "sdnr-getpnfname": [],
+ "sdnr-getpci": [],
+ "sdnr-getnbrlist": [],
+ "sdnr-getcelllist": [],
+ "oof-req": [],
+ "policy-req": []
+ }
+ },
+ "policies": {
+ "event": {
+ "action": "gathered",
+ "timestamp": "2019-09-18T14:57:55.320Z",
+ "update_id": "dbb88da8-8df1-489d-b51d-8d5cbbfbcd99",
+ "policies_count": 1
+ },
+ "items": [
+ {
+ "policyName": "com.Config_PCIMS_CONFIG_POLICY.1.xml",
+ "name": "com.Config_PCIMS_CONFIG_POLICY",
+ "config": {
+ "PCI_SDNR_TARGET_NAME": "SDNR",
+ "PCI_OPTMIZATION_ALGO_CATEGORY_IN_OOF": "OOF-PCI-OPTIMIZATION",
+ "PCI_NEIGHBOR_CHANGE_CLUSTER_TIMEOUT_IN_SECS": 60,
+ "PCI_MODCONFIGANR_POLICY_NAME": "ControlLoop-vSONH-7d4baf04-8875-4d1f-946d-06b874048b61",
+ "PCI_MODCONFIG_POLICY_NAME": "ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459"
+ },
+ "type_version": "1.0.0",
+ "version": "1.0.0",
+ "policyVersion": "1",
+ "type": "onap.policies.monitoring.docker.sonhandler.app",
+ "metadata": {
+ "policy-id": "com.Config_PCIMS_CONFIG_POLICY",
+ "policy-version": "1"
+ }
+ }
+ ]
+ }
+}
diff --git a/plans/dcaegen2-services-son-handler/testsuites/docker-compose.yaml b/plans/dcaegen2-services-son-handler/testsuites/docker-compose.yaml
new file mode 100644
index 00000000..87b9a7d8
--- /dev/null
+++ b/plans/dcaegen2-services-son-handler/testsuites/docker-compose.yaml
@@ -0,0 +1,94 @@
+# ============LICENSE_START=======================================================
+# son-handler
+# ================================================================================
+# Copyright (C) 2020 Wipro Limited.
+# ==============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+version: '3.3'
+networks:
+ sonhms-default:
+ driver: bridge
+ driver_opts:
+ com.docker.network.driver.mtu: 1400
+
+services:
+ zookeeper:
+ image: wurstmeister/zookeeper
+ container_name: zookeeper
+ ports:
+ - "2181:2181"
+ networks:
+ - sonhms-default
+ kafka:
+ image: wurstmeister/kafka
+ container_name: kafka
+ ports:
+ - "9092:9092"
+ environment:
+ KAFKA_ADVERTISED_HOST_NAME: "kafka"
+ KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
+ KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
+ KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ depends_on:
+ - zookeeper
+ networks:
+ - sonhms-default
+ dmaap:
+ image: nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.1.8
+ container_name: dmaap
+ ports:
+ - "3904:3904"
+ - "3905:3905"
+ volumes:
+ - ./config/dmaap/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
+ depends_on:
+ - zookeeper
+ - kafka
+ networks:
+ - sonhms-default
+ postgres:
+ image: 'postgres:12-alpine'
+ container_name: sonhms-postgres
+ hostname: postgres
+ environment:
+ - POSTGRES_USER=sonhms_admin
+ - POSTGRES_PASSWORD=postgres
+ - POSTGRES_DB=sonhms
+ ports:
+ - 5432
+ healthcheck:
+ test: ["CMD", "nc", "-z", "localhost", "5432"]
+ interval: 30s
+ timeout: 10s
+ retries: 5
+ networks:
+ - sonhms-default
+ sonhms:
+ image: "nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.son-handler:latest"
+ container_name: sonhms.onap
+ hostname: sonhms
+ environment:
+ - STANDALONE=true
+ - CONFIG_FILE=/etc/config_all.json
+ ports:
+ - "8080:8080"
+ volumes:
+ - ./config/sonhms/config_all.json:/etc/config_all.json
+ depends_on:
+ - postgres
+ networks:
+ - sonhms-default
diff --git a/plans/dcaegen2-services-son-handler/testsuites/setup.sh b/plans/dcaegen2-services-son-handler/testsuites/setup.sh
new file mode 100644
index 00000000..6f895a1e
--- /dev/null
+++ b/plans/dcaegen2-services-son-handler/testsuites/setup.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+docker login -u docker -p docker nexus3.onap.org:10001
+
+TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-son-handler/testsuites
+TEST_SCRIPTS_DIR=$WORKSPACE/scripts/dcaegen2-services-son-handler/sonhandler
+TEST_ROBOT_DIR=$WORKSPACE/tests/dcaegen2-services-son-handler/testcases
+
+docker-compose up -d
+
+ZOOKEEPER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' zookeeper)
+KAFKA_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kafka)
+DMAAP_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dmaap)
+SONHMS_POSTGRES_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sonhms-postgres)
+SONHMS_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sonhms.onap)
+
+echo "Waiting for dmaap to come up ..."
+for i in {1..10}; do
+ dmaap_state=$(curl --write-out '%{http_code}' --silent --output /dev/null $DMAAP_IP:3904/topics)
+ if [ $dmaap_state == "200" ]
+ then
+ break
+ else
+ sleep 60
+ fi
+done
+
+#create topics
+curl --header "Content-type: application/json" \
+--request POST \
+--data '{"topicName": "DCAE_CL_RSP"}' \
+http://$DMAAP_IP:3904/events/DCAE_CL_RSP
+
+curl --header "Content-type: application/json" \
+--request POST \
+--data '{"topicName": "unauthenticated.SEC_FAULT_OUTPUT"}' \
+http://$DMAAP_IP:3904/events/unauthenticated.SEC_FAULT_OUTPUT
+
+curl --header "Content-type: application/json" \
+--request POST \
+--data '{"topicName": "unauthenticated.VES_MEASUREMENT_OUTPUT"}' \
+http://$DMAAP_IP:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT
+
+curl --header "Content-type: application/json" \
+--request POST \
+--data '{"topicName": "unauthenticated.DCAE_CL_OUTPUT"}' \
+http://$DMAAP_IP:3904/events/unauthenticated.DCAE_CL_OUTPUT
+echo "topics created"
+
+#build configdb-oof-sim image
+cd $TEST_SCRIPTS_DIR
+docker build -t configdb_oof_sim .
+
+#run configdb-oof-sim
+docker run -d --name configdb_oof_sim --network=testsuites_sonhms-default -p "5000:5000" configdb_oof_sim:latest;
+sleep 60
+CONFIGDB_OOF_SIM_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' configdb_oof_sim)
+echo "CONFIGDB_OOF_SIM_IP=${CONFIGDB_OOF_SIM_IP}"
+
+
+ROBOT_VARIABLES="-v ZOOKEEPER_IP:${ZOOKEEPER_IP} -v KAFKA_IP:${KAFKA_IP} -v DMAAP_IP:${DMAAP_IP} -v SONHMS_POSTGRES_IP:${SONHMS_POSTGRES_IP} -v SONHMS_IP:${SONHMS_IP} -v CONFIGDB_OOF_SIM_IP:${CONFIGDB_OOF_SIM_IP} -v TEST_ROBOT_DIR:${TEST_ROBOT_DIR}"
diff --git a/plans/dcaegen2-services-son-handler/testsuites/teardown.sh b/plans/dcaegen2-services-son-handler/testsuites/teardown.sh
new file mode 100644
index 00000000..7db3d2f6
--- /dev/null
+++ b/plans/dcaegen2-services-son-handler/testsuites/teardown.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+echo "Starting teardown script"
+TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-son-handler/testsuites
+mkdir -p $WORKSPACE/archives
+
+docker container stop configdb_oof_sim
+docker container rm configdb_oof_sim
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yaml logs > $WORKSPACE/archives/sonhandler-docker-compose.log
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yaml down -v
diff --git a/plans/vfc-nfvo-driver-sfc/sanity-check/testplan.txt b/plans/dcaegen2-services-son-handler/testsuites/testplan.txt
index 3fa996f6..2f8b7606 100644
--- a/plans/vfc-nfvo-driver-sfc/sanity-check/testplan.txt
+++ b/plans/dcaegen2-services-son-handler/testsuites/testplan.txt
@@ -1,3 +1,3 @@
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
-vfc/nfvo-driver-sfc/test.robot
+dcaegen2-services-son-handler/testcases
diff --git a/plans/dcaegen2/testsuites/setup.sh b/plans/dcaegen2/testsuites/setup.sh
index 26585c20..88767b19 100755
--- a/plans/dcaegen2/testsuites/setup.sh
+++ b/plans/dcaegen2/testsuites/setup.sh
@@ -21,7 +21,7 @@
#get current host IP addres
HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}')
-VESC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest
+VESC_IMAGE=nexus3.onap.org:10003/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest
echo VESC_IMAGE=${VESC_IMAGE}
diff --git a/plans/modeling-etsicatalog/sanity-check/setup.sh b/plans/modeling-etsicatalog/sanity-check/setup.sh
index 9157c41d..2e494167 100644
--- a/plans/modeling-etsicatalog/sanity-check/setup.sh
+++ b/plans/modeling-etsicatalog/sanity-check/setup.sh
@@ -33,9 +33,9 @@ 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 nexus3.onap.org:10001/onap/vfc/db
-VFC_DB_IP=`get-instance-ip.sh vfc-db`
-echo VFC_DB_IP=${VFC_DB_IP}
+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}
# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
for i in {1..10}; do
@@ -46,7 +46,7 @@ done
# Wait for initialization(3306 DB)
for i in {1..3}; do
- curl -sS -m 1 ${VFC_DB_IP}:3306 && break
+ curl -sS -m 1 ${DB_IP}:3306 && break
echo sleep $i
sleep $i
done
@@ -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=${VFC_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
diff --git a/plans/aaf/certservice/certs/Makefile b/plans/oom-platform-cert-service/certservice/certs/Makefile
index 126e0533..ea90c5c7 100644
--- a/plans/aaf/certservice/certs/Makefile
+++ b/plans/oom-platform-cert-service/certservice/certs/Makefile
@@ -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####"
diff --git a/plans/aaf/certservice/cmpServers.json b/plans/oom-platform-cert-service/certservice/cmpServers.json
index d6557c52..72564949 100644
--- a/plans/aaf/certservice/cmpServers.json
+++ b/plans/oom-platform-cert-service/certservice/cmpServers.json
@@ -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": {
diff --git a/plans/aaf/certservice/docker-compose.yml b/plans/oom-platform-cert-service/certservice/docker-compose.yml
index dcac7df0..b281101a 100644
--- a/plans/aaf/certservice/docker-compose.yml
+++ b/plans/oom-platform-cert-service/certservice/docker-compose.yml
@@ -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
diff --git a/plans/aaf/certservice/scripts/ejbca-configuration.sh b/plans/oom-platform-cert-service/certservice/scripts/ejbca-configuration.sh
index 77f5c555..77f5c555 100755
--- a/plans/aaf/certservice/scripts/ejbca-configuration.sh
+++ b/plans/oom-platform-cert-service/certservice/scripts/ejbca-configuration.sh
diff --git a/plans/aaf/certservice/setup.sh b/plans/oom-platform-cert-service/certservice/setup.sh
index b23b7192..bee54cde 100644
--- a/plans/aaf/certservice/setup.sh
+++ b/plans/oom-platform-cert-service/certservice/setup.sh
@@ -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"
@@ -40,6 +40,9 @@ echo "Reinstall pyopenssl library."
pip uninstall pyopenssl -y
pip install pyopenssl==17.5.0
+#install pyjks for .jks files management
+pip install pyjks
+
#Disable proxy - for local run
unset http_proxy https_proxy
@@ -72,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
diff --git a/plans/aaf/certservice/teardown.sh b/plans/oom-platform-cert-service/certservice/teardown.sh
index 71e20b7c..f531180e 100644
--- a/plans/aaf/certservice/teardown.sh
+++ b/plans/oom-platform-cert-service/certservice/teardown.sh
@@ -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
diff --git a/plans/vfc-nfvo-driver-ems/sanity-check/testplan.txt b/plans/oom-platform-cert-service/certservice/testplan.txt
index cb2a8026..ed9ee127 100644..100755
--- a/plans/vfc-nfvo-driver-ems/sanity-check/testplan.txt
+++ b/plans/oom-platform-cert-service/certservice/testplan.txt
@@ -1,3 +1,3 @@
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
-vfc/nfvo-driver-ems/test.robot
+oom-platform-cert-service/certservice
diff --git a/plans/vfc-nfvo-multivimproxy/sanity-check/teardown.sh b/plans/oom-platform-cert-service/truststoremerger/setup.sh
index c158d199..9f618406 100644
--- a/plans/vfc-nfvo-multivimproxy/sanity-check/teardown.sh
+++ b/plans/oom-platform-cert-service/truststoremerger/setup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2018 Huawei Technologies Co., Ltd.
+# Copyright 2020 Nokia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,8 +15,14 @@
# limitations under the License.
#
-# This script is sourced by run-csit.sh after Robot test completion.
-kill-instance.sh msb_internal_apigateway
-kill-instance.sh msb_discovery
-kill-instance.sh msb_consul
-kill-instance.sh vfc-multivimproxy
+#export container name
+export MergerContainerName=TrustStoreMerger
+
+#install docker sdk
+echo "Uninstall docker-py and reinstall docker."
+pip uninstall -y docker-py
+pip uninstall -y docker
+pip install -U docker==2.7.0
+
+#install pyjks for .jks files management
+pip install pyjks
diff --git a/plans/vfc-nfvo-driver-ems/sanity-check/teardown.sh b/plans/oom-platform-cert-service/truststoremerger/teardown.sh
index aa676b2f..a0ee4d26 100755..100644
--- a/plans/vfc-nfvo-driver-ems/sanity-check/teardown.sh
+++ b/plans/oom-platform-cert-service/truststoremerger/teardown.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2017 ZTE Corporation.
+# Copyright 2017 ZTE, Inc. and others.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,8 +15,4 @@
# limitations under the License.
#
-# This script is sourced by run-csit.sh after Robot test completion.
-kill-instance.sh msb_internal_apigateway
-kill-instance.sh msb_discovery
-kill-instance.sh msb_consul
-kill-instance.sh vfc-emsdriver
+kill-instance.sh ${MergerContainerName}
diff --git a/plans/vfc-nfvo-multivimproxy/sanity-check/testplan.txt b/plans/oom-platform-cert-service/truststoremerger/testplan.txt
index 5d1c6e9d..11e00832 100644..100755
--- a/plans/vfc-nfvo-multivimproxy/sanity-check/testplan.txt
+++ b/plans/oom-platform-cert-service/truststoremerger/testplan.txt
@@ -1,3 +1,3 @@
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
-vfc/nfvo-multivimproxy/test.robot \ No newline at end of file
+oom-platform-cert-service/truststoremerger
diff --git a/plans/policy/api/setup.sh b/plans/policy/api/setup.sh
index 466435d3..b75b492a 100644
--- a/plans/policy/api/setup.sh
+++ b/plans/policy/api/setup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -32,6 +32,25 @@ pip install -U docker==2.7.0
sudo apt-get -y install libxml2-utils
POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+
+# download models - it contains the policy definitions
+rm -rf ${WORKSPACE}/models
+cd ${WORKSPACE}
+
+git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
+
+DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
+
+# create a couple of variations of the policy definitions
+sed -e 's!Measurement_vGMUX!ADifferentValue!' \
+ ${DATA}/vCPE.policy.monitoring.input.tosca.json \
+ >${DATA}/vCPE.policy.monitoring.input.tosca.v1_2.json
+
+sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \
+ -e 's!"policy-version": 1!"policy-version": 2!' \
+ ${DATA}/vCPE.policy.monitoring.input.tosca.json \
+ >${DATA}/vCPE.policy.monitoring.input.tosca.v2.json
+
echo ${POLICY_API_VERSION}
# Adding this waiting container to avoid race condition between api and mariadb containers.
@@ -52,4 +71,6 @@ MARIADB_IP=`get-instance-ip.sh mariadb`
echo API IP IS ${POLICY_API_IP}
echo MARIADB IP IS ${MARIADB_IP}
-ROBOT_VARIABLES="-v POLICY_API_IP:${POLICY_API_IP}"
+ROBOT_VARIABLES=""
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
diff --git a/plans/policy/pap/setup.sh b/plans/policy/pap/setup.sh
index 5b060497..a89a6daf 100644
--- a/plans/policy/pap/setup.sh
+++ b/plans/policy/pap/setup.sh
@@ -30,12 +30,16 @@ pip install -U docker==2.7.0
sudo apt-get -y install libxml2-utils
+bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh
+
POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+
echo ${POLICY_API_VERSION}
echo ${POLICY_PAP_VERSION}
+
# Adding this waiting container due to race condition between pap and mariadb
docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-pap.yml run --rm start_dependencies
@@ -57,6 +61,9 @@ echo PAP IP IS ${POLICY_PAP_IP}
echo API IP IS ${POLICY_API_IP}
echo MARIADB IP IS ${MARIADB_IP}
+DATA=${WORKSPACE}/dmaap-sim/models/models-examples/src/main/resources/policies
+
ROBOT_VARIABLES=""
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
diff --git a/plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh b/plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh
index 2a0451d1..a2020aee 100644
--- a/plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh
+++ b/plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh
@@ -30,7 +30,6 @@ chmod +x "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config
export TEMP_DIR_PATH=${TEMP_DIR_PATH}
# Create temp directory to bind with docker containers
-mkdir -m 755 -p "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/tmp
mkdir -m 755 -p "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/certs
mkdir -m 755 -p "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/cert-data
@@ -54,6 +53,9 @@ echo "Reinstall pyOpenSSL library."
pip uninstall pyopenssl -y
pip install pyopenssl==17.5.0
+# Install PYJKS for .jks files management
+pip install pyjks
+
# Disable Proxy - for local run
unset http_proxy https_proxy
diff --git a/plans/sdnc/sdnc_netconf_tls_post_deploy/teardown.sh b/plans/sdnc/sdnc_netconf_tls_post_deploy/teardown.sh
index 2f451d50..b780ed49 100644
--- a/plans/sdnc/sdnc_netconf_tls_post_deploy/teardown.sh
+++ b/plans/sdnc/sdnc_netconf_tls_post_deploy/teardown.sh
@@ -21,6 +21,5 @@ docker-compose -f "${SCRIPTS}"/sdnc/netconf-pnp-simulator/docker-compose.yml dow
make clear -C "${WORKSPACE}"/plans/sdnc/sdnc_netconf_tls_post_deploy/certs
-rm -rf "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/tmp
rm -rf "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/certs
rm -rf "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/cert-data \ No newline at end of file
diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json
index e1677bab..25816a50 100644
--- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json
+++ b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json
@@ -13,7 +13,7 @@
"pm-mapper"
],
"User-Agent":[
- "Java/1.8.0_171"
+ "Java/11.0.7"
],
"Host":[
"!some-random-host:10000"
diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json
index 6abfb566..8aaca058 100644
--- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json
+++ b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json
@@ -10,6 +10,10 @@
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
"dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
"dmaap.security.enableDmaapCertAuth": "false",
+ "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+ "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+ "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
+ "sftp.security.strictHostKeyChecking": "true",
"streams_publishes": {
"PM_MEAS_FILES": {
"type": "data_router",
@@ -26,7 +30,7 @@
"streams_subscribes": {
"dmaap_subscriber": {
"dmaap_info": {
- "topic_url":"http://dradmin:dradmin@dmaap-message-router:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+ "topic_url":"http://dmaap-message-router:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
},
"type": "message_router"
}
diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases-5G-bulkpm/5G-bulkpm/composefile/docker-compose-e2e.yml
index e2f16a7c..46fab55c 100644
--- a/plans/usecases-5G-bulkpm/5G-bulkpm/composefile/docker-compose-e2e.yml
+++ b/plans/usecases-5G-bulkpm/5G-bulkpm/composefile/docker-compose-e2e.yml
@@ -110,6 +110,9 @@ services:
tmp_bulk-pm-network:
aliases:
- dcaegen2-datafile-collector
+ environment:
+ KNOWN_HOSTS_FILE_PATH: "/home/datafile/.ssh/known_hosts"
+ CONFIG_BINDING_SERVICE_SERVICE_PORT: 10000
cbs-sim:
container_name: config-binding-service-sim
diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/setup.sh b/plans/usecases-5G-bulkpm/5G-bulkpm/setup.sh
index 1f5f26df..8cb3d9f8 100644
--- a/plans/usecases-5G-bulkpm/5G-bulkpm/setup.sh
+++ b/plans/usecases-5G-bulkpm/5G-bulkpm/setup.sh
@@ -78,6 +78,11 @@ DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway
DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dmaap-message-router-server)
VESC_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dcaegen2-vescollector)
+#Add SFTP server pubilc key to known hosts of datafile collector
+HOST_NAMES=$(docker inspect -f '{{ range .NetworkSettings.Networks}}{{join .Aliases ","}}{{end}}' sftp)
+KEY_ENTRY=$(echo $HOST_NAMES "$(docker exec sftp cat /etc/ssh/ssh_host_rsa_key.pub)" | sed -e 's/\w*@\w*$//')
+docker exec -i -u root dcaegen2-datafile-collector sh -c "echo $KEY_ENTRY >> /home/datafile/.ssh/known_hosts"
+
# Add gateway IP to DR Prov
docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP"
docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP"
@@ -116,4 +121,4 @@ export VESC_PORT=8080
export DMAAP_MR_IP=${DMAAP_MR_IP}
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT}" \ No newline at end of file
+ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT}"
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/cds/resources/aai.cert b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/cds/resources/aai.cert
index 9acb8bb9..266a8f21 100755
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/cds/resources/aai.cert
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/cds/resources/aai.cert
@@ -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 34
-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 54
+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/simulators/pnfsim/docker-compose.yml b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/docker-compose.yml
index 2e9afeb3..7b1d5a8f 100755
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/docker-compose.yml
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/docker-compose.yml
@@ -2,7 +2,7 @@ version: '3'
services:
netconf-pnp-simulator:
- image: nexus3.onap.org:10001/onap/integration/simulators/netconf-pnp-simulator:2.8.5
+ image: nexus3.onap.org:10001/onap/integration/simulators/netconf-pnp-simulator:2.8.6
container_name: netconf-pnp-simulator
restart: always
ports:
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/pnf-sw-upgrade.yang b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/pnf-sw-upgrade.yang
index 3cba9cf0..cbad3c57 100755
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/pnf-sw-upgrade.yang
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/pnf-sw-upgrade.yang
@@ -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
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/startup.xml b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/startup.xml
index e1ce243c..ebf2af37 100755
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/startup.xml
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/simulators/pnfsim/pnf-sw-upgrade/startup.xml
@@ -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
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/aai-certificate/aai.cert b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/aai-certificate/aai.cert
index 9acb8bb9..266a8f21 100755..100644
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/aai-certificate/aai.cert
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/aai-certificate/aai.cert
@@ -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 34
-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 54
+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
index 00000000..03f676e4
--- /dev/null
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/config/certificates/root-certificate/root.crt
@@ -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-----
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/docker-compose.yml b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/docker-compose.yml
index bea0dca4..0886d9d5 100755
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/docker-compose.yml
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/docker-compose.yml
@@ -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
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/application.yaml b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/application.yaml
index 205abe40..3a40848f 100755
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/application.yaml
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/application.yaml
@@ -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
index 00000000..6b4340d4
--- /dev/null
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/keystore.p12
Binary files 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
index 015f2bf6..00000000
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/keystore/org.onap.so.p12
+++ /dev/null
Binary files 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
index 00000000..d219aaf5
--- /dev/null
+++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/truststore.jks
Binary files differ
diff --git a/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh b/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh
index f82f228a..3fd82d29 100755
--- a/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh
+++ b/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh
@@ -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
diff --git a/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh b/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh
index 22dd8ae3..b66662b9 100755
--- a/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh
+++ b/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh
@@ -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
diff --git a/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh b/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh
index e2ab2594..358fa6cc 100755
--- a/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh
+++ b/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh
@@ -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
diff --git a/plans/vfc-nfvo-driver-ems/sanity-check/setup.sh b/plans/vfc-nfvo-driver-ems/sanity-check/setup.sh
deleted file mode 100755
index d381f8f3..00000000
--- a/plans/vfc-nfvo-driver-ems/sanity-check/setup.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017 ZTE Corporation.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Place the scripts in run order:
-# Start all process required for executing test case
-
-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`
-echo MSB_CONSUL_IP=${MSB_CONSUL_IP}
-
-docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
-MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
-echo DISCOVERY_IP=${MSB_DISCOVERY_IP}
-
-docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
-MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
-echo MSB_IAG_IP=${MSB_IAG_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
- echo sleep $i
- sleep $i
-done
-
-# Need some time so service info can be synced from discovery to api gateway
-echo sleep 60
-sleep 60
-
-# start vfc-emsdriver
-docker run -d --name vfc-emsdriver -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/emsdriver
-EMS_DRV_IP=`get-instance-ip.sh vfc-emsdriver`
-docker logs -f vfc-emsdriver > emsdriver.log &
-
-# Wait for initialization
-for i in {1..10}; do
- curl -sS -m 1 ${EMS_DRV_IP}:8206 && break
- echo sleep $i
- sleep $i
-done
-
-echo "==============="
-cat emsdriver.log
-
-# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v EMS_DRV_IP:${EMS_DRV_IP}"
diff --git a/plans/vfc-nfvo-driver-sfc/sanity-check/setup.sh b/plans/vfc-nfvo-driver-sfc/sanity-check/setup.sh
deleted file mode 100755
index 85a3e69f..00000000
--- a/plans/vfc-nfvo-driver-sfc/sanity-check/setup.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017 ZTE Corporation.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Place the scripts in run order:
-# Start all process required for executing test case
-
-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`
-echo MSB_CONSUL_IP=${MSB_CONSUL_IP}
-
-docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
-MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
-echo DISCOVERY_IP=${MSB_DISCOVERY_IP}
-
-docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
-MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
-echo MSB_IAG_IP=${MSB_IAG_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
- echo sleep $i
- sleep $i
-done
-
-# Need some time so service info can be synced from discovery to api gateway
-echo sleep 60
-sleep 60
-
-# start vfc-ztesdncdriver
-docker run -d --name vfc-ztesdncdriver -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/ztesdncdriver
-SFC_DRV_IP=`get-instance-ip.sh vfc-ztesdncdriver`
-docker logs -f vfc-ztesdncdriver > ztesdncdriver.log &
-
-# Wait for initialization
-for i in {1..10}; do
- curl -sS -m 1 ${SFC_DRV_IP}:8411 && break
- echo sleep $i
- sleep $i
-done
-
-echo "==============================="
-cat ztesdncdriver.log
-
-# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v SFC_DRV_IP:${SFC_DRV_IP}"
diff --git a/plans/vfc-nfvo-driver-sfc/sanity-check/teardown.sh b/plans/vfc-nfvo-driver-sfc/sanity-check/teardown.sh
deleted file mode 100755
index ce5402ef..00000000
--- a/plans/vfc-nfvo-driver-sfc/sanity-check/teardown.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017 ZTE Corporation.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# This script is sourced by run-csit.sh after Robot test completion.
-kill-instance.sh msb_internal_apigateway
-kill-instance.sh msb_discovery
-kill-instance.sh msb_consul
-kill-instance.sh vfc-ztesdncdriver
diff --git a/plans/vfc-nfvo-lcm/sanity-check/setup.sh b/plans/vfc-nfvo-lcm/sanity-check/setup.sh
index 394a8afd..6ed146ff 100755
--- a/plans/vfc-nfvo-lcm/sanity-check/setup.sh
+++ b/plans/vfc-nfvo-lcm/sanity-check/setup.sh
@@ -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/plans/vfc-nfvo-multivimproxy/sanity-check/setup.sh b/plans/vfc-nfvo-multivimproxy/sanity-check/setup.sh
deleted file mode 100644
index 4d97f33e..00000000
--- a/plans/vfc-nfvo-multivimproxy/sanity-check/setup.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2018 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Place the scripts in run order:
-# Start all process required for executing test case
-
-#login to the onap nexus docker repo
-docker login -u docker -p docker nexus3.onap.org:10001
-
-# Start MSB
-docker run -d -p 8500:8500 --name msb_consul consul:0.9.3
-CONSUL_IP=`get-instance-ip.sh msb_consul`
-echo CONSUL_IP=${CONSUL_IP}
-docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
-DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
-echo DISCOVERY_IP=${DISCOVERY_IP}
-docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
-MSB_IP==`get-instance-ip.sh msb_internal_apigateway`
-echo MSB_IP=${MSB_IP}
-
-# Start resmgr
-docker run -d --name vfc-multivimproxy -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/multivimproxy
-RESMGR_IP=`get-instance-ip.sh vfc-multivimproxy`
-for i in {1..20}; do
- curl -sS ${RESMGR_IP}:8486 && break
- echo sleep $i
- sleep $i
-done
-
-# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v RESMGR_IP:${RESMGR_IP}"
diff --git a/plans/vfc-nfvo-resmanagement/sanity-check/setup.sh b/plans/vfc-nfvo-resmanagement/sanity-check/setup.sh
deleted file mode 100644
index 68b78431..00000000
--- a/plans/vfc-nfvo-resmanagement/sanity-check/setup.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Place the scripts in run order:
-# Start all process required for executing test case
-
-#login to the onap nexus docker repo
-docker login -u docker -p docker nexus3.onap.org:10001
-
-# Start MSB
-docker run -d -p 8500:8500 --name msb_consul consul:0.9.3
-CONSUL_IP=`get-instance-ip.sh msb_consul`
-echo CONSUL_IP=${CONSUL_IP}
-docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
-DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
-echo DISCOVERY_IP=${DISCOVERY_IP}
-docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
-MSB_IP==`get-instance-ip.sh msb_internal_apigateway`
-echo MSB_IP=${MSB_IP}
-
-# Start resmgr
-docker run -d --name vfc-resmanagement -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/resmanagement
-RESMGR_IP=`get-instance-ip.sh vfc-resmanagement`
-for i in {1..20}; do
- curl -sS ${RESMGR_IP}:8480 && break
- echo sleep $i
- sleep $i
-done
-
-# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v RESMGR_IP:${RESMGR_IP}"
diff --git a/plans/vfc-nfvo-resmanagement/sanity-check/teardown.sh b/plans/vfc-nfvo-resmanagement/sanity-check/teardown.sh
deleted file mode 100644
index 2ad95c6b..00000000
--- a/plans/vfc-nfvo-resmanagement/sanity-check/teardown.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# This script is sourced by run-csit.sh after Robot test completion.
-kill-instance.sh msb_internal_apigateway
-kill-instance.sh msb_discovery
-kill-instance.sh msb_consul
-kill-instance.sh vfc-resmanagement
diff --git a/plans/vfc-nfvo-resmanagement/sanity-check/testplan.txt b/plans/vfc-nfvo-resmanagement/sanity-check/testplan.txt
deleted file mode 100644
index ae6d3a56..00000000
--- a/plans/vfc-nfvo-resmanagement/sanity-check/testplan.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [integration/csit.git]/tests/.
-# Place the suites in run order.
-vfc/nfvo-resmanagement/test.robot \ No newline at end of file
diff --git a/plans/vfc-nfvo-wfengine/sanity-check/setup.sh b/plans/vfc-nfvo-wfengine/sanity-check/setup.sh
deleted file mode 100644
index 387ccf87..00000000
--- a/plans/vfc-nfvo-wfengine/sanity-check/setup.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017 ZTE Corporation.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Place the scripts in run order:
-# Start all process required for executing test case
-
-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`
-echo MSB_CONSUL_IP=${MSB_CONSUL_IP}
-docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery:1.1.0
-MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
-echo MSB_DISCOVERY_IP=${MSB_DISCOVERY_IP}
-docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway:1.1.0
-MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
-echo MSB_IAG_IP=${MSB_IAG_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
- echo sleep $i
- sleep $i
-done
-
-# wait for container initalization
-echo sleep 30
-sleep 30
-
-ORG="onap"
-PROJECT="vfc"
-DOCKER_REPOSITORY="nexus3.onap.org:10001"
-IMAGE="wfengine-activiti"
-IMAGE_ACTIVITI_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
-
-#get current host IP addres
-SERVICE_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $7}')
-
-# start wfengine-activiti
-# docker run -d --name vfc_wfengine_activiti -p 8804:8080 -e SERVICE_IP=$SERVICE_IP -e SERVICE_PORT=8804 -e OPENPALETTE_MSB_IP=${MSB_IAG_IP} -e OPENPALETTE_MSB_PORT=80 ${IMAGE_ACTIVITI_NAME}
-docker run -d --name vfc_wfengine_activiti -p 8804:8080 -e SERVICE_PORT=8080 -e OPENPALETTE_MSB_IP=${MSB_IAG_IP} -e OPENPALETTE_MSB_PORT=80 ${IMAGE_ACTIVITI_NAME}
-WFENGINE_ACTIVITI_IP=`get-instance-ip.sh vfc_wfengine_activiti`
-
-# Wait for initialization
-for i in {1..10}; do
- curl -sS ${WFENGINE_ACTIVITI_IP}:8080 && break
- echo sleep $i
- sleep $i
-done
-for i in {1..10}; do
- curl -sS ${SERVICE_IP}:8804 && break
- echo sleep $i
- sleep $i
-done
-docker logs vfc_wfengine_activiti
-
-IMAGE="wfengine-mgrservice"
-IMAGE_MGRSERVICE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
-
-# Start wfengine-mgrservice
-#docker run -d --name vfc_wfengine_mgrservice -p 8805:10550 -e SERVICE_IP=$SERVICE_IP -e SERVICE_PORT=8805 -e OPENPALETTE_MSB_IP=${MSB_IAG_IP} -e OPENPALETTE_MSB_PORT=80 ${IMAGE_MGRSERVICE_NAME}
-#docker run -d --name vfc_wfengine_mgrservice -p 8805:10550 -e SERVICE_PORT=10550 -e OPENPALETTE_MSB_IP=${MSB_IAG_IP} -e OPENPALETTE_MSB_PORT=80 ${IMAGE_MGRSERVICE_NAME}
-docker run -d --name vfc_wfengine_mgrservice -p 8805:10550 -e SERVICE_PORT=10550 -e OPENPALETTE_MSB_IP=${WFENGINE_ACTIVITI_IP} -e OPENPALETTE_MSB_PORT=8080 ${IMAGE_MGRSERVICE_NAME}
-
-##docker run -d --name ${IMAGE} -e OPENPALETTE_MSB_IP=${WFENGINEACTIVITIR_IP} -e OPENPALETTE_MSB_PORT=8080 ${IMAGE_MGRSERVICE_NAME}
-WFENGINE_MGRSERVICE_IP=`get-instance-ip.sh vfc_wfengine_mgrservice`
-for i in {1..10}; do
- curl -sS ${WFENGINE_MGRSERVICE_IP}:10550 && break
- echo sleep $i
- sleep $i
-done
-docker logs vfc_wfengine_mgrservice
-
-# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_IP:${MSB_IAG_IP} -v MSB_PORT:80 -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v ACTIVITI_IP:${WFENGINE_ACTIVITI_IP} -v ACTIVITI_PORT:8080 -v MGRSERVICE_IP:${WFENGINE_MGRSERVICE_IP} -v MGRSERVICE_PORT:10550 -v SCRIPTS:${SCRIPTS}"
-##ROBOT_VARIABLES="-v MSB_IAG_IP:${WFENGINEACTIVITIR_IP} -v MSB_IP:${WFENGINEMGRSERVICE_IP} -v MSB_PORT:10550 -v MSB_DISCOVERY_IP:${WFENGINEACTIVITIR_IP} -v MSB_DISCOVERY_PORT:8080 -v WFENGINEACTIVITIR_IP:${WFENGINEACTIVITIR_IP} -v WFENGINEACTIVITIR_PORT:8080 -v WFENGINEMGRSERVICE_IP:${WFENGINEMGRSERVICE_IP} -v WFENGINEMGRSERVICE_PORT:10550 -v SCRIPTS:${SCRIPTS}" \ No newline at end of file
diff --git a/plans/vfc-nfvo-wfengine/sanity-check/teardown.sh b/plans/vfc-nfvo-wfengine/sanity-check/teardown.sh
deleted file mode 100644
index bca33569..00000000
--- a/plans/vfc-nfvo-wfengine/sanity-check/teardown.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# This script is sourced by run-csit.sh after Robot test completion.
-echo === logs vfc_wfengine_activiti ===
-docker logs vfc_wfengine_activiti
-
-echo === logs vfc_wfengine_mgrservice ===
-docker logs vfc_wfengine_mgrservice
-
-kill-instance.sh msb_internal_apigateway
-kill-instance.sh msb_discovery
-kill-instance.sh msb_consul
-kill-instance.sh vfc_wfengine_mgrservice
-kill-instance.sh vfc_wfengine_activiti
diff --git a/plans/vfc-nfvo-wfengine/sanity-check/testplan.txt b/plans/vfc-nfvo-wfengine/sanity-check/testplan.txt
deleted file mode 100644
index 2d03683d..00000000
--- a/plans/vfc-nfvo-wfengine/sanity-check/testplan.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# Test suites are relative paths under [integration/csit.git]/tests/.
-# Place the suites in run order.
-
-vfc/nfvo-wfengine/workflow.robot \ No newline at end of file
diff --git a/run-csit.sh b/run-csit.sh
index 634b0c7c..52d16932 100755
--- a/run-csit.sh
+++ b/run-csit.sh
@@ -24,14 +24,16 @@
function on_exit(){
rc=$?
- rsync -av "$WORKDIR/" "$WORKSPACE/archives"
-
- # Record list of active docker containers
- docker ps --format "{{.Image}}" > "$WORKSPACE/archives/_docker-images.log"
-
- # show memory consumption after all docker instances initialized
- docker_stats | tee "$WORKSPACE/archives/_sysinfo-2-after-robot.txt"
-
+ if [[ ${WORKSPACE} ]]; then
+ if [[ ${WORKDIR} ]]; then
+ rsync -av "$WORKDIR/" "$WORKSPACE/archives"
+ fi
+ # Record list of active docker containers
+ docker ps --format "{{.Image}}" > "$WORKSPACE/archives/_docker-images.log"
+
+ # show memory consumption after all docker instances initialized
+ docker_stats | tee "$WORKSPACE/archives/_sysinfo-2-after-robot.txt"
+ fi
# Run teardown script plan if it exists
cd "${TESTPLANDIR}"
TEARDOWN="${TESTPLANDIR}/teardown.sh"
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh
index 205a6009..b3074b3a 100755
--- a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh
+++ b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh
@@ -2,3 +2,4 @@
docker exec -i dfc_app0 cat /var/log/ONAP/application.log
docker kill dfc_app0
+docker rm dfc_app0
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh
index 808b0b17..38b78f2d 100755
--- a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh
+++ b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh
@@ -1,12 +1,30 @@
#!/bin/bash
+#function to load sftp servers keys to dfc app depending on KNOWN_HOSTS environment variable
+# when KNOWN_HOSTS == "all_hosts_keys" or is not set, public keys of all sftp servers are loaded
+# when KNOWN_HOSTS == "known_hosts_empty", empty known hosts file is created
+# for other strings known hosts file is not created
+function load-sftp-servers-keys() {
+ if [ -z "$KNOWN_HOSTS" ] || [ "$KNOWN_HOSTS" == "all_hosts_keys" ]; then
+ SFTP_SERVERS="$(docker ps -q --filter='name=dfc_sftp')"
+
+ for SFTP_SERVER in $SFTP_SERVERS; do
+ HOST_NAMES=$(docker inspect -f '{{ join .NetworkSettings.Networks.dfcnet.Aliases ","}}' $SFTP_SERVER)
+ KEY_ENTRY=$(echo $HOST_NAMES "$(docker exec $SFTP_SERVER cat /etc/ssh/ssh_host_rsa_key.pub)" |
+ sed -e 's/\w*@\w*$//')
+ docker exec -u root dfc_app0 sh -c "echo $KEY_ENTRY >> /home/datafile/.ssh/known_hosts"
+ done
+ elif [ "$KNOWN_HOSTS" == "known_hosts_empty" ]; then
+ docker exec -u root dfc_app0 sh -c "touch /home/datafile/.ssh/known_hosts"
+ fi
+}
+
set -x
#Start DFC app
-
DOCKER_SIM_NWNAME="dfcnet"
echo "Creating docker network $DOCKER_SIM_NWNAME, if needed"
-docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME
+docker network ls | grep $DOCKER_SIM_NWNAME >/dev/null || docker network create $DOCKER_SIM_NWNAME
docker-compose up -d
@@ -14,21 +32,23 @@ DFC_APP="$(docker ps -q --filter='name=dfc_app0')"
#Wait for initialization of docker containers for dfc app and all simulators
for i in {1..10}; do
- if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ]
- then
- echo "DFC app Running"
- # enable TRACE logging of DFC
- docker exec $DFC_APP /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: WARN/org.onap.dcaegen2.collectors.datafile: TRACE/g' /opt/app/datafile/config/application.yaml"
-
- #enable TRACE logging of spring-framework
- docker exec $DFC_APP /bin/sh -c " sed -i 's/org.springframework.data: ERROR/org.springframework.data: TRACE/g' /opt/app/datafile/config/application.yaml"
-
- docker restart $DFC_APP
- sleep 10
-
- break
- else
- echo sleep $i
- sleep $i
+ if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ]; then
+ echo "DFC app Running"
+
+ load-sftp-servers-keys
+
+ # enable TRACE logging of DFC
+ docker exec $DFC_APP /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: WARN/org.onap.dcaegen2.collectors.datafile: TRACE/g' /opt/app/datafile/config/application.yaml"
+
+ #enable TRACE logging of spring-framework
+ docker exec $DFC_APP /bin/sh -c " sed -i 's/org.springframework.data: ERROR/org.springframework.data: TRACE/g' /opt/app/datafile/config/application.yaml"
+
+ docker restart $DFC_APP
+ sleep 10
+
+ break
+ else
+ echo sleep $i
+ sleep $i
fi
done
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml b/scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml
index 9e15ccf0..2ea2882b 100644
--- a/scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml
+++ b/scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml
@@ -15,8 +15,13 @@ services:
- "8433:8433"
networks:
dfcnet: null
+ volumes:
+ - $SIMGROUP_ROOT/tls/:/opt/app/datafile/etc/cert/
environment:
CONSUL_HOST: "consul-server"
CONSUL_PORT: 8500
CONFIG_BINDING_SERVICE: "config-binding-service"
+ CONFIG_BINDING_SERVICE_SERVICE_PORT: 10000
HOSTNAME: "dfc_app0"
+ KNOWN_HOSTS_FILE_PATH: "/home/datafile/.ssh/known_hosts"
+
diff --git a/scripts/dcaegen2-services-son-handler/sonhandler/Dockerfile b/scripts/dcaegen2-services-son-handler/sonhandler/Dockerfile
new file mode 100644
index 00000000..688a2fe0
--- /dev/null
+++ b/scripts/dcaegen2-services-son-handler/sonhandler/Dockerfile
@@ -0,0 +1,15 @@
+FROM python:alpine3.7
+
+ADD configdb-oof-sim.py /
+
+ADD ./sim-data /
+
+RUN pip install Flask
+
+RUN pip install requests
+
+EXPOSE 5000
+
+CMD ["flask", "run", "--host", "0.0.0.0"]
+
+CMD [ "python", "./configdb-oof-sim.py" ]
diff --git a/scripts/dcaegen2-services-son-handler/sonhandler/configdb-oof-sim.py b/scripts/dcaegen2-services-son-handler/sonhandler/configdb-oof-sim.py
new file mode 100644
index 00000000..7a51c951
--- /dev/null
+++ b/scripts/dcaegen2-services-son-handler/sonhandler/configdb-oof-sim.py
@@ -0,0 +1,98 @@
+import flask
+import json
+from flask import request
+import requests
+import threading
+import time
+
+app = flask.Flask(__name__)
+app.config["DEBUG"] = True
+
+
+def get_neighbour_cell_list_for_cell_id():
+ with open('cell_list.json') as cell_list:
+ data = json.load(cell_list)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+def get_pci_for_cell_id():
+ with open('pci_value.json') as pci_value:
+ data = json.load(pci_value)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+def get_cell_data_for_cell_id():
+ with open('cell_data.json') as cell_data:
+ data = json.load(cell_data)
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ return data, None
+
+def get_oof_sync_response():
+ with open('oof_syn_response.json') as syncRes:
+ data = json.load(syncRes)
+ if not data:
+ return {"Error": "Unale to read file"}, 503
+ return data, None
+
+def get_oof_async_response(callback_url, transaction_id):
+ time.sleep(10)
+ with open('oof_async_response.json') as asyncRes:
+ data = json.load(asyncRes)
+ data['transactionId'] = transaction_id
+ if not data:
+ return {"Error": "Unable to read file"}, 503
+ res = requests.post(callback_url, json=data)
+ print('response from server:',res.text)
+ return res
+
+@app.route("/api/sdnc-config-db/v3/getNbrList/<cell_id>/<ts>", methods=["GET"])
+def get_neighbour_list(cell_id, ts):
+ data, status = get_neighbour_cell_list_for_cell_id()
+ if not status:
+ return data
+ return data, 503
+
+@app.route("/api/sdnc-config-db/v3/getPCI/<cell_id>/<ts>", methods=["GET"])
+def get_pci(cell_id, ts):
+ data, status = get_pci_for_cell_id()
+ if not status:
+ return data
+ return data, 503
+@app.route("/api/sdnc-config-db/v3/getPnfId/<cell_id>/<ts>", methods=["GET"])
+def get_pnf_id(cell_id, ts):
+ data, status = get_pci_for_cell_id()
+ data['value'] = 'ncserver5'
+ if not status:
+ return data
+ return data, 503
+
+@app.route("/api/sdnc-config-db/v3/getCell/<cell_id>", methods=["GET"])
+def get_cell_data(cell_id):
+ data, status = get_cell_data_for_cell_id()
+ if not status:
+ return data
+ return data, 503
+
+@app.route("/api/oof/v1/pci",methods=["POST"])
+def oof_optimizatio_result():
+ content = request.get_json()
+ callback_url = content['requestInfo']['callbackUrl']
+ transaction_id = content['requestInfo']['transactionId']
+ try:
+ task = threading.Thread(target=get_oof_async_response, args=(callback_url,transaction_id,))
+ task.daemon = True
+ task.start()
+ except:
+ print("Error: Unable to start thread")
+
+ data, status = get_oof_sync_response()
+
+ if not status:
+ return data, 202
+ return data, 503
+
+
+app.run(host='0.0.0.0')
diff --git a/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/cell_data.json b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/cell_data.json
new file mode 100644
index 00000000..0e4e73f4
--- /dev/null
+++ b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/cell_data.json
@@ -0,0 +1,13 @@
+{
+ "neighbor": ["Chn0066", "Chn0067", "Chn0068", "Chn0069", "Chn0070", "Chn0072", "Chn0073", "Chn0074", "Chn0075", "Chn0076", "Chn0077", "Chn0078", "Chn0079", "Chn0080"],
+ "Cell": {
+ "networkId": "ran-1",
+ "nodeId": "Chn0071",
+ "physicalCellId": 1,
+ "pnfId": "ncserver5",
+ "sectorNumber": null,
+ "latitude": "27.55626304907802",
+ "longitude": "-58.48690415723466",
+ "notes": "NA"
+ }
+} \ No newline at end of file
diff --git a/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/cell_list.json b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/cell_list.json
new file mode 100644
index 00000000..4f961ae2
--- /dev/null
+++ b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/cell_list.json
@@ -0,0 +1,60 @@
+{
+ "cellId": "Chn0071",
+ "nbrList": [{
+ "targetCellId": "Chn0066",
+ "pciValue": 0,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0067",
+ "pciValue": 1,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0068",
+ "pciValue": 2,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0069",
+ "pciValue": 3,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0070",
+ "pciValue": 4,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0072",
+ "pciValue": 6,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0073",
+ "pciValue": 7,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0074",
+ "pciValue": 8,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0075",
+ "pciValue": 9,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0076",
+ "pciValue": 10,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0077",
+ "pciValue": 11,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0078",
+ "pciValue": 12,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0079",
+ "pciValue": 13,
+ "ho": true
+ }, {
+ "targetCellId": "Chn0080",
+ "pciValue": 14,
+ "ho": true
+ }]
+} \ No newline at end of file
diff --git a/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/oof_async_response.json b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/oof_async_response.json
new file mode 100644
index 00000000..99f54cb4
--- /dev/null
+++ b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/oof_async_response.json
@@ -0,0 +1,14 @@
+{
+ "transactionId": "fff33db3-8fc9-4e29-89ff-7419c85900bd",
+ "requestId": "742b9e6a-aa55-487e-9d71-a4a5e05b3981",
+ "requestStatus": "completed",
+ "statusMessage": "success",
+ "solutions": {
+ "networkId": "ran-1",
+ "pciSolutions": [{
+ "cellId": "Chn0071",
+ "pci": "5"
+ }],
+ "anrSolutions": []
+ }
+} \ No newline at end of file
diff --git a/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/oof_syn_response.json b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/oof_syn_response.json
new file mode 100644
index 00000000..c9260bbc
--- /dev/null
+++ b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/oof_syn_response.json
@@ -0,0 +1,6 @@
+{
+ "requestId": "742b9e6a-aa55-487e-9d71-a4a5e05b3981",
+ "transactionId": "fff33db3-8fc9-4e29-89ff-7419c85900bd",
+ "requestStatus": "accepted",
+ "statusMessage": ""
+} \ No newline at end of file
diff --git a/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/pci_value.json b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/pci_value.json
new file mode 100644
index 00000000..6b6d4475
--- /dev/null
+++ b/scripts/dcaegen2-services-son-handler/sonhandler/sim-data/pci_value.json
@@ -0,0 +1,4 @@
+{
+ "attributeName": "PCIvalue",
+ "value": "5"
+} \ No newline at end of file
diff --git a/scripts/policy/docker-compose-drools.yml b/scripts/policy/docker-compose-drools.yml
index 974b465f..5fc6ef67 100644
--- a/scripts/policy/docker-compose-drools.yml
+++ b/scripts/policy/docker-compose-drools.yml
@@ -32,9 +32,8 @@ services:
- 8081
drools:
image: nexus3.onap.org:10001/onap/policy-drools:${POLICY_DROOLS_VERSION}
- user: 1000:1000
container_name: drools
- depends_on:
+ depends_on:
- mariadb
- nexus
hostname: drools
diff --git a/scripts/policy/docker-compose-pap.yml b/scripts/policy/docker-compose-pap.yml
index 5438557b..934e1739 100644
--- a/scripts/policy/docker-compose-pap.yml
+++ b/scripts/policy/docker-compose-pap.yml
@@ -23,6 +23,12 @@ services:
- ./config/db:/docker-entrypoint-initdb.d
expose:
- 3306
+ message-router:
+ image: dmaap/simulator
+ container_name: dmaap-simulator
+ hostname: dmaap-simulator
+ expose:
+ - 3904
pap:
image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
container_name: policy-pap
@@ -46,8 +52,11 @@ services:
container_name: policy-wait
depends_on:
- mariadb
+ - message-router
hostname: policy-wait
- command: mariadb:3306
+ command:
+ mariadb:3306
+ message-router:3904
start_all:
image: dadarek/wait-for-dependencies
environment:
@@ -60,5 +69,6 @@ services:
hostname: policy-wait-all
command:
mariadb:3306
+ message-router:3904
pap:6969
api:6969
diff --git a/scripts/policy/drools-apps/custom/papDefaultConfig.json b/scripts/policy/drools-apps/custom/papDefaultConfig.json
index 2575d8a5..1e47c7e7 100644
--- a/scripts/policy/drools-apps/custom/papDefaultConfig.json
+++ b/scripts/policy/drools-apps/custom/papDefaultConfig.json
@@ -25,7 +25,7 @@
"databaseDriver": "org.mariadb.jdbc.Driver",
"databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin",
"databaseUser": "policy_user",
- "databasePassword": "cG9saWN5X3VzZXI=",
+ "databasePassword": "policy_user",
"persistenceUnit": "PolicyMariaDb"
},
"topicParameterGroup": {
diff --git a/scripts/sdnc/netconf-pnp-simulator/docker-compose.yml b/scripts/sdnc/netconf-pnp-simulator/docker-compose.yml
index 67a75c94..d8e723ba 100755
--- a/scripts/sdnc/netconf-pnp-simulator/docker-compose.yml
+++ b/scripts/sdnc/netconf-pnp-simulator/docker-compose.yml
@@ -2,7 +2,7 @@ version: '3'
services:
netconf-pnp-simulator:
- image: nexus3.onap.org:10001/onap/integration/simulators/netconf-pnp-simulator:2.8.5
+ image: nexus3.onap.org:10001/onap/integration/simulators/netconf-pnp-simulator:2.8.6
container_name: netconf-simulator
restart: always
ports:
diff --git a/tests/aaf/certservice/libraries/JksFilesValidator.py b/tests/aaf/certservice/libraries/JksFilesValidator.py
deleted file mode 100644
index 8c150de4..00000000
--- a/tests/aaf/certservice/libraries/JksFilesValidator.py
+++ /dev/null
@@ -1,70 +0,0 @@
-from OpenSSL import crypto
-from cryptography.x509.oid import ExtensionOID
-from cryptography import x509
-from EnvsReader import EnvsReader
-
-class JksFilesValidator:
-
- def __init__(self, mount_path):
- self.keystorePassPath = mount_path + '/keystore.pass'
- self.keystoreJksPath = mount_path + '/keystore.jks'
- self.truststorePassPath = mount_path + '/truststore.pass'
- self.truststoreJksPath = mount_path + '/truststore.jks'
-
- def get_and_compare_data(self, path_to_env):
- data = self.get_data(path_to_env)
- return data, self.contains_expected_data(data)
-
- def can_open_keystore_and_truststore_with_pass(self):
- can_open_keystore = self.can_open_jks_file_with_pass_file(self.keystorePassPath, self.keystoreJksPath)
- can_open_truststore = self.can_open_jks_file_with_pass_file(self.truststorePassPath, self.truststoreJksPath)
-
- return can_open_keystore & can_open_truststore
-
- def can_open_jks_file_with_pass_file(self, pass_file_path, jks_file_path):
- try:
- self.get_certificate(pass_file_path, jks_file_path)
- return True
- except:
- return False
-
- def get_data(self, path_to_env):
- envs = self.get_envs_as_dict(EnvsReader().read_env_list_from_file(path_to_env))
- certificate = self.get_certificate(self.keystorePassPath, self.keystoreJksPath)
- data = self.get_owner_data_from_certificate(certificate)
- data['SANS'] = self.get_sans(certificate)
- return type('', (object,), {"expectedData": envs, "actualData": data})
-
- def contains_expected_data(self, data):
- expectedData = data.expectedData
- actualData = data.actualData
- return cmp(expectedData, actualData) == 0
-
- def get_owner_data_from_certificate(self, certificate):
- list = certificate.get_subject().get_components()
- return dict((k, v) for k, v in list)
-
- def get_certificate(self, pass_file_path, jks_file_path):
- password = open(pass_file_path, 'rb').read()
- crypto.load_pkcs12(open(jks_file_path, 'rb').read(), password)
- return crypto.load_pkcs12(open(jks_file_path, 'rb').read(), password).get_certificate()
-
- def get_sans(self, cert):
- extension = cert.to_cryptography().extensions.get_extension_for_oid(ExtensionOID.SUBJECT_ALTERNATIVE_NAME)
- dnsList = extension.value.get_values_for_type(x509.DNSName)
- return ':'.join(map(lambda dns: dns.encode('ascii','ignore'), dnsList))
-
- def get_envs_as_dict(self, list):
- envs = self.get_list_of_pairs_by_mappings(list)
- return self.remove_nones_from_dict(envs)
-
- def remove_nones_from_dict(self, dictionary):
- return dict((k, v) for k, v in dictionary.iteritems() if k is not None)
-
- def get_list_of_pairs_by_mappings(self, list):
- mappings = self.get_mappings()
- listOfEnvs = map(lambda k: k.split('='), list)
- return dict((mappings.get(a[0]), a[1]) for a in listOfEnvs)
-
- def get_mappings(self):
- return {'COMMON_NAME':'CN', 'ORGANIZATION':'O', 'ORGANIZATION_UNIT':'OU', 'LOCATION':'L', 'STATE':'ST', 'COUNTRY':'C', 'SANS':'SANS'}
diff --git a/tests/aaf/certservice/resources/cert-service-properties.robot b/tests/aaf/certservice/resources/cert-service-properties.robot
deleted file mode 100644
index 53d6b246..00000000
--- a/tests/aaf/certservice/resources/cert-service-properties.robot
+++ /dev/null
@@ -1,27 +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
-${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
diff --git a/tests/ccsdk-oran/polmansuite/__init__.robot b/tests/ccsdk-oran/polmansuite/__init__.robot
new file mode 100644
index 00000000..bf52713b
--- /dev/null
+++ b/tests/ccsdk-oran/polmansuite/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Non-RT RIC Policy Management - polmansuite
diff --git a/tests/ccsdk-oran/polmansuite/test.robot b/tests/ccsdk-oran/polmansuite/test.robot
new file mode 100644
index 00000000..1390a8c6
--- /dev/null
+++ b/tests/ccsdk-oran/polmansuite/test.robot
@@ -0,0 +1,23 @@
+*** Settings ***
+Library OperatingSystem
+Library Process
+
+*** Test Cases ***
+
+Functional Test Case 1
+ [Documentation] Functional Test Case 1 - FTC1
+ Start Process ${AUTOTEST_ROOT}/FTC1.sh remote auto-clean --env-file ${POLMAN_PLANS}/test_env.sh shell=true cwd=${AUTOTEST_ROOT}
+ ${cli_cmd_output}= Wait For Process timeout=3600
+ Should Be Equal as Integers ${cli_cmd_output.rc} 0
+ ${ResultFileContent}= Get File ${AUTOTEST_ROOT}/.resultFTC1.txt
+ Should Be Equal As Integers ${ResultFileContent} 0
+
+Functional Test Case 2
+ [Documentation] Functional Test Case 2 - FTC150
+ Start Process ${AUTOTEST_ROOT}/FTC150.sh remote auto-clean --env-file ${POLMAN_PLANS}/test_env.sh shell=true cwd=${AUTOTEST_ROOT}
+ ${cli_cmd_output}= Wait For Process timeout=3600
+ Should Be Equal as Integers ${cli_cmd_output.rc} 0
+ ${ResultFileContent}= Get File ${AUTOTEST_ROOT}/.resultFTC150.txt
+ Should Be Equal As Integers ${ResultFileContent} 0
+
+
diff --git a/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot b/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot
index 76dc0338..c425fe2a 100644
--- a/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot
+++ b/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot
@@ -37,4 +37,20 @@ DR Redir Sim Downloaded Volume Equal
[Documentation] Verify that the size of the downloaded data volume is equal to a target value
[Arguments] ${target_ctr_value}
${resp}= Run Process ${CLI_DR_REDIR_SIM_DOWNLOADED_VOLUME} shell=yes
- Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} \ No newline at end of file
+ Should Be Equal As Strings ${resp.stdout} ${target_ctr_value}
+
+Start DFC
+ [Documentation] Start DFC container
+ ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} env:SIMGROUP_ROOT=${SIMGROUP_ROOT}
+ Log To Console Dfc-start:
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+
+
+Test Teardown
+ [Documentation] Cleanup containers
+ ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+ ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+ ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
+ Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
diff --git a/tests/dcaegen2-collectors-datafile/testsuites/Functional-Single-File-suite/FuncSingleFile.robot b/tests/dcaegen2-collectors-datafile/testsuites/Functional-Single-File-suite/FuncSingleFile.robot
index 3f8be179..8213c702 100755
--- a/tests/dcaegen2-collectors-datafile/testsuites/Functional-Single-File-suite/FuncSingleFile.robot
+++ b/tests/dcaegen2-collectors-datafile/testsuites/Functional-Single-File-suite/FuncSingleFile.robot
@@ -18,126 +18,77 @@ Verify single event with single 1MB SFTP file. From event poll to published file
[TAGS] DFC_FUNCTIONAL_1
[Documentation] Verify single event with single SFTP 1MB file from event poll to published file.
${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
- Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- Set Environment Variable MR_TC --tc100
- Set Environment Variable DR_TC --tc normal
- Set Environment Variable DR_REDIR_TC --tc normal
- Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
- Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A
- Set Environment Variable DR_REDIR_FEEDS 2:A
- Set Environment Variable FTP_FILE_PREFIXES A
- Set Environment Variable NUM_FTPFILES 1
- Set Environment Variable NUM_PNFS 1
- Set Environment Variable FILE_SIZE 1MB
- Set Environment Variable FTP_TYPE SFTP
- Set Environment Variable NUM_FTP_SERVERS 1
- Set Environment Variable DR_FEEDS 2:A
- Set Environment Variable DR_REDIR_SIM drsim_redir
- Set Environment Variable SFTP_SIMS sftp-server0:22
- Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21
+ Verify Single Event From Event Poll To Published File 1 --tc100 SFTP
- ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
- Log To Console Simulator-start:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
- DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
- ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
- Log To Console Consul APP write:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+Verify single event with single 5MB SFTP file. From event poll to published file
+ [TAGS] DFC_FUNCTIONAL_2
+ [Documentation] Verify single event with single SFTP 5MB file from event poll to published file.
+ Verify Single Event From Event Poll To Published File 5 --tc101 SFTP
- ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
- Log To Console Consul APP read:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
- Log To Console CBS merged configuration:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+Verify single event with single 50MB SFTP file. From event poll to published file
+ [TAGS] DFC_FUNCTIONAL_3
+ [Documentation] Verify single event with single SFTP 50MB file from event poll to published file.
+ Verify Single Event From Event Poll To Published File 50 --tc102 SFTP
- Sleep 10
- ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
- Log To Console Dfc-start:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+######## Single file, FTPES
+Verify single event with single 1MB FTPES file. From event poll to published file
+ [TAGS] DFC_FUNCTIONAL_10
+ [Documentation] Verify single event with single FTPES 1MB file from event poll to published file.
+ Verify Single Event From Event Poll To Published File 1 --tc200 FTPES
- Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
- Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
- Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
- DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim
+Verify single event with single 5MB FTPES file. From event poll to published file
+ [TAGS] DFC_FUNCTIONAL_11
+ [Documentation] Verify single event with single FTPES 5MB file from event poll to published file.
+ Verify Single Event From Event Poll To Published File 5 --tc201 FTPES
- ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+Verify single event with single 50MB FTEPS file. From event poll to published file
+ [TAGS] DFC_FUNCTIONAL_12
+ [Documentation] Verify single event with single FTPES 50MB file from event poll to published file.
+ Verify Single Event From Event Poll To Published File 50 --tc202 FTPES
-Verify single event with single 5MB SFTP file. From event poll to published file
- [TAGS] DFC_FUNCTIONAL_2
- [Documentation] Verify single event with single SFTP 5MB file from event poll to published file.
- ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
- Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- Set Environment Variable MR_TC --tc101
- Set Environment Variable DR_TC --tc normal
- Set Environment Variable DR_REDIR_TC --tc normal
- Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
- Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A
- Set Environment Variable DR_REDIR_FEEDS 2:A
- Set Environment Variable FTP_FILE_PREFIXES A
- Set Environment Variable NUM_FTPFILES 1
- Set Environment Variable NUM_PNFS 1
- Set Environment Variable FILE_SIZE 5MB
- Set Environment Variable FTP_TYPE SFTP
- Set Environment Variable NUM_FTP_SERVERS 1
- Set Environment Variable DR_FEEDS 2:A
- Set Environment Variable DR_REDIR_SIM drsim_redir
- Set Environment Variable SFTP_SIMS sftp-server0:22
- Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21
+*** Keywords ***
+Verify Single Event From Event Poll To Published File
+ [Documentation] Keyword to verify single event with file with given parameters.
+ [Arguments] ${file_size_in_mb} ${mr_tc} ${ftp_type}
+ Set Environment Variable MR_TC ${mr_tc}
+ Set Environment Variable FILE_SIZE ${file_size_in_mb}MB
+ Set Environment Variable FTP_TYPE ${ftp_type}
+ Set Default Environment Variables
${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
- Log To Console Simulator-start: ${cli_cmd_output.stdout}
+ Log To Console Simulator-start:
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
- ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
+ ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
Log To Console Consul APP write:
Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
+ ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
Log To Console Consul APP read:
Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
+ ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
Log To Console CBS merged configuration:
Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
Sleep 10
- ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
- Log To Console Dfc-start:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+ Start DFC
Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
- DR Redir Sim Downloaded Volume Equal 5 000 000 #Verify 5 000 000 bytes published file data in DR redir sim
+ DR Redir Sim Downloaded Volume Equal ${file_size_in_mb} 000 000 #Verify correct number of bytes published file data in DR redir sim
- ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process docker stop $(docker ps -aq) shell=yes
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process docker rm $(docker ps -aq) shell=yes
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- Sleep 10
+ [Teardown] Test Teardown
-Verify single event with single 50MB SFTP file. From event poll to published file
- [TAGS] DFC_FUNCTIONAL_3
- [Documentation] Verify single event with single SFTP 50MB file from event poll to published file.
- ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
- Set Environment Variable MR_TC --tc102
+Set Default Environment Variables
+ [Documentation] Set default environment variables for simulators setup
Set Environment Variable DR_TC --tc normal
Set Environment Variable DR_REDIR_TC --tc normal
Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
@@ -146,115 +97,8 @@ Verify single event with single 50MB SFTP file. From event poll to published fil
Set Environment Variable FTP_FILE_PREFIXES A
Set Environment Variable NUM_FTPFILES 1
Set Environment Variable NUM_PNFS 1
- Set Environment Variable FILE_SIZE 50MB
- Set Environment Variable FTP_TYPE SFTP
Set Environment Variable NUM_FTP_SERVERS 1
Set Environment Variable DR_FEEDS 2:A
Set Environment Variable DR_REDIR_SIM drsim_redir
Set Environment Variable SFTP_SIMS sftp-server0:22
- Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21
-
- ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
- Log To Console Simulator-start: ${cli_cmd_output.stdout}
- MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
- DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
-
- ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
- Log To Console Consul APP write:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
- Log To Console Consul APP read:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
- Log To Console CBS merged configuration:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- Sleep 10
-
- ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
- Log To Console Dfc-start:
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
- Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
- Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
- Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
- DR Redir Sim Downloaded Volume Equal 50 000 000 #Verify 50 000 000 bytes published file data in DR redir sim
-
- ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
- ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
- Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
-
-######### Single file, FTPS
-# Temporarily removed due to issues with the certificates for the ftsp server simulator cert.
-#Verify single event with single 1MB FTPS file. From event poll to published file
-# [TAGS] DFC_FUNCTIONAL_10
-# [Documentation] Verify single event with single FTPS 1MB file from event poll to published file.
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
-# Set Environment Variable MR_TC --tc200
-# Set Environment Variable DR_TC --tc normal
-# Set Environment Variable DR_REDIR_TC --tc normal
-# Set Environment Variable NUM_FTPFILES 1
-# Set Environment Variable NUM_PNFS 1
-# Set Environment Variable FILE_SIZE 1MB
-# Set Environment Variable FTP_TYPE FTPS
-# ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
-# MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
-# DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
-# Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
-# Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
-# Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
-# DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim
-# ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
-#
-#Verify single event with single 5MB FTPS file. From event poll to published file
-# [TAGS] DFC_FUNCTIONAL_11
-# [Documentation] Verify single event with single FTPS 5MB file from event poll to published file.
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
-# Set Environment Variable MR_TC --tc201
-# Set Environment Variable DR_TC --tc normal
-# Set Environment Variable DR_REDIR_TC --tc normal
-# Set Environment Variable NUM_FTPFILES 1
-# Set Environment Variable NUM_PNFS 1
-# Set Environment Variable FILE_SIZE 5MB
-# Set Environment Variable FTP_TYPE FTPS
-# ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
-# MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
-# DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
-# Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
-# Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
-# Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
-# DR Redir Sim Downloaded Volume Equal 5 000 000 #Verify 5 000 000 bytes published file data in DR redir sim
-# ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
-#
-#Verify single event with single 50MB FTPS file. From event poll to published file
-# [TAGS] DFC_FUNCTIONAL_12
-# [Documentation] Verify single event with single FTPS 50MB file from event poll to published file.
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
-# Set Environment Variable MR_TC --tc202
-# Set Environment Variable DR_TC --tc normal
-# Set Environment Variable DR_REDIR_TC --tc normal
-# Set Environment Variable NUM_FTPFILES 1
-# Set Environment Variable NUM_PNFS 1
-# Set Environment Variable FILE_SIZE 50MB
-# Set Environment Variable FTP_TYPE FTPS
-# ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
-# MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
-# DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
-# Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
-# Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
-# Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
-# DR Redir Sim Downloaded Volume Equal 50 000 000 #Verify 50 000 000 bytes published file data in DR redir sim
-# ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
-# ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
-#
-
-*** Keywords ***
-
+ Set Environment Variable FTPES_SIMS ftpes-server-vsftpd0:21
diff --git a/tests/dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite/StrictHostChecking.robot b/tests/dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite/StrictHostChecking.robot
new file mode 100755
index 00000000..3962d4e5
--- /dev/null
+++ b/tests/dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite/StrictHostChecking.robot
@@ -0,0 +1,112 @@
+*** Settings ***
+Library OperatingSystem
+Library RequestsLibrary
+Library Process
+
+Resource ../../resources/common-keywords.robot
+
+Test Teardown
+
+*** Variables ***
+${CONSUL_UPL_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_MEAS.json
+${CONSUL_UPL_APP_INSECURE_SFTP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_MEAS_no_strict_host_key_checking.json
+${CONSUL_GET_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?raw
+${CBS_GET_MERGED_CONFIG} /usr/bin/curl -v http://127.0.0.1:10000/service_component_all/dfc_app0
+
+*** Test Cases ***
+
+######### Single file, SFTP, various SFTP Strict host key checking settings
+
+Verify single event with SFTP file, when host known and strict host key checking enabled. From event poll to published file
+ [TAGS] DFC_STRICT_HOST_KEY_CHECKING_1
+ [Documentation] Verify single event with SFTP file, when host known and strict host key checking enabled. From event poll to published file.
+ [Setup] Setup Strict Host Key Checking Test ${CONSUL_UPL_APP} all_hosts_keys
+
+ Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
+ Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
+ Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
+ DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim
+
+ [Teardown] Test Teardown
+
+Verify single event with SFTP file, when host unknown and strict host key checking disabled. From event poll to published file
+ [TAGS] DFC_STRICT_HOST_KEY_CHECKING_2
+ [Documentation] Verify single event with SFTP file, when host unknown and strict host key checking disabled. From event poll to published file.
+ [Setup] Setup Strict Host Key Checking Test ${CONSUL_UPL_APP_INSECURE_SFTP} known_hosts_empty
+
+ Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
+ Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
+ Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
+ DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim
+
+ [Teardown] Test Teardown
+
+Verify single event with SFTP file, when no known hosts file and strict host key checking enabled. From event poll to published file
+ [TAGS] DFC_STRICT_HOST_KEY_CHECKING_3
+ [Documentation] Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published.
+ [Setup] Setup Strict Host Key Checking Test ${CONSUL_UPL_APP} no_known_hosts_file
+
+ Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
+ Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
+ Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
+ DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim
+
+ [Teardown] Test Teardown
+
+
+
+Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published
+ [TAGS] DFC_STRICT_HOST_KEY_CHECKING_4
+ [Documentation] Verify single event with SFTP file, when host unknown and strict host key checking enabled. File not published.
+ [Setup] Setup Strict Host Key Checking Test ${CONSUL_UPL_APP} known_hosts_empty
+ Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
+ Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
+ Sleep 60
+ DR Sim Published Files Equal 0 #Verify no file was published to DR sim
+ [Teardown] Test Teardown
+
+*** Keywords ***
+
+Setup Strict Host Key Checking Test
+ [Documentation] Sets up strict host key checking test with single 1MB file
+ [Arguments] ${consul_config_request} ${known_hosts_file}
+ Set Environment Variable MR_TC --tc100
+ Set Environment Variable DR_TC --tc normal
+ Set Environment Variable DR_REDIR_TC --tc normal
+ Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
+ Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A
+ Set Environment Variable DR_REDIR_FEEDS 2:A
+ Set Environment Variable FTP_FILE_PREFIXES A
+ Set Environment Variable NUM_FTPFILES 1
+ Set Environment Variable NUM_PNFS 1
+ Set Environment Variable FILE_SIZE 1MB
+ Set Environment Variable FTP_TYPE SFTP
+ Set Environment Variable NUM_FTP_SERVERS 1
+ Set Environment Variable DR_FEEDS 2:A
+ Set Environment Variable DR_REDIR_SIM drsim_redir
+ Set Environment Variable SFTP_SIMS sftp-server0:22
+ Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21
+
+ ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
+ Log To Console Simulator-start:
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+ MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
+ DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
+
+ ${cli_cmd_output}= Run Process ${consul_config_request} shell=yes
+ Log To Console Consul APP write:
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+
+ ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
+ Log To Console Consul APP read:
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+
+ ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
+ Log To Console CBS merged configuration:
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
+
+ Sleep 10
+
+ ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} env:KNOWN_HOSTS=${known_hosts_file}
+ Log To Console Dfc-start:
+ Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
diff --git a/tests/dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite/__init__.robot b/tests/dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite/__init__.robot
new file mode 100755
index 00000000..77743849
--- /dev/null
+++ b/tests/dcaegen2-collectors-datafile/testsuites/Strict-Host-Checking-suite/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation DFC Strict Host Checking test suite. Single event with single file.
diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/A20181004.0000-1000-0015-1000_5G.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/A20181004.0000-1000-0015-1000_5G.xml
index d826157e..8d42d62c 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/A20181004.0000-1000-0015-1000_5G.xml
+++ b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/A20181004.0000-1000-0015-1000_5G.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="MeasDataCollection.xsl"?>
-<MeasDataFile xmlns="http://www.3gpp.org/ftp/specs/archive/28_series/28.550#measData"
+<measDataFile xmlns="http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:schemaLocation="http://www.3gpp.org/ftp/specs/archive/28_series/28.550#measData http://www.3gpp.org/ftp/specs/archive/28_series/28.550#measData">
- <fileHeader fileFormatVersion="28.550 V7.0" vendorName="Company NN" dnPrefix="DC=a1.companyNN.com,SubNetwork=1,IRPAgent=1">
+xsi:schemaLocation="http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData">
+ <fileHeader fileFormatVersion="28.532 V7.0" vendorName="Company NN" dnPrefix="DC=a1.companyNN.com,SubNetwork=1,IRPAgent=1">
<fileSender senderName="SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1"/>
- <MeasData beginTime="2000-03-01T14:00:00+02:00"/>
+ <measData beginTime="2000-03-01T14:00:00+02:00"/>
</fileHeader>
<measData>
- <measuredEntity localDn="SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1" userLabel="RNC Telecomville"/>
+ <measEntity localDn="SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1" userLabel="RNC Telecomville"/>
<measInfo>
<job jobId="1231"/>
<granPeriod duration="PT900S" endTime="2000-03-01T14:14:30+02:00"/>
@@ -83,6 +83,6 @@ xsi:schemaLocation="http://www.3gpp.org/ftp/specs/archive/28_series/28.550#measD
</measInfo>
</measData>
<fileFooter>
- <MeasData endTime="2000-03-01T14:15:00+02:00"/>
+ <measData endTime="2000-03-01T14:15:00+02:00"/>
</fileFooter>
-</MeasDataFile>
+</measDataFile>
diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.xml
index 439d5768..9c1b9857 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.xml
+++ b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.xml
@@ -1,11 +1,11 @@
-<MeasDataFile xmlns="http://www.3gpp.org/ftp/specs/archive/28_series/28.550#measData">
+<measDataFile xmlns="http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData">
<fileHeader dnPrefix="some dnPrefix" vendorName="FooBar Ltd"
- fileFormatVersion="28.550 V1.0">
+ fileFormatVersion="28.532 V1.0">
<fileSender senderName="Dublin"/>
- <MeasData beginTime="2018-10-02T12:00:00+01:00"/>
+ <measData beginTime="2018-10-02T12:00:00+01:00"/>
</fileHeader>
<measData>
- <measuredEntity swVersion="r0.1" localDn="Dublin1"/>
+ <measEntity swVersion="r0.1" localDn="Dublin1"/>
<measInfo measInfoId="measInfoId1">
<job jobId="jobId1"/>
<granPeriod endTime="2001-10-02T12:15:00Z" duration="PT100S"/>
@@ -18,7 +18,7 @@
</measInfo>
</measData>
<measData>
- <measuredEntity swVersion="r0.2" localDn="Dublin2"/>
+ <measEntity swVersion="r0.2" localDn="Dublin2"/>
<measInfo measInfoId="measInfoId2">
<job jobId="jobId"/>
<granPeriod endTime="2002-10-02T12:15:00Z" duration="PT200S"/>
@@ -31,7 +31,7 @@
</measInfo>
</measData>
<measData>
- <measuredEntity swVersion="r0.3" localDn="Dublin3"/>
+ <measEntity swVersion="r0.3" localDn="Dublin3"/>
<measInfo measInfoId="measInfoId3">
<job jobId="jobId"/>
<granPeriod endTime="2003-10-02T12:15:00Z" duration="PT300S"/>
@@ -44,6 +44,6 @@
</measInfo>
</measData>
<fileFooter>
- <MeasData endTime="2018-10-02T12:15:00+01:00"/>
+ <measData endTime="2018-10-02T12:15:00+01:00"/>
</fileFooter>
-</MeasDataFile>
+</measDataFile>
diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/PM202007171301+020024C202007171207+0200-1215+0200_45678.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/PM202007171301+020024C202007171207+0200-1215+0200_45678.xml
new file mode 100644
index 00000000..8d42d62c
--- /dev/null
+++ b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/PM202007171301+020024C202007171207+0200-1215+0200_45678.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="MeasDataCollection.xsl"?>
+<measDataFile xmlns="http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData http://www.3gpp.org/ftp/specs/archive/28_series/28.532#measData">
+ <fileHeader fileFormatVersion="28.532 V7.0" vendorName="Company NN" dnPrefix="DC=a1.companyNN.com,SubNetwork=1,IRPAgent=1">
+ <fileSender senderName="SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1"/>
+ <measData beginTime="2000-03-01T14:00:00+02:00"/>
+ </fileHeader>
+ <measData>
+ <measEntity localDn="SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1" userLabel="RNC Telecomville"/>
+ <measInfo>
+ <job jobId="1231"/>
+ <granPeriod duration="PT900S" endTime="2000-03-01T14:14:30+02:00"/>
+ <repPeriod duration="PT1800S"/>
+ <measType p="1">attTCHSeizures</measType>
+ <measType p="2">succTCHSeizures</measType>
+ <measType p="3">attImmediateAssignProcs</measType>
+ <measType p="4">succImmediateAssignProcs</measType>
+ <measValue measObjLdn="RncFunction=RF-1,UtranCell=Gbg-997">
+ <r p="1">234</r>
+ <r p="2">345</r>
+ <r p="3">567</r>
+ <r p="4">789</r>
+ </measValue>
+ <measValue measObjLdn="RncFunction=RF-1,UtranCell=Gbg-998">
+ <r p="1">890</r>
+ <r p="2">901</r>
+ <r p="3">123</r>
+ <r p="4">234</r>
+ </measValue>
+ <measValue measObjLdn="RncFunction=RF-1,UtranCell=Gbg-999">
+ <r p="1">456</r>
+ <r p="2">567</r>
+ <r p="3">678</r>
+ <r p="4">789</r>
+ <suspect>true</suspect>
+ </measValue>
+ </measInfo>
+ <measInfo measInfoId="ENodeBFunction">
+ <job jobId="1232"/>
+ <granPeriod duration="PT900S" endTime="2000-03-01T14:14:30+02:00"/>
+ <repPeriod duration="PT1800S"/>
+ <measType p="1">attTCHSeizures1</measType>
+ <measType p="2">succTCHSeizures2</measType>
+ <measType p="3">attImmediateAssignProcs3</measType>
+ <measType p="4">succImmediateAssignProcs4</measType>
+ <measValue measObjLdn="ManagedElement=RNC-Gbg-1,ENodeBFunction=1">
+ <r p="1">4</r>
+ <r p="2">86,87,2,6,77,96,75,33,24</r>
+ <r p="3">40</r>
+ <r p="4">90</r>
+ <suspect>false</suspect>
+ </measValue>
+ </measInfo>
+ <measInfo>
+ <job jobId="1233"/>
+ <granPeriod duration="PT900S" endTime="2000-03-01T14:14:30+02:00"/>
+ <repPeriod duration="PT1800S"/>
+ <measType p="1">attTCHSeizures5</measType>
+ <measType p="2">succTCHSeizures6</measType>
+ <measType p="3">attImmediateAssignProcs7</measType>
+ <measType p="4">succImmediateAssignProcs8</measType>
+ <measValue measObjLdn="RncFunction=RF-1,UtranCell=Gbg-997">
+ <r p="1">238</r>
+ <r p="2">344</r>
+ <r p="3">563</r>
+ <r p="4">787</r>
+ </measValue>
+ <measValue measObjLdn="RncFunction=RF-1,UtranCell=Gbg-998">
+ <r p="1">898</r>
+ <r p="2">905</r>
+ <r p="3">127</r>
+ <r p="4">238</r>
+ </measValue>
+ <measValue measObjLdn="RncFunction=RF-1,UtranCell=Gbg-999">
+ <r p="1">454</r>
+ <r p="2">569</r>
+ <r p="3">672</r>
+ <r p="4">785</r>
+ <suspect>true</suspect>
+ </measValue>
+ </measInfo>
+ </measData>
+ <fileFooter>
+ <measData endTime="2000-03-01T14:15:00+02:00"/>
+ </fileFooter>
+</measDataFile>
diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json
index 4c5c84f1..f75adb84 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json
+++ b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json
@@ -7,6 +7,6 @@
"timeZoneOffset": "UTC+05.00",
"location": "ftpes://192.168.0.101:22/ftp/rop/A20161224.1045-1100.bin.gz",
"compression": "gzip",
- "fileFormatType": "org.3GPP.28.550#measData",
+ "fileFormatType": "org.3GPP.28.532#measData",
"fileFormatVersion": "V9"
}
diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json b/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json
new file mode 100644
index 00000000..5cd7146e
--- /dev/null
+++ b/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json
@@ -0,0 +1,42 @@
+{
+ "pm-mapper-filter": {
+ "filters":[{
+ "pmDefVsn": "1.0",
+ "nfType": "gnb",
+ "vendor": "Ericsson",
+ "measTypes": ["att.*"]
+ }]
+ },
+ "key_store_path": "/opt/app/pm-mapper/etc/cert.jks.b64",
+ "key_store_pass_path": "/opt/app/pm-mapper/etc/jks.pass",
+ "trust_store_path": "/opt/app/pm-mapper/etc/trust.jks.b64",
+ "trust_store_pass_path": "/opt/app/pm-mapper/etc/trust.pass",
+ "dmaap_dr_delete_endpoint": "https://dmaap-dr-node:8443/delete",
+ "dmaap_dr_feed_name": "1",
+ "aaf_identity": "aaf_admin@people.osaaf.org",
+ "aaf_password": "demo123456!",
+ "enable_http": true,
+ "streams_publishes": {
+ "dmaap_publisher": {
+ "type": "message_router",
+ "dmaap_info": {
+ "topic_url": "http://message-router:3904/events/org.onap.dmaap.mr.VES_PM",
+ "client_role": "org.onap.dcae.pmPublisher",
+ "location": "csit-pmmapper",
+ "client_id": "1562763644939"
+ }
+ }
+ },
+ "streams_subscribes": {
+ "dmaap_subscriber": {
+ "type": "data_router",
+ "dmaap_info": {
+ "username": "username",
+ "password": "password",
+ "location": "csit-pmmapper",
+ "delivery_url": "http://dcae-pm-mapper:8081/delivery",
+ "subscriber_id": 1
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
index 96d33a86..4c9afb03 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -7,8 +7,7 @@ Library Process
Library String
Test Setup Create Session mapper_session ${PMMAPPER_BASE_URL}
-Test Teardown Delete All Sessions
-
+Test Teardown CleanSessionsAndLogs
*** Variables ***
${CLI_EXEC_CLI_CONFIG} { head -n 10 | tail -5;} < /tmp/pmmapper.log
@@ -23,14 +22,17 @@ ${VALID_METADATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pm
${NR_VALID_METADATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json
${DIFF_VENDOR_METADATA} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json
${NON_XML_FILE} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json
-${CLI_EXEC_CLI_PM_LOG} docker exec pmmapper /bin/sh -c "tail -15 /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log"
+${CLI_EXEC_CLI_PM_LOG} docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log"
+${CLI_EXEC_CLI_PM_LOG_CLEAR} docker exec pmmapper /bin/sh -c "echo -n "" > /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log"
${PUBLISH_NODE_URL} https://${DR_NODE_IP}:8443/publish/1
${TYPE-A_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml
${TYPE-C_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/C20190328.0000-0015.xml
${NR-TYPE-A_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/A20181004.0000-1000-0015-1000_5G.xml
${NR-TYPE-C_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.xml
+${NR-TYPE-PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/PM202007171301+020024C202007171207+0200-1215+0200_45678.xml
${CLI_EXEC_VENDOR_FILTER} curl 'http://${CONSUL_IP}:8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/^Con' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json
${CLI_EXEC_PM_FILTER} curl 'http://${CONSUL_IP}:8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/^Con' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json
+${CLI_EXEC_PM_FILTER_regex} curl 'http://${CONSUL_IP}:8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/^Con' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json
${CLI_MESSAGE_ROUTER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 > /tmp/mr.log
${CLI_MR_LOG} cat /tmp/mr.log
@@ -39,7 +41,7 @@ ${CLI_MR_LOG} cat /tmp/mr.log
Verify PM Mapper Receive Configuraton From Config Binding Service
[Tags] PM_MAPPER_01
[Documentation] Verify 3gpp pm mapper successfully receive config data from CBS
- CheckLog ${CLI_EXEC_CLI_CONFIG} Received pm-mapper configuration
+ CheckLog ${CLI_EXEC_CLI_CONFIG} Received pm-mapper configuration from ConfigBinding Service
Verify Health Check returns 200 when a REST GET request to healthcheck url
[Tags] PM_MAPPER_02
@@ -52,43 +54,43 @@ Verify 3GPP PM Mapper responds appropriately when no metadata is provided
[Tags] PM_MAPPER_03
[Documentation] Verify 3GPP PM Mapper responds 400 with the message "Missing Metadata." when no metadata is provided
[Timeout] 1 minute
- ${headers}= Create Dictionary X-ONAP-RequestID=1 Content-Type=application/xml
+ ${headers}= Create Dictionary X-ONAP-RequestID=3 Content-Type=application/xml
${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT}/filename data='${EMPTY}' headers=${headers}
VerifyResponse ${resp.status_code} 400
VerifyResponse ${resp.content} Missing Metadata.
- CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=1
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=3
Verify 3GPP PM Mapper responds appropriately when invalid metadata is provided
[Tags] PM_MAPPER_04
[Documentation] Verify 3GPP PM Mapper responds 400 with the message "Malformed Metadata." when invalid metadata is provided
[Timeout] 1 minute
- ${headers}= Create Dictionary X-ONAP-RequestID=2 X-DMAAP-DR-META='not metadata' Content-Type=application/xml
+ ${headers}= Create Dictionary X-ONAP-RequestID=4 X-DMAAP-DR-META='not metadata' Content-Type=application/xml
${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT}/filename data='${EMPTY}' headers=${headers}
VerifyResponse ${resp.status_code} 400
VerifyResponse ${resp.content} Malformed Metadata.
- CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=2
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=4
Verify that PM Mapper logs successful when a file that contains no measdata is provided
[Tags] PM_MAPPER_05
[Documentation] Verify that PM Mapper logs successful when a file that contains no measdata is provided
[Timeout] 1 minute
- SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3
+ SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5
CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty
- CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=3
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=5
Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided
[Tags] PM_MAPPER_06
[Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided
[Timeout] 1 minute
- SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4
+ SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=6
CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed
- CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=4
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=6
Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router
[Tags] PM_MAPPER_07
[Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router.
[Timeout] 1 minute
- SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5
+ SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=7
CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
Verify 3GPP PM Mapper maps Type-A file based on counter filtering and publish 3gpp perf VES evnets to message router
@@ -98,7 +100,7 @@ Verify 3GPP PM Mapper maps Type-A file based on counter filtering and publish 3g
${cli_cmd_output}= Run Process ${CLI_EXEC_PM_FILTER} shell=yes
${resp}= Get Request mapper_session ${RECONFIGURE_ENDPOINT}
Sleep 5s
- SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=6
+ SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=8
CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
Verify that PM Mapper correctly identifies a file that should not be mapped based on metadata filtering.
@@ -109,17 +111,17 @@ Verify that PM Mapper correctly identifies a file that should not be mapped base
Should Be Equal As Strings ${cli_cmd_output.rc} 0
${resp}= Get Request mapper_session ${RECONFIGURE_ENDPOINT}
Sleep 5s
- SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${DIFF_VENDOR_METADATA} X-ONAP-RequestID=7
+ SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${DIFF_VENDOR_METADATA} X-ONAP-RequestID=9
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=9
CheckLog ${CLI_EXEC_CLI_PM_LOG} Metadata does not match any filters
- CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=7
Verify that PM Mapper correctly identifies a non-xml file.
[Tags] PM_MAPPER_10
[Documentation] Verify that PM Mapper correctly identifies a non-xml file.
[Timeout] 1 minute
- SendToDatarouter ${NON_XML_FILE} ${VALID_METADATA_PATH} X-ONAP-RequestID=8
+ SendToDatarouter ${NON_XML_FILE} ${VALID_METADATA_PATH} X-ONAP-RequestID=10
CheckLog ${CLI_EXEC_CLI_PM_LOG} PM measurement file must have an extension of .xml
- CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=8
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=10
Verify that PM Mapper correctly maps an NR Type-A file based on counter filtering and publish 3gpp perf VES events to message router.
[Tags] PM_MAPPER_11
@@ -128,16 +130,40 @@ Verify that PM Mapper correctly maps an NR Type-A file based on counter filterin
${cli_cmd_output}= Run Process ${CLI_EXEC_PM_FILTER} shell=yes
${resp}= Get Request mapper_session ${RECONFIGURE_ENDPOINT}
Sleep 5s
- SendToDatarouter ${NR-TYPE-A_PM_DATA_FILE_PATH} ${NR_VALID_METADATA_PATH} X-ONAP-RequestID=11
+ SendToDatarouter ${NR-TYPE-A_PM_DATA_FILE_PATH} ${NR_VALID_METADATA_PATH} X-ONAP-RequestID=11
CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
Verify that PM Mapper correctly maps an NR Type-C file based on counter filtering and publish 3gpp perf VES events to message router.
[Tags] PM_MAPPER_12
[Documentation] Verify that PM Mapper maps an NR Type-C xml file and publish 3gpp perf VES evnets to message router.
[Timeout] 1 minute
- SendToDatarouter ${NR-TYPE-C_PM_DATA_FILE_PATH} ${NR_VALID_METADATA_PATH} X-ONAP-RequestID=12
+ SendToDatarouter ${NR-TYPE-C_PM_DATA_FILE_PATH} ${NR_VALID_METADATA_PATH} X-ONAP-RequestID=12
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+
+Verify 3GPP PM Mapper maps Type-A file based on counter filtering with regexp
+ [Tags] PM_MAPPER_13
+ [Documentation] Verify 3GPP PM Mapper maps Type-A file based on counter filtering with wildcards/regexp and publish 3gpp perf VES evnets to message router.
+ [Timeout] 1 minute
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_PM_FILTER_regex} shell=yes
+ ${resp}= Get Request mapper_session ${RECONFIGURE_ENDPOINT}
+ Sleep 5s
+ SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=13
CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+Verify that password receive from CBS are successfully encrypted
+ [Tags] PM_MAPPER_14
+ [Documentation] Verify that password receive from CBS are successfully encrypted.
+ CheckLog ${CLI_EXEC_CLI_CONFIG} "aaf_password": *****
+ CheckLog ${CLI_EXEC_CLI_CONFIG} "password": *****
+
+Verify that PM Mapper correctly maps an NR Type-PM file based on counter filtering and publish 3gpp perf VES events to message router.
+ [Tags] PM_MAPPER_15
+ [Documentation] Verify that PM Mapper maps an NR Type-PM xml file and publish 3gpp perf VES evnets to message router.
+ [Timeout] 1 minute
+ SendToDatarouter ${NR-TYPE-PM_DATA_FILE_PATH} ${NR_VALID_METADATA_PATH} X-ONAP-RequestID=15
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=15
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+
*** Keywords ***
SendToDatarouter
@@ -164,4 +190,11 @@ CheckLog
VerifyResponse
[Arguments] ${actual_response_value} ${expected_response_value}
- Should Be Equal As Strings ${actual_response_value} ${expected_response_value} \ No newline at end of file
+ Should Be Equal As Strings ${actual_response_value} ${expected_response_value}
+
+ClearLogs
+ Run Process ${CLI_EXEC_CLI_PM_LOG_CLEAR} shell=yes
+
+CleanSessionsAndLogs
+ Delete All Sessions
+ ClearLogs
diff --git a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py
index c58e67e2..640b33b0 100644
--- a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py
+++ b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py
@@ -18,7 +18,7 @@ class BbsLibrary(object):
alog = container.logs(stream=False, tail=1000)
try:
- alog = alog.decode()
+ alog = alog.decode('utf-8').strip()
except AttributeError:
pass
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json b/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
index 569e9383..b67c0cb1 100644
--- a/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
@@ -20,13 +20,15 @@
"fileBasedGP": 15,
"fileLocation": "/pm/pm.xml",
"nfFilter": {
- "swVersions": [
- "1.0.0",
- "1.0.1"
- ],
"nfNames": [
"^pnf.*",
"^vnf.*"
+ ],
+ "modelInvariantUUIDs": [
+ "7129e420-d396-4efb-af02-6b83499b12f8"
+ ],
+ "modelVersionIDs": [
+
]
},
"measurementGroups": [
@@ -77,12 +79,14 @@
"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": "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"
@@ -101,7 +105,7 @@
"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"
},
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
index 9c9dc6e5..b433892a 100644
--- a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
@@ -1,7 +1,10 @@
[
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -11,7 +14,7 @@
]
},
"body": [
- "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"orchestration-status\":\"Active\"}}"
+ "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"model-invariant-id\":\"7129e420-d396-4efb-af02-6b83499b12f8\",\"model-version-id\":\"e80a6ae3-cafd-4d24-850d-e14c084a5ca9\",\"orchestration-status\":\"Active\"}}"
]
},
"times": {
@@ -21,7 +24,10 @@
},
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -30,7 +36,7 @@
"application/json"
]
},
- "body": "{}"
+ "body": []
}
}
]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
index c0accc8c..3df66a61 100644
--- a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
@@ -1,7 +1,10 @@
[
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -11,7 +14,7 @@
]
},
"body": [
- "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"orchestration-status\":\"Active\"}}"
+ "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"model-invariant-id\":\"7129e420-d396-4efb-af02-6b83499b12f8\",\"model-version-id\":\"e80a6ae3-cafd-4d24-850d-e14c084a5ca9\",\"orchestration-status\":\"Active\"}}"
]
},
"times": {
@@ -21,7 +24,10 @@
},
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -30,7 +36,7 @@
"application/json"
]
},
- "body": "{}"
+ "body": []
}
}
]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
index cc14f3c9..cd75deb3 100644
--- a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
@@ -1,7 +1,10 @@
[
{
"httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+ "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -21,7 +24,10 @@
},
{
"httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+ "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -30,10 +36,7 @@
"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
index 79bfb44f..00000000
--- a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
+++ /dev/null
@@ -1,39 +0,0 @@
-[
- {
- "httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
- },
- "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/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
- },
- "httpResponse": {
- "statusCode": 200,
- "headers": {
- "content-type": [
- "application/json"
- ]
- },
- "body": {
- "type": "JSON",
- "json": {}
- }
- }
- }
-]
diff --git a/tests/dcaegen2-services-pmsh/testcases/pmsh.robot b/tests/dcaegen2-services-pmsh/testcases/pmsh.robot
index 08ab197c..2f0e5bf6 100644
--- a/tests/dcaegen2-services-pmsh/testcases/pmsh.robot
+++ b/tests/dcaegen2-services-pmsh/testcases/pmsh.robot
@@ -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
@@ -56,35 +55,33 @@ Verify PNF detected in AAI when administrative state unlocked
${resp}= Get Request pmsh_session ${SUBSCRIPTIONS_ENDPOINT}
Should Be Equal As Strings ${resp.json()[0]['subscription_status']} UNLOCKED
Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['nf_name']} pnf-existing
- Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['orchestration_status']} Active
Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['nf_sub_status']} PENDING_CREATE
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 7 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 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 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
Should Be Equal As Strings ${resp.json()[0]['network_functions'][1]['nf_sub_status']} PENDING_CREATE
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
@@ -105,7 +102,7 @@ SetAdministrativeStateToUnlocked
SimulateNewPNF
${data}= Get Data From File ${MR_EXPECTATION_AAI_PNF_CREATED}
- ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"}
+ ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event"}
Should Be True ${resp.status_code} == 200
${resp} = Put Request mr_sim_session /expectation data=${data}
Should Be True ${resp.status_code} == 201
@@ -113,14 +110,14 @@ SimulateNewPNF
SimulatePolicyResponse
[Arguments] ${expected_contents}
${data}= Get Data From File ${expected_contents}
- ${resp} = Put Request mr_sim_session /clear data={"path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"}
+ ${resp} = Put Request mr_sim_session /clear data={"path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input"}
Should Be True ${resp.status_code} == 200
${resp} = Put Request mr_sim_session /expectation data=${data}
Should Be True ${resp.status_code} == 201
SimulateDeletedPNF
${data}= Get Data From File ${MR_EXPECTATION_AAI_PNF_REMOVED}
- ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"}
+ ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event"}
Should Be True ${resp.status_code} == 200
${resp} = Put Request mr_sim_session /expectation data=${data}
Should Be True ${resp.status_code} == 201
diff --git a/tests/dcaegen2-services-son-handler/testcases/data/expected_payload_fm.json b/tests/dcaegen2-services-son-handler/testcases/data/expected_payload_fm.json
new file mode 100644
index 00000000..d542a7dd
--- /dev/null
+++ b/tests/dcaegen2-services-son-handler/testcases/data/expected_payload_fm.json
@@ -0,0 +1 @@
+{"Configurations":[{"data":{"FAPService":{"alias":"Chn0071","X0005b9Lte":{"phyCellIdInUse":5,"pnfName":"ncserver5"},"CellConfig":{"LTE":{"RAN":{"Common":{"CellIdentity":"Chn0071"}}}}}}}]}
diff --git a/tests/dcaegen2-services-son-handler/testcases/data/expected_payload_pm.json b/tests/dcaegen2-services-son-handler/testcases/data/expected_payload_pm.json
new file mode 100644
index 00000000..2a56f2cc
--- /dev/null
+++ b/tests/dcaegen2-services-son-handler/testcases/data/expected_payload_pm.json
@@ -0,0 +1 @@
+{"Configurations":[{"data":{"FAPService":{"alias":"Chn0002","CellConfig":{"LTE":{"RAN":{"Common":{"CellIdentity":"Chn0002"},"NeighborListInUse":{"LTECell":[{"PNFName":"ncserver1","PLMNID":"plmnid1","CID":"Chn0004","PhyCellID":0,"Blacklisted":"true"},{"PNFName":"ncserver1","CID":"Chn0001","PhyCellID":0,"Blacklisted":"true"}],"LTECellNumberOfEntries":"2"}}}}}}}]}
diff --git a/tests/dcaegen2-services-son-handler/testcases/data/fault_notification.json b/tests/dcaegen2-services-son-handler/testcases/data/fault_notification.json
new file mode 100644
index 00000000..e5a327ad
--- /dev/null
+++ b/tests/dcaegen2-services-son-handler/testcases/data/fault_notification.json
@@ -0,0 +1,35 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.0.1",
+ "vesEventListenerVersion": "7.0.1",
+ "domain": "fault",
+ "eventName": "Fault_RansimAgent-Wipro_RanPCIProblem",
+ "eventId": "fault000001",
+ "sequence": 1,
+ "priority": "High",
+ "reportingEntityId": "de305d54-75b4-431b-adb2-eb6b9e546014",
+ "reportingEntityName": "ncserver5",
+ "sourceId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
+ "sourceName": "Chn0071",
+ "startEpochMicrosec": 1451772223000000,
+ "lastEpochMicrosec": 1451772403000000,
+ "timeZoneOffset": "UTC-05:30",
+ "nfNamingCode": "RansimAgent",
+ "nfVendorName": "Wipro"
+ },
+ "faultFields": {
+ "faultFieldsVersion": "4.0",
+ "alarmCondition": "RanPciCollisionConfusionOccurred",
+ "eventSourceType": "other",
+ "specificProblem": "Collision",
+ "eventSeverity": "CRITICAL",
+ "vfStatus": "Active",
+ "alarmAdditionalInformation": {
+ "networkId": "ran-1",
+ "collisions": "1",
+ "confusions": "0"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2-services-son-handler/testcases/data/negative_ack_from_policy.json b/tests/dcaegen2-services-son-handler/testcases/data/negative_ack_from_policy.json
new file mode 100644
index 00000000..8988f1cd
--- /dev/null
+++ b/tests/dcaegen2-services-son-handler/testcases/data/negative_ack_from_policy.json
@@ -0,0 +1,10 @@
+{
+ "requestID": "d9a6d3de-c7b9-4dc7-bbb3-54953c62f7a9",
+ "closedLoopControlName": "ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459",
+ "version": "1.0.2",
+ "target": "DCAE",
+ "from": "SDNR",
+ "policyName": "PCI",
+ "policyVersion": "1.0.2",
+ "payload": " { \"Configurations\":[{ \"Status\": { \"Code\": 400, \"Value\": \"FAILURE\" }, \"data\":{\"FAPService\":{\"alias\":\"Chn0071\",\"X0005b9Lte\":{\"phyCellIdInUse\":5,\"pnfName\":\"ncserver5\"},\"CellConfig\":{\"LTE\":{\"RAN\":{\"Common\":{\"CellIdentity\":\"Chn0071\"}}}}}}} ]}"
+}
diff --git a/tests/dcaegen2-services-son-handler/testcases/data/performance_notification.json b/tests/dcaegen2-services-son-handler/testcases/data/performance_notification.json
new file mode 100644
index 00000000..7721163a
--- /dev/null
+++ b/tests/dcaegen2-services-son-handler/testcases/data/performance_notification.json
@@ -0,0 +1,42 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.0",
+ "domain": "measurement",
+ "eventName": "Measurement_RansimAgent-Wipro_HandoffMetric",
+ "eventId": "measurement000002",
+ "sequence": 0,
+ "priority": "Normal",
+ "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e544567",
+ "reportingEntityName": "ncserver1",
+ "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546456",
+ "sourceName": "Chn0002",
+ "startEpochMicrosec": 1551772223000000,
+ "lastEpochMicrosec": 1551790542000000,
+ "nfNamingCode": "RansimAgent",
+ "nfVendorName": "Wipro",
+ "vesEventListenerVersion": "7.0.1",
+ "timeZoneOffset": "UTC-05:30"
+ },
+ "measurementFields": {
+ "measurementInterval": 180,
+ "measurementFieldsVersion": "4.0",
+ "additionalMeasurements": [{
+ "hashMap": {
+ "networkId": "plmnid1",
+ "InterEnbOutAtt_X2HO": "300",
+ "InterEnbOutSucc_X2HO": "90"
+ },
+ "name": "Chn0004"
+ },
+ {
+ "hashMap": {
+ "InterEnbOutAtt_X2HO": "250",
+ "InterEnbOutSucc_X2HO": "70"
+ },
+ "name": "Chn0001"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2-services-son-handler/testcases/sonhandler-test.robot b/tests/dcaegen2-services-son-handler/testcases/sonhandler-test.robot
new file mode 100644
index 00000000..6e93ffb9
--- /dev/null
+++ b/tests/dcaegen2-services-son-handler/testcases/sonhandler-test.robot
@@ -0,0 +1,95 @@
+*** Settings ***
+Library Collections
+Library Process
+Library RequestsLibrary
+Library String
+Library OperatingSystem
+
+Suite Teardown Delete All Sessions
+
+*** Variables ***
+${SON_HANDLER_BASE_URL} http://${SONHMS_IP}:8080
+${HEALTHCHECK_ENDPOINT} /healthcheck
+${DMAAP_URL} http://${DMAAP_IP}:3904/events
+${unauthenticated.DCAE_CL_OUTPUT} /unauthenticated.DCAE_CL_OUTPUT/23/23
+${POST_DMAAP_EVENT_FOR_FM_NOTIF_URL} http://${DMAAP_IP}:3904/events/unauthenticated.SEC_FAULT_OUTPUT
+${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL} http://${DMAAP_IP}:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT
+${POST_DMAAP_EVENT_FOR_POLICY_RESPONSE} http://${DMAAP_IP}:3904/events/DCAE_CL_RSP
+
+*** Test Cases ***
+
+HealthCheck
+
+ Create Session sonhms ${SON_HANDLER_BASE_URL}
+ ${resp}= Get Request sonhms ${HEALTHCHECK_ENDPOINT}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+
+Post fm notification to dmaap
+ Create Session dmaap ${DMAAP_URL}
+ ${headers}= Create Dictionary Content-Type application/json
+ ${data}= Get File ${TEST_ROBOT_DIR}/data/fault_notification.json
+ ${response}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_FM_NOTIF_URL}', data=$data)
+ Should Be Equal As Strings ${response.status_code} 200
+
+
+Verify fm notification trigger in sonhms
+ Create Session dmaap ${DMAAP_URL}
+ FOR ${i} IN RANGE 10
+ ${result}= Get Request dmaap ${unauthenticated.DCAE_CL_OUTPUT}
+ Exit For Loop If ${result.json()} != @{EMPTY}
+ Log Waiting for sonhms to handle trigger... console=${True}
+ Sleep 30s
+ END
+ ${expected_payload}= Get File ${TEST_ROBOT_DIR}/data/expected_payload_fm.json
+ ${result}= Convert To String ${result.content}
+ ${result_string}= Get Substring ${result} 2 -2
+ ${actual_data}= Evaluate json.loads("""${result_string}""") json
+ ${actual_payload}= Set Variable ${actual_data['payload']}
+ Should Be True """${actual_payload}""".strip() == """${expected_payload}""".strip()
+
+
+Post pm notification to dmaap
+ ${data}= Get File ${TEST_ROBOT_DIR}/data/performance_notification.json
+ ${response}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data)
+ Should Be Equal As Strings ${response.status_code} 200
+
+
+Verify pm notification trigger in sonhms
+ Create Session dmaap ${DMAAP_URL}
+ FOR ${i} IN RANGE 5
+ ${result}= Get Request dmaap ${unauthenticated.DCAE_CL_OUTPUT}
+ Exit For Loop If ${result.json()} != @{EMPTY}
+ Log Waiting for sonhms to handle trigger... console=${True}
+ Sleep 30s
+ END
+ ${expected_payload}= Get File ${TEST_ROBOT_DIR}/data/expected_payload_pm.json
+ ${result}= Convert To String ${result.content}
+ ${result_string}= Get Substring ${result} 2 -2
+ ${actual_data}= Evaluate json.loads("""${result_string}""") json
+ ${actual_payload}= Set Variable ${actual_data['payload']}
+ Should Be True """${actual_payload}""".strip() == """${expected_payload}""".strip()
+
+
+Post policy negative acknowledgement to dmaap
+ ${data}= Get File ${TEST_ROBOT_DIR}/data/negative_ack_from_policy.json
+ FOR ${i} IN RANGE 3
+ ${response}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_POLICY_RESPONSE}', data=$data)
+ END
+ Should Be Equal As Strings ${response.status_code} 200
+
+
+Oof trigger for fixed Pci cells
+ Create Session dmaap ${DMAAP_URL}
+ FOR ${i} IN RANGE 15
+ ${result}= Get Request dmaap ${unauthenticated.DCAE_CL_OUTPUT}
+ Exit For Loop If ${result.json()} != @{EMPTY}
+ Log Waiting for sonhms to handle trigger... console=${True}
+ Sleep 30s
+ END
+ ${expected_payload}= Get File ${TEST_ROBOT_DIR}/data/expected_payload_fm.json
+ ${result}= Convert To String ${result.content}
+ ${result_string}= Get Substring ${result} 2 -2
+ ${actual_data}= Evaluate json.loads("""${result_string}""") json
+ ${actual_payload}= Set Variable ${actual_data['payload']}
+ Should Be True """${actual_payload}""".strip() == """${expected_payload}""".strip()
diff --git a/tests/dcaegen2/testcases/01__no_auth_tests.robot b/tests/dcaegen2/testcases/01__no_auth_tests.robot
new file mode 100644
index 00000000..1bb51cb8
--- /dev/null
+++ b/tests/dcaegen2/testcases/01__no_auth_tests.robot
@@ -0,0 +1,107 @@
+*** Settings ***
+Resource ./resources/dcae_keywords.robot
+*** Test Cases ***
+VES Collector HTTP Health Check
+ [Tags] DCAE-VESC-R1 DCAE-VESC-HC
+ [Documentation] Run healthcheck over HTTP
+ Run Healthcheck ${http_session}
+
+Publish Single VES VNF Measurement Event API V7
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+
+Publish Single VES VNF Measurement Event with Standard Defined Fields API V7
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data with Standard Defined Fields to /eventListener/v7 endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7_STND_DEF_FIELDS} 202 stndDefined-gNB-Nokia-PowerLost unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
+
+Publish Single VES VNF Measurement Event with wrong JSON
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with invalid data to /eventListener/v7 endpoint and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_INVALID_JSON_V7} 400
+
+Publish Single VES VNF Measurement Event with missing mandatory parameter
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with lack of one of the mandatory parameters "domain" to /eventListener/v7 endpoint and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_MISSING_MANDATORY_PARAMETER_V7} 400
+
+Publish Single VES VNF Measurement Event with empty json
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with empty json to /eventListener/v7 endpoint and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_EMPTY_JSON} 400
+
+Publish Single VES VNF Measurement Event with parameter out of schema
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with parameter which is not defined in schema and send to /eventListener/v7 endpoint. Expected 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_PARAMETER_OUT_OF_SCHEMA_V7} 400
+
+Publish Single VES VNF Measurement Event with No Auth over HTTPS
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event over HTTPS with authentication disabled and expect ConnectionError
+ @{err_content} Create List Errno 111
+ Send Request And Expect Error Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} ConnectionError:* @{err_content}
+
+Publish Single VES VoLTE Fault Event
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data to /eventListener/v5 endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+
+Publish Single VES VNF Measurement Event API V5
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single measurement event with valid data to /eventListener/v5 endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_MEASURE_FILE} 202 0b2b5790-3673-480a-a4bd-5a00b88e5af6
+
+Publish VES VoLTE Fault Batch Events
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data to /eventListener/v5/eventBatch endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_PATH} ${EVENT_BATCH_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546025
+
+Publish VES Batch Events with empty json
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post empty json to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_EMPTY_JSON} 400
+
+Publish VES Batch Events with missing mandatory parameter
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post event list where one of the events doesn't have mandatory domain param, to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_MISSING_MANDATORY_PARAM_V7} 400
+
+Publish VES Batch Events wih parameter out of schema
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post event list where one of the events have additional dummy param, to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_PARAM_OUT_OF_SCHEMA_V7} 400
+
+Publish VES Event With Invalid Method
+ [Tags] DCAE-VESC-R1
+ [Documentation] Use invalid Put instead of Post method to expect 405 Response Status Code
+ Log Send HTTP Request with invalid method Put instead of Post
+ Send Request And Validate Response Publish Event To VES Collector With Put Method ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_DATA_FILE} 405
+
+Publish VES Event With Invalid URL Path
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event to invalid url path and expect 404 Response Status Code
+ Log Send HTTP Request with invalid /listener/v5/ instead of /eventListener/v5 path
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} /listener/v5/ ${EVENT_DATA_FILE} 404
+
+Publish 'Other' Registration Event
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post an event aligned with “other” domain and expect HTTP 202 Accepeted Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_PNF_REGISTRATION} 202 QTFCOC540002E-reg
+
+Publish VES Event With Invalid Method V7
+ [Tags] DCAE-VESC-R1
+ [Documentation] Use invalid Put instead of Post method to expect 405 Response Status Code
+ Log Send HTTP Request with invalid method Put instead of Post
+ Send Request And Validate Response Publish Event To VES Collector With Put Method ${http_session} ${VES_EVENTLISTENER_V7} ${EVENT_DATA_FILE} 405
+
+Publish VES Event With Invalid URL Path V7
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event to invalid url path and expect 404 Response Status Code
+ Log Send HTTP Request with invalid /listener/v5/ instead of /eventListener/v5 path
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} /listener/v7/ ${EVENT_DATA_FILE} 404
+
+Publish PNF Registration Event
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post PNF Registration event and expect HTTP 202 Accepeted Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${EVENT_PNF_REGISTRATION_V7} 202 registration_38407540
diff --git a/tests/dcaegen2/testcases/dcae_ves.robot b/tests/dcaegen2/testcases/02__cert_basic_auth_tests.robot
index 4a4a079d..dcc94de3 100644
--- a/tests/dcaegen2/testcases/dcae_ves.robot
+++ b/tests/dcaegen2/testcases/02__cert_basic_auth_tests.robot
@@ -1,133 +1,15 @@
*** Settings ***
-Documentation Run healthchecks for DCAE VES
-... Testing /eventListener/v7 and /eventListener/v7/eventBatch endpoints for DCEA VES v7.
-... Testing /eventListener/v5 and /eventListener/v5/eventBatch for DCEA VES v5 with various event feeds from VoLTE, vFW and PNF
-Library RequestsLibrary
-Library OperatingSystem
-Library Collections
-Library DcaeLibrary
Resource ./resources/dcae_keywords.robot
-
-Test Teardown Cleanup VES Events
-Suite Setup Run keywords VES Collector Suite Setup DMaaP Generate Certs Create sessions Create header
-Suite Teardown Run keywords VES Collector Suite Shutdown DMaaP Remove Certs
-
*** Test Cases ***
-
-#No authentication tests
-
-VES Collector HTTP Health Check
- [Tags] DCAE-VESC-R1 DCAE-VESC-HC
- [Documentation] Run healthcheck over HTTP
- Run Healthcheck ${http_session}
-
-Publish Single VES VNF Measurement Event API V7
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 202 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
-
-Publish Single VES VNF Measurement Event with wrong JSON
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event with invalid data to /eventListener/v7 endpoint and expect 400 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_INVALID_JSON_V7} 400
-
-Publish Single VES VNF Measurement Event with missing mandatory parameter
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event with lack of one of the mandatory parameters "domain" to /eventListener/v7 endpoint and expect 400 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_MISSING_MANDATORY_PARAMETER_V7} 400
-
-Publish Single VES VNF Measurement Event with empty json
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event with empty json to /eventListener/v7 endpoint and expect 400 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_EMPTY_JSON} 400
-
-Publish Single VES VNF Measurement Event with parameter out of schema
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event with parameter which is not defined in schema and send to /eventListener/v7 endpoint. Expected 400 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_PARAMETER_OUT_OF_SCHEMA_V7} 400
-
-Publish Single VES VNF Measurement Event with No Auth over HTTPS
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event over HTTPS with authentication disabled and expect ConnectionError
- @{err_content} Create List Errno 111
- Send Request And Expect Error Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} ConnectionError:* @{err_content}
-
-Publish Single VES VoLTE Fault Event
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event with valid data to /eventListener/v5 endpoint and expect 202 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
-
-Publish Single VES VNF Measurement Event API V5
- [Tags] DCAE-VESC-R1
- [Documentation] Post single measurement event with valid data to /eventListener/v5 endpoint and expect 202 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_MEASURE_FILE} 202 0b2b5790-3673-480a-a4bd-5a00b88e5af6
-
-Publish VES VoLTE Fault Batch Events
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event with valid data to /eventListener/v5/eventBatch endpoint and expect 202 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_PATH} ${EVENT_BATCH_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546025
-
-Publish VES Batch Events with empty json
- [Tags] DCAE-VESC-R1
- [Documentation] Post empty json to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_EMPTY_JSON} 400
-
-Publish VES Batch Events with missing mandatory parameter
- [Tags] DCAE-VESC-R1
- [Documentation] Post event list where one of the events doesn't have mandatory domain param, to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_MISSING_MANDATORY_PARAM_V7} 400
-
-Publish VES Batch Events wih parameter out of schema
- [Tags] DCAE-VESC-R1
- [Documentation] Post event list where one of the events have additional dummy param, to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_BATCH_PARAM_OUT_OF_SCHEMA_V7} 400
-
-Publish VES Event With Invalid Method
- [Tags] DCAE-VESC-R1
- [Documentation] Use invalid Put instead of Post method to expect 405 Response Status Code
- Log Send HTTP Request with invalid method Put instead of Post
- Send Request And Validate Response Publish Event To VES Collector With Put Method ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_DATA_FILE} 405
-
-Publish VES Event With Invalid URL Path
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event to invalid url path and expect 404 Response Status Code
- Log Send HTTP Request with invalid /listener/v5/ instead of /eventListener/v5 path
- Send Request And Validate Response Publish Event To VES Collector ${http_session} /listener/v5/ ${EVENT_DATA_FILE} 404
-
-Publish 'Other' Registration Event
- [Tags] DCAE-VESC-R1
- [Documentation] Post an event aligned with “other” domain and expect HTTP 202 Accepeted Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_PNF_REGISTRATION} 202 QTFCOC540002E-reg
-
-Publish VES Event With Invalid Method V7
- [Tags] DCAE-VESC-R1
- [Documentation] Use invalid Put instead of Post method to expect 405 Response Status Code
- Log Send HTTP Request with invalid method Put instead of Post
- Send Request And Validate Response Publish Event To VES Collector With Put Method ${http_session} ${VES_EVENTLISTENER_V7} ${EVENT_DATA_FILE} 405
-
-Publish VES Event With Invalid URL Path V7
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event to invalid url path and expect 404 Response Status Code
- Log Send HTTP Request with invalid /listener/v5/ instead of /eventListener/v5 path
- Send Request And Validate Response Publish Event To VES Collector ${http_session} /listener/v7/ ${EVENT_DATA_FILE} 404
-
-Publish PNF Registration Event
- [Tags] DCAE-VESC-R1
- [Documentation] Post PNF Registration event and expect HTTP 202 Accepeted Response Status Code
- Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${EVENT_PNF_REGISTRATION_V7} 202 registration_38407540
-
-# Auth by certificate and basic auth username / password
-
Enable VESC HTTPS with certBasicAuth
[Tags] DCAE-VESC-R1 DCAE-VESC-HC
[Documentation] Enable VESC Https and Authentication and Run Health Check
- Enable VESC with certBasicAuth
+ Override Collector Properties ${VES_CERT_BASIC_AUTH_COLLECTOR_PROPERTIES}
Run Healthcheck ${https_basic_auth_session}
VES Collector HTTP Health Check with certBasicAuth
[Tags] DCAE-VESC-R1 DCAE-VESC-HC
[Documentation] Run healthcheck over HTTP with certBasicAuth
- Enable VESC with certBasicAuth
Run Healthcheck ${http_session}
Healthcheck with Outdated Cert
diff --git a/tests/dcaegen2/testcases/03__stndDefined_tests.robot b/tests/dcaegen2/testcases/03__stndDefined_tests.robot
new file mode 100644
index 00000000..ddd11fa8
--- /dev/null
+++ b/tests/dcaegen2/testcases/03__stndDefined_tests.robot
@@ -0,0 +1,87 @@
+*** Settings ***
+Resource ./resources/dcae_keywords.robot
+*** Test Cases ***
+
+###################################################
+# Section for tests with stndDefined validation ON
+###################################################
+Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7_STND_DEF_FIELDS} 202 stndDefined-gNB-Nokia-PowerLost
+
+Publish VES Event With Empty Stnd Domain Namespace Parameter
+ [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 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 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 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 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_STND_DEFINED_3GPP_PROVISIONING} 202 unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
+
+Publish Single VES Event With stndDefinedNamespace = 3GPP-Heartbeat
+ [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_STND_DEFINED_3GPP_HEARTBEAT} 202 unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT
+
+Publish Single VES Event With stndDefinedNamespace = 3GPP-PerformanceAssurance
+ [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_STND_DEFINED_3GPP_PERFORMANCE_ASSURANCE} 202 unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT
+
+Publish Single VES Event With stndDefinedNamespace = 3GPP-FaultSupervision
+ [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_STND_DEFINED_3GPP_FAULTSUPERVISION} 202 unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
+
+Publish Single VES Event With SchemaReference Field Not Set
+ [Tags] DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
+ [Documentation] Post single event with schemaReference not set and not perform stndDefined validation, but pass general validation stage
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_STND_DEFINED_INVALID_DATA_NO_SCHEMA_REF} 202 unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
+
+Publish Single VES Event With Incorrect Schema Reference
+ [Tags] DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
+ [Documentation] Post single event with incorrect schemaReference and return error
+ Send Request And Validate Response And Error Message Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_STND_DEFINED_INCORRECT_SCHEMA_REF} 400 Invalid input value for %1 %2: %3
+
+Publish Single VES Event With Empty StndDefined Data Field
+ [Tags] DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
+ [Documentation] Post single event with Empty stndDefined data field and return error
+ Send Request And Validate Response And Error Message Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_STND_DEFINED_EMPTY_DATA} 400 The following service error occurred: %1. Error code is %2
+
+Publish Single VES Event With Invalid Type Of Multiply StndDefined Data Fields
+ [Tags] DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
+ [Documentation] Post single event with invalid stndDefined data fields and return error
+ Send Request And Validate Response And Error Message Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_STND_DEFINED_INVALID_TYPE_DATA} 400 The following service error occurred: %1. Error code is %2
+
+
+#####################################################
+## Section for tests with stndDefined validation OFF
+#####################################################
+Disable VESC StndDefined Validation Checkflag
+ [Tags] DCAE-VESC-R1 DCAE-VESC-HC DCAE-VESC-STNDDEFINED
+ [Documentation] Disable VESC StndDefined Validation Checkflag and Run Health Check
+ Override Collector Properties ${VES_DISABLED_STNDDEFINED_COLLECTOR_PROPERTIES}
+ Run Healthcheck ${https_basic_auth_session}
+
+Publish Single VES Event With Incorrect StndDefined Data
+ [Tags] DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
+ [Documentation] Post single event with incorrect stndDefined data
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_STND_DEFINED_INVALID_TYPE_DATA} 202
+
diff --git a/tests/dcaegen2/testcases/__init__.robot b/tests/dcaegen2/testcases/__init__.robot
index e69de29b..9f34cd82 100644
--- a/tests/dcaegen2/testcases/__init__.robot
+++ b/tests/dcaegen2/testcases/__init__.robot
@@ -0,0 +1,9 @@
+*** Settings ***
+Documentation Run healthchecks for DCAE VES
+... Testing /eventListener/v7 and /eventListener/v7/eventBatch endpoints for DCEA VES v7.
+... Testing /eventListener/v5 and /eventListener/v5/eventBatch for DCEA VES v5 with various event feeds from VoLTE, vFW and PNF
+Resource ./resources/dcae_keywords.robot
+
+Test Teardown Cleanup VES Events
+Suite Setup Run keywords VES Collector Suite Setup DMaaP Generate Certs Create sessions Create header
+Suite Teardown Run keywords VES Collector Suite Shutdown DMaaP Remove Certs \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/CommonEventFormat_30.2_ONAP.json b/tests/dcaegen2/testcases/assets/json_events/CommonEventFormat_30.2_ONAP.json
new file mode 100644
index 00000000..6aee0d56
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/CommonEventFormat_30.2_ONAP.json
@@ -0,0 +1,3087 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "VES Event Listener Common Event Format",
+ "type": "object",
+ "properties": {
+ "event": {
+ "$ref": "#/definitions/event"
+ },
+ "eventList": {
+ "$ref": "#/definitions/eventList"
+ }
+ },
+ "definitions": {
+ "schemaHeaderBlock": {
+ "description": "schema date, version, author and associated API",
+ "type": "object",
+ "properties": {
+ "associatedApi": {
+ "description": "VES Event Listener",
+ "type": "string"
+ },
+ "lastUpdatedBy": {
+ "description": "tl2972",
+ "type": "string"
+ },
+ "schemaDate": {
+ "description": "June 2, 2020",
+ "type": "string"
+ },
+ "schemaVersion": {
+ "description": "30.2.0",
+ "type": "number"
+ }
+ }
+ },
+ "schemaLicenseAndCopyrightNotice": {
+ "description": "Copyright (c) 2020, AT&T Intellectual Property. All rights reserved",
+ "type": "object",
+ "properties": {
+ "apacheLicense2.0": {
+ "description": "Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at:",
+ "type": "string"
+ },
+ "licenseUrl": {
+ "description": "http://www.apache.org/licenses/LICENSE-2.0",
+ "type": "string"
+ },
+ "asIsClause": {
+ "description": "Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
+ "type": "string"
+ },
+ "permissionsAndLimitations": {
+ "description": "See the License for the specific language governing permissions and limitations under the License.",
+ "type": "string"
+ }
+ }
+ },
+ "arrayOfJsonObject": {
+ "description": "array of json objects described by name, schema and other meta-information",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/jsonObject"
+ }
+ },
+ "arrayOfNamedHashMap": {
+ "description": "array of named hashMaps",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/namedHashMap"
+ }
+ },
+ "codecsInUse": {
+ "description": "number of times an identified codec was used over the measurementInterval",
+ "type": "object",
+ "properties": {
+ "codecIdentifier": {
+ "type": "string"
+ },
+ "numberInUse": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "codecIdentifier",
+ "numberInUse"
+ ]
+ },
+ "commonEventHeader": {
+ "description": "fields common to all events",
+ "type": "object",
+ "properties": {
+ "domain": {
+ "description": "the eventing domain associated with the event",
+ "type": "string",
+ "enum": [
+ "fault",
+ "heartbeat",
+ "measurement",
+ "mobileFlow",
+ "notification",
+ "other",
+ "perf3gpp",
+ "pnfRegistration",
+ "sipSignaling",
+ "stateChange",
+ "stndDefined",
+ "syslog",
+ "thresholdCrossingAlert",
+ "voiceQuality"
+ ]
+ },
+ "eventId": {
+ "description": "event key that is unique to the event source",
+ "type": "string"
+ },
+ "eventName": {
+ "description": "unique event name",
+ "type": "string"
+ },
+ "eventType": {
+ "description": "for example - applicationNf, guestOS, hostOS, platform",
+ "type": "string"
+ },
+ "internalHeaderFields": {
+ "$ref": "#/definitions/internalHeaderFields"
+ },
+ "lastEpochMicrosec": {
+ "description": "the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds",
+ "type": "number"
+ },
+ "nfcNamingCode": {
+ "description": "3 character network function component type, aligned with vfc naming standards",
+ "type": "string"
+ },
+ "nfNamingCode": {
+ "description": "4 character network function type, aligned with nf naming standards",
+ "type": "string"
+ },
+ "nfVendorName": {
+ "description": "network function vendor name",
+ "type": "string"
+ },
+ "priority": {
+ "description": "processing priority",
+ "type": "string",
+ "enum": [
+ "High",
+ "Medium",
+ "Normal",
+ "Low"
+ ]
+ },
+ "reportingEntityId": {
+ "description": "UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the ATT enrichment process",
+ "type": "string"
+ },
+ "reportingEntityName": {
+ "description": "name of the entity reporting the event, for example, an EMS name; may be the same as sourceName",
+ "type": "string"
+ },
+ "sequence": {
+ "description": "ordering of events communicated by an event source instance or 0 if not needed",
+ "type": "integer"
+ },
+ "sourceId": {
+ "description": "UUID identifying the entity experiencing the event issue; must be populated by the ATT enrichment process",
+ "type": "string"
+ },
+ "sourceName": {
+ "description": "name of the entity experiencing the event issue",
+ "type": "string"
+ },
+ "startEpochMicrosec": {
+ "description": "the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds",
+ "type": "number"
+ },
+ "stndDefinedNamespace": {
+ "description": "Standards organization defined event namespace; expected usage includes event routing by the event listener",
+ "type": "string"
+ },
+ "timeZoneOffset": {
+ "description": "UTC offset for the local time zone of the device as UTC+/-hh.mm",
+ "type": "string"
+ },
+ "version": {
+ "description": "version of the event header",
+ "type": "string",
+ "enum": [
+ "4.0",
+ "4.0.1",
+ "4.1"
+ ]
+ },
+ "vesEventListenerVersion": {
+ "description": "version of the VES Event Listener API",
+ "type": "string",
+ "enum": [
+ "7.0",
+ "7.0.1",
+ "7.1",
+ "7.1.1",
+ "7.2"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "domain",
+ "eventId",
+ "eventName",
+ "lastEpochMicrosec",
+ "priority",
+ "reportingEntityName",
+ "sequence",
+ "sourceName",
+ "startEpochMicrosec",
+ "version",
+ "vesEventListenerVersion"
+ ]
+ },
+ "counter": {
+ "description": "performance counter",
+ "type": "object",
+ "properties": {
+ "criticality": {
+ "type": "string",
+ "enum": [
+ "CRIT",
+ "MAJ"
+ ]
+ },
+ "hashMap": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "thresholdCrossed": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "criticality",
+ "hashMap",
+ "thresholdCrossed"
+ ]
+ },
+ "cpuUsage": {
+ "description": "usage of an identified CPU",
+ "type": "object",
+ "properties": {
+ "cpuCapacityContention": {
+ "description": "the amount of time the CPU cannot run due to contention, in milliseconds over the measurementInterval",
+ "type": "number"
+ },
+ "cpuDemandAvg": {
+ "description": "the total CPU time that the NF/NFC/VM could use if there was no contention, in milliseconds over the measurementInterval",
+ "type": "number"
+ },
+ "cpuDemandMhz": {
+ "description": "CPU demand in megahertz",
+ "type": "number"
+ },
+ "cpuDemandPct": {
+ "description": "CPU demand as a percentage of the provisioned capacity",
+ "type": "number"
+ },
+ "cpuIdentifier": {
+ "description": "cpu identifer",
+ "type": "string"
+ },
+ "cpuIdle": {
+ "description": "percentage of CPU time spent in the idle task",
+ "type": "number"
+ },
+ "cpuLatencyAvg": {
+ "description": "percentage of time the VM is unable to run because it is contending for access to the physical CPUs",
+ "type": "number"
+ },
+ "cpuOverheadAvg": {
+ "description": "the overhead demand above available allocations and reservations, in milliseconds over the measurementInterval",
+ "type": "number"
+ },
+ "cpuSwapWaitTime": {
+ "description": "swap wait time. in milliseconds over the measurementInterval",
+ "type": "number"
+ },
+ "cpuUsageInterrupt": {
+ "description": "percentage of time spent servicing interrupts",
+ "type": "number"
+ },
+ "cpuUsageNice": {
+ "description": "percentage of time spent running user space processes that have been niced",
+ "type": "number"
+ },
+ "cpuUsageSoftIrq": {
+ "description": "percentage of time spent handling soft irq interrupts",
+ "type": "number"
+ },
+ "cpuUsageSteal": {
+ "description": "percentage of time spent in involuntary wait which is neither user, system or idle time and is effectively time that went missing",
+ "type": "number"
+ },
+ "cpuUsageSystem": {
+ "description": "percentage of time spent on system tasks running the kernel",
+ "type": "number"
+ },
+ "cpuUsageUser": {
+ "description": "percentage of time spent running un-niced user space processes",
+ "type": "number"
+ },
+ "cpuWait": {
+ "description": "percentage of CPU time spent waiting for I/O operations to complete",
+ "type": "number"
+ },
+ "percentUsage": {
+ "description": "aggregate cpu usage of the virtual machine on which the xNFC reporting the event is running",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "cpuIdentifier",
+ "percentUsage"
+ ]
+ },
+ "diskUsage": {
+ "description": "usage of an identified disk",
+ "type": "object",
+ "properties": {
+ "diskBusResets": {
+ "description": "number of bus resets over the measurementInterval",
+ "type": "number"
+ },
+ "diskCommandsAborted": {
+ "description": "number of disk commands aborted over the measurementInterval",
+ "type": "number"
+ },
+ "diskCommandsAvg": {
+ "description": "average number of commands per second over the measurementInterval",
+ "type": "number"
+ },
+ "diskFlushRequests": {
+ "description": "total flush requests of the disk cache over the measurementInterval",
+ "type": "number"
+ },
+ "diskFlushTime": {
+ "description": "milliseconds spent on disk cache flushing over the measurementInterval",
+ "type": "number"
+ },
+ "diskIdentifier": {
+ "description": "disk identifier",
+ "type": "string"
+ },
+ "diskIoTimeAvg": {
+ "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the average over the measurement interval",
+ "type": "number"
+ },
+ "diskIoTimeLast": {
+ "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the last value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskIoTimeMax": {
+ "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the maximum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskIoTimeMin": {
+ "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the minimum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedReadAvg": {
+ "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedReadLast": {
+ "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the last value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedReadMax": {
+ "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the maximum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedReadMin": {
+ "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the minimum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedWriteAvg": {
+ "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedWriteLast": {
+ "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the last value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedWriteMax": {
+ "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the maximum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedWriteMin": {
+ "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the minimum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsReadAvg": {
+ "description": "number of octets per second read from a disk or partition; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsReadLast": {
+ "description": "number of octets per second read from a disk or partition; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsReadMax": {
+ "description": "number of octets per second read from a disk or partition; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsReadMin": {
+ "description": "number of octets per second read from a disk or partition; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsWriteAvg": {
+ "description": "number of octets per second written to a disk or partition; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsWriteLast": {
+ "description": "number of octets per second written to a disk or partition; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsWriteMax": {
+ "description": "number of octets per second written to a disk or partition; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsWriteMin": {
+ "description": "number of octets per second written to a disk or partition; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsReadAvg": {
+ "description": "number of read operations per second issued to the disk; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsReadLast": {
+ "description": "number of read operations per second issued to the disk; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsReadMax": {
+ "description": "number of read operations per second issued to the disk; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsReadMin": {
+ "description": "number of read operations per second issued to the disk; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsWriteAvg": {
+ "description": "number of write operations per second issued to the disk; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsWriteLast": {
+ "description": "number of write operations per second issued to the disk; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsWriteMax": {
+ "description": "number of write operations per second issued to the disk; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsWriteMin": {
+ "description": "number of write operations per second issued to the disk; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskPendingOperationsAvg": {
+ "description": "queue size of pending I/O operations per second; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskPendingOperationsLast": {
+ "description": "queue size of pending I/O operations per second; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskPendingOperationsMax": {
+ "description": "queue size of pending I/O operations per second; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskPendingOperationsMin": {
+ "description": "queue size of pending I/O operations per second; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskReadCommandsAvg": {
+ "description": "average number of read commands issued per second to the disk over the measurementInterval",
+ "type": "number"
+ },
+ "diskTime": {
+ "description": "nanoseconds spent on disk cache reads/writes within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeReadAvg": {
+ "description": "milliseconds a read operation took to complete; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeReadLast": {
+ "description": "milliseconds a read operation took to complete; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeReadMax": {
+ "description": "milliseconds a read operation took to complete; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeReadMin": {
+ "description": "milliseconds a read operation took to complete; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeWriteAvg": {
+ "description": "milliseconds a write operation took to complete; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeWriteLast": {
+ "description": "milliseconds a write operation took to complete; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeWriteMax": {
+ "description": "milliseconds a write operation took to complete; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeWriteMin": {
+ "description": "milliseconds a write operation took to complete; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTotalReadLatencyAvg": {
+ "description": "average read time from the perspective of a Guest OS: sum of the Kernel Read Latency and Physical Device Read Latency in milliseconds over the measurement interval",
+ "type": "number"
+ },
+ "diskTotalWriteLatencyAvg": {
+ "description": "average write time from the perspective of a Guest OS: sum of the Kernel Write Latency and Physical Device Write Latency in milliseconds over the measurement interval",
+ "type": "number"
+ },
+ "diskWeightedIoTimeAvg": {
+ "description": "measure in ms over 1 sec of both I/O completion time and the backlog that may be accumulating; value is the average within the collection interval",
+ "type": "number"
+ },
+ "diskWeightedIoTimeLast": {
+ "description": "measure in ms over 1 sec of both I/O completion time and the backlog that may be accumulating; value is the last within the collection interval",
+ "type": "number"
+ },
+ "diskWeightedIoTimeMax": {
+ "description": "measure in ms over 1 sec of both I/O completion time and the backlog that may be accumulating; value is the maximum within the collection interval",
+ "type": "number"
+ },
+ "diskWeightedIoTimeMin": {
+ "description": "measure in ms over 1 sec of both I/O completion time and the backlog that may be accumulating; value is the minimum within the collection interval",
+ "type": "number"
+ },
+ "diskWriteCommandsAvg": {
+ "description": "average number of write commands issued per second to the disk over the measurementInterval",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "diskIdentifier"
+ ]
+ },
+ "endOfCallVqmSummaries": {
+ "description": "provides end of call voice quality metrics",
+ "type": "object",
+ "properties": {
+ "adjacencyName": {
+ "description": " adjacency name",
+ "type": "string"
+ },
+ "endpointAverageJitter": {
+ "description": "endpoint average jitter",
+ "type": "number"
+ },
+ "endpointDescription": {
+ "description": "either Caller or Callee",
+ "type": "string",
+ "enum": [
+ "Caller",
+ "Callee"
+ ]
+ },
+ "endpointMaxJitter": {
+ "description": "endpoint maximum jitter",
+ "type": "number"
+ },
+ "endpointRtpOctetsDiscarded": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpOctetsLost": {
+ "description": "endpoint RTP octets lost",
+ "type": "number"
+ },
+ "endpointRtpOctetsReceived": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpOctetsSent": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpPacketsDiscarded": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpPacketsLost": {
+ "description": "endpoint RTP packets lost",
+ "type": "number"
+ },
+ "endpointRtpPacketsReceived": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpPacketsSent": {
+ "description": "",
+ "type": "number"
+ },
+ "localAverageJitter": {
+ "description": "Local average jitter",
+ "type": "number"
+ },
+ "localAverageJitterBufferDelay": {
+ "description": "Local average jitter delay",
+ "type": "number"
+ },
+ "localMaxJitter": {
+ "description": "Local maximum jitter",
+ "type": "number"
+ },
+ "localMaxJitterBufferDelay": {
+ "description": "Local maximum jitter delay",
+ "type": "number"
+ },
+ "localRtpOctetsDiscarded": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpOctetsLost": {
+ "description": "Local RTP octets lost",
+ "type": "number"
+ },
+ "localRtpOctetsReceived": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpOctetsSent": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpPacketsDiscarded": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpPacketsLost": {
+ "description": "Local RTP packets lost",
+ "type": "number"
+ },
+ "localRtpPacketsReceived": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpPacketsSent": {
+ "description": "",
+ "type": "number"
+ },
+ "mosCqe": {
+ "description": "1-5 1dp",
+ "type": "number"
+ },
+ "oneWayDelay": {
+ "description": "one-way path delay in milliseconds",
+ "type": "number"
+ },
+ "packetLossPercent": {
+ "description": "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)",
+ "type": "number"
+ },
+ "rFactor": {
+ "description": "0-100",
+ "type": "number"
+ },
+ "roundTripDelay": {
+ "description": "millisecs",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "adjacencyName",
+ "endpointDescription"
+ ]
+ },
+ "event": {
+ "description": "the root level of the common event format",
+ "type": "object",
+ "properties": {
+ "commonEventHeader": {
+ "$ref": "#/definitions/commonEventHeader"
+ },
+ "faultFields": {
+ "$ref": "#/definitions/faultFields"
+ },
+ "heartbeatFields": {
+ "$ref": "#/definitions/heartbeatFields"
+ },
+ "measurementFields": {
+ "$ref": "#/definitions/measurementFields"
+ },
+ "mobileFlowFields": {
+ "$ref": "#/definitions/mobileFlowFields"
+ },
+ "notificationFields": {
+ "$ref": "#/definitions/notificationFields"
+ },
+ "otherFields": {
+ "$ref": "#/definitions/otherFields"
+ },
+ "perf3gppFields": {
+ "$ref": "#/definitions/perf3gppFields"
+ },
+ "pnfRegistrationFields": {
+ "$ref": "#/definitions/pnfRegistrationFields"
+ },
+ "sipSignalingFields": {
+ "$ref": "#/definitions/sipSignalingFields"
+ },
+ "stateChangeFields": {
+ "$ref": "#/definitions/stateChangeFields"
+ },
+ "stndDefinedFields": {
+ "$ref": "#/definitions/stndDefinedFields"
+ },
+ "syslogFields": {
+ "$ref": "#/definitions/syslogFields"
+ },
+ "thresholdCrossingAlertFields": {
+ "$ref": "#/definitions/thresholdCrossingAlertFields"
+ },
+ "voiceQualityFields": {
+ "$ref": "#/definitions/voiceQualityFields"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "commonEventHeader"
+ ]
+ },
+ "eventList": {
+ "description": "array of events",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/event"
+ }
+ },
+ "faultFields": {
+ "description": "fields specific to fault events",
+ "type": "object",
+ "properties": {
+ "alarmAdditionalInformation": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "alarmCondition": {
+ "description": "alarm condition reported by the device",
+ "type": "string"
+ },
+ "alarmInterfaceA": {
+ "description": "card, port, channel or interface name of the device generating the alarm",
+ "type": "string"
+ },
+ "eventCategory": {
+ "description": "Event category, for example: license, link, routing, security, signaling",
+ "type": "string"
+ },
+ "eventSeverity": {
+ "description": "event severity",
+ "type": "string",
+ "enum": [
+ "CRITICAL",
+ "MAJOR",
+ "MINOR",
+ "WARNING",
+ "NORMAL"
+ ]
+ },
+ "eventSourceType": {
+ "description": "type of event source; examples: card, host, other, port, portThreshold, router, slotThreshold, switch, virtualMachine, virtualNetworkFunction",
+ "type": "string"
+ },
+ "faultFieldsVersion": {
+ "description": "version of the faultFields block",
+ "type": "string",
+ "enum": [
+ "4.0"
+ ]
+ },
+ "specificProblem": {
+ "description": "short description of the alarm or problem",
+ "type": "string"
+ },
+ "vfStatus": {
+ "description": "virtual function status enumeration",
+ "type": "string",
+ "enum": [
+ "Active",
+ "Idle",
+ "Preparing to terminate",
+ "Ready to terminate",
+ "Requesting termination"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "alarmCondition",
+ "eventSeverity",
+ "eventSourceType",
+ "faultFieldsVersion",
+ "specificProblem",
+ "vfStatus"
+ ]
+ },
+ "filesystemUsage": {
+ "description": "disk usage of an identified virtual machine in gigabytes and/or gigabytes per second",
+ "type": "object",
+ "properties": {
+ "blockConfigured": {
+ "type": "number"
+ },
+ "blockIops": {
+ "type": "number"
+ },
+ "blockUsed": {
+ "type": "number"
+ },
+ "ephemeralConfigured": {
+ "type": "number"
+ },
+ "ephemeralIops": {
+ "type": "number"
+ },
+ "ephemeralUsed": {
+ "type": "number"
+ },
+ "filesystemName": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "blockConfigured",
+ "blockIops",
+ "blockUsed",
+ "ephemeralConfigured",
+ "ephemeralIops",
+ "ephemeralUsed",
+ "filesystemName"
+ ]
+ },
+ "gtpPerFlowMetrics": {
+ "description": "Mobility GTP Protocol per flow metrics",
+ "type": "object",
+ "properties": {
+ "avgBitErrorRate": {
+ "description": "average bit error rate",
+ "type": "number"
+ },
+ "avgPacketDelayVariation": {
+ "description": "Average packet delay variation or jitter in milliseconds for received packets: Average difference between the packet timestamp and time received for all pairs of consecutive packets",
+ "type": "number"
+ },
+ "avgPacketLatency": {
+ "description": "average delivery latency",
+ "type": "number"
+ },
+ "avgReceiveThroughput": {
+ "description": "average receive throughput",
+ "type": "number"
+ },
+ "avgTransmitThroughput": {
+ "description": "average transmit throughput",
+ "type": "number"
+ },
+ "durConnectionFailedStatus": {
+ "description": "duration of failed state in milliseconds, computed as the cumulative time between a failed echo request and the next following successful error request, over this reporting interval",
+ "type": "number"
+ },
+ "durTunnelFailedStatus": {
+ "description": "Duration of errored state, computed as the cumulative time between a tunnel error indicator and the next following non-errored indicator, over this reporting interval",
+ "type": "number"
+ },
+ "flowActivatedBy": {
+ "description": "Endpoint activating the flow",
+ "type": "string"
+ },
+ "flowActivationEpoch": {
+ "description": "Time the connection is activated in the flow (connection) being reported on, or transmission time of the first packet if activation time is not available",
+ "type": "number"
+ },
+ "flowActivationMicrosec": {
+ "description": "Integer microseconds for the start of the flow connection",
+ "type": "number"
+ },
+ "flowActivationTime": {
+ "description": "time the connection is activated in the flow being reported on, or transmission time of the first packet if activation time is not available; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800",
+ "type": "string"
+ },
+ "flowDeactivatedBy": {
+ "description": "Endpoint deactivating the flow",
+ "type": "string"
+ },
+ "flowDeactivationEpoch": {
+ "description": "Time for the start of the flow connection, in integer UTC epoch time aka UNIX time",
+ "type": "number"
+ },
+ "flowDeactivationMicrosec": {
+ "description": "Integer microseconds for the start of the flow connection",
+ "type": "number"
+ },
+ "flowDeactivationTime": {
+ "description": "Transmission time of the first packet in the flow connection being reported on; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800",
+ "type": "string"
+ },
+ "flowStatus": {
+ "description": "connection status at reporting time as a working / inactive / failed indicator value",
+ "type": "string"
+ },
+ "gtpConnectionStatus": {
+ "description": "Current connection state at reporting time",
+ "type": "string"
+ },
+ "gtpTunnelStatus": {
+ "description": "Current tunnel state at reporting time",
+ "type": "string"
+ },
+ "ipTosCountList": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "ipTosList": {
+ "description": "Array of unique IP Type-of-Service values observed in the flow where values range from '0' to '255'",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "largePacketRtt": {
+ "description": "large packet round trip time",
+ "type": "number"
+ },
+ "largePacketThreshold": {
+ "description": "large packet threshold being applied",
+ "type": "number"
+ },
+ "maxPacketDelayVariation": {
+ "description": "Maximum packet delay variation or jitter in milliseconds for received packets: Maximum of the difference between the packet timestamp and time received for all pairs of consecutive packets",
+ "type": "number"
+ },
+ "maxReceiveBitRate": {
+ "description": "maximum receive bit rate",
+ "type": "number"
+ },
+ "maxTransmitBitRate": {
+ "description": "maximum transmit bit rate",
+ "type": "number"
+ },
+ "mobileQciCosCountList": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "mobileQciCosList": {
+ "description": "Array of unique LTE QCI or UMTS class-of-service values observed in the flow",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "numActivationFailures": {
+ "description": "Number of failed activation requests, as observed by the reporting node",
+ "type": "number"
+ },
+ "numBitErrors": {
+ "description": "number of errored bits",
+ "type": "number"
+ },
+ "numBytesReceived": {
+ "description": "number of bytes received, including retransmissions",
+ "type": "number"
+ },
+ "numBytesTransmitted": {
+ "description": "number of bytes transmitted, including retransmissions",
+ "type": "number"
+ },
+ "numDroppedPackets": {
+ "description": "number of received packets dropped due to errors per virtual interface",
+ "type": "number"
+ },
+ "numGtpEchoFailures": {
+ "description": "Number of Echo request path failures where failed paths are defined in 3GPP TS 29.281 sec 7.2.1 and 3GPP TS 29.060 sec. 11.2",
+ "type": "number"
+ },
+ "numGtpTunnelErrors": {
+ "description": "Number of tunnel error indications where errors are defined in 3GPP TS 29.281 sec 7.3.1 and 3GPP TS 29.060 sec. 11.1",
+ "type": "number"
+ },
+ "numHttpErrors": {
+ "description": "Http error count",
+ "type": "number"
+ },
+ "numL7BytesReceived": {
+ "description": "number of tunneled layer 7 bytes received, including retransmissions",
+ "type": "number"
+ },
+ "numL7BytesTransmitted": {
+ "description": "number of tunneled layer 7 bytes transmitted, excluding retransmissions",
+ "type": "number"
+ },
+ "numLostPackets": {
+ "description": "number of lost packets",
+ "type": "number"
+ },
+ "numOutOfOrderPackets": {
+ "description": "number of out-of-order packets",
+ "type": "number"
+ },
+ "numPacketErrors": {
+ "description": "number of errored packets",
+ "type": "number"
+ },
+ "numPacketsReceivedExclRetrans": {
+ "description": "number of packets received, excluding retransmission",
+ "type": "number"
+ },
+ "numPacketsReceivedInclRetrans": {
+ "description": "number of packets received, including retransmission",
+ "type": "number"
+ },
+ "numPacketsTransmittedInclRetrans": {
+ "description": "number of packets transmitted, including retransmissions",
+ "type": "number"
+ },
+ "numRetries": {
+ "description": "number of packet retries",
+ "type": "number"
+ },
+ "numTimeouts": {
+ "description": "number of packet timeouts",
+ "type": "number"
+ },
+ "numTunneledL7BytesReceived": {
+ "description": "number of tunneled layer 7 bytes received, excluding retransmissions",
+ "type": "number"
+ },
+ "roundTripTime": {
+ "description": "round trip time",
+ "type": "number"
+ },
+ "tcpFlagCountList": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "tcpFlagList": {
+ "description": "Array of unique TCP Flags observed in the flow",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "timeToFirstByte": {
+ "description": "Time in milliseconds between the connection activation and first byte received",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "avgBitErrorRate",
+ "avgPacketDelayVariation",
+ "avgPacketLatency",
+ "avgReceiveThroughput",
+ "avgTransmitThroughput",
+ "flowActivationEpoch",
+ "flowActivationMicrosec",
+ "flowDeactivationEpoch",
+ "flowDeactivationMicrosec",
+ "flowDeactivationTime",
+ "flowStatus",
+ "maxPacketDelayVariation",
+ "numActivationFailures",
+ "numBitErrors",
+ "numBytesReceived",
+ "numBytesTransmitted",
+ "numDroppedPackets",
+ "numL7BytesReceived",
+ "numL7BytesTransmitted",
+ "numLostPackets",
+ "numOutOfOrderPackets",
+ "numPacketErrors",
+ "numPacketsReceivedExclRetrans",
+ "numPacketsReceivedInclRetrans",
+ "numPacketsTransmittedInclRetrans",
+ "numRetries",
+ "numTimeouts",
+ "numTunneledL7BytesReceived",
+ "roundTripTime",
+ "timeToFirstByte"
+ ]
+ },
+ "hashMap": {
+ "description": "an associative array which is an array of key:value pairs",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "default": {}
+ },
+ "heartbeatFields": {
+ "description": "optional field block for fields specific to heartbeat events",
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "heartbeatFieldsVersion": {
+ "description": "version of the heartbeatFields block",
+ "type": "string",
+ "enum": [
+ "3.0"
+ ]
+ },
+ "heartbeatInterval": {
+ "description": "current heartbeat interval in seconds",
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "heartbeatFieldsVersion",
+ "heartbeatInterval"
+ ]
+ },
+ "hugePages": {
+ "description": "metrics on system hugepages",
+ "type": "object",
+ "properties": {
+ "bytesFree": {
+ "description": "number of free hugepages in bytes",
+ "type": "number"
+ },
+ "bytesUsed": {
+ "description": "number of used hugepages in bytes",
+ "type": "number"
+ },
+ "hugePagesIdentifier": {
+ "description": "hugePages identifier",
+ "type": "string"
+ },
+ "percentFree": {
+ "description": "number of free hugepages in percent",
+ "type": "number"
+ },
+ "percentUsed": {
+ "description": "number of free hugepages in percent",
+ "type": "number"
+ },
+ "vmPageNumberFree": {
+ "description": "number of free vmPages in numbers",
+ "type": "number"
+ },
+ "vmPageNumberUsed": {
+ "description": "number of used vmPages in numbers",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "hugePagesIdentifier"
+ ]
+ },
+ "internalHeaderFields": {
+ "description": "enrichment fields for internal VES Event Listener service use only, not supplied by event sources",
+ "type": "object"
+ },
+ "ipmi": {
+ "description": "intelligent platform management interface metrics",
+ "type": "object",
+ "properties": {
+ "exitAirTemperature": {
+ "description": "system fan exit air flow temperature in celsius",
+ "type": "number"
+ },
+ "frontPanelTemperature": {
+ "description": "front panel temperature in celsius",
+ "type": "number"
+ },
+ "ioModuleTemperature": {
+ "description": "io module temperature in celsius",
+ "type": "number"
+ },
+ "ipmiBaseboardTemperatureArray": {
+ "description": "array of ipmiBaseboardTemperature objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiBaseboardTemperature"
+ }
+ },
+ "ipmiBaseboardVoltageRegulatorArray": {
+ "description": "array of ipmiBaseboardVoltageRegulator objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiBaseboardVoltageRegulator"
+ }
+ },
+ "ipmiBatteryArray": {
+ "description": "array of ipmiBattery objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiBattery"
+ }
+ },
+ "ipmiFanArray": {
+ "description": "array of ipmiFan objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiFan"
+ }
+ },
+ "ipmiHsbpArray": {
+ "description": "array of ipmiHsbp objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiHsbp"
+ }
+ },
+ "ipmiGlobalAggregateTemperatureMarginArray": {
+ "description": "array of ipmiGlobalAggregateTemperatureMargin objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiGlobalAggregateTemperatureMargin"
+ }
+ },
+ "ipmiNicArray": {
+ "description": "array of ipmiNic objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiNic"
+ }
+ },
+ "ipmiPowerSupplyArray": {
+ "description": "array of ipmiPowerSupply objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiPowerSupply"
+ }
+ },
+ "ipmiProcessorArray": {
+ "description": "array of ipmiProcessor objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ipmiProcessor"
+ }
+ },
+ "systemAirflow": {
+ "description": "airfflow in cubic feet per minute (cfm)",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ipmiBaseboardTemperature": {
+ "description": "intelligent platform management interface (ipmi) baseboard temperature metrics",
+ "type": "object",
+ "properties": {
+ "baseboardTemperatureIdentifier": {
+ "description": "identifier for the location where the temperature is taken",
+ "type": "string"
+ },
+ "baseboardTemperature": {
+ "description": "baseboard temperature in celsius",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "baseboardTemperatureIdentifier"
+ ]
+ },
+ "ipmiBaseboardVoltageRegulator": {
+ "description": "intelligent platform management interface (ipmi) baseboard voltage regulator metrics",
+ "type": "object",
+ "properties": {
+ "baseboardVoltageRegulatorIdentifier": {
+ "description": "identifier for the baseboard voltage regulator",
+ "type": "string"
+ },
+ "voltageRegulatorTemperature": {
+ "description": "voltage regulator temperature in celsius",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "baseboardVoltageRegulatorIdentifier"
+ ]
+ },
+ "ipmiBattery": {
+ "description": "intelligent platform management interface (ipmi) battery metrics",
+ "type": "object",
+ "properties": {
+ "batteryIdentifier": {
+ "description": "identifier for the battery",
+ "type": "string"
+ },
+ "batteryType": {
+ "description": "type of battery",
+ "type": "string"
+ },
+ "batteryVoltageLevel": {
+ "description": "battery voltage level",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "batteryIdentifier"
+ ]
+ },
+ "ipmiFan": {
+ "description": "intelligent platform management interface (ipmi) fan metrics",
+ "type": "object",
+ "properties": {
+ "fanIdentifier": {
+ "description": "identifier for the fan",
+ "type": "string"
+ },
+ "fanSpeed": {
+ "description": "fan speed in revolutions per minute (rpm)",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "fanIdentifier"
+ ]
+ },
+ "ipmiGlobalAggregateTemperatureMargin": {
+ "description": "intelligent platform management interface (ipmi) global aggregate temperature margin",
+ "type": "object",
+ "properties": {
+ "globalAggregateTemperatureMarginIdentifier": {
+ "description": "identifier for the ipmi global aggregate temperature margin metrics",
+ "type": "string"
+ },
+ "globalAggregateTemperatureMargin": {
+ "description": "the difference between the current global aggregate temperature, in celsius, and the global aggregate throttling thermal trip point",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "globalAggregateTemperatureMarginIdentifier",
+ "globalAggregateTemperatureMargin"
+ ]
+ },
+ "ipmiHsbp": {
+ "description": "intelligent platform management interface (ipmi) hot swap backplane power metrics",
+ "type": "object",
+ "properties": {
+ "hsbpIdentifier": {
+ "description": "identifier for the hot swap backplane power unit",
+ "type": "string"
+ },
+ "hsbpTemperature": {
+ "description": "hot swap backplane power temperature in celsius",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "hsbpIdentifier"
+ ]
+ },
+ "ipmiNic": {
+ "description": "intelligent platform management interface (ipmi) network interface control card (nic) metrics",
+ "type": "object",
+ "properties": {
+ "nicIdentifier": {
+ "description": "identifier for the network interface control card",
+ "type": "string"
+ },
+ "nicTemperature": {
+ "description": "nic temperature in celsius",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "nicIdentifier"
+ ]
+ },
+ "ipmiPowerSupply": {
+ "description": "intelligent platform management interface (ipmi) power supply metrics",
+ "type": "object",
+ "properties": {
+ "powerSupplyIdentifier": {
+ "description": "identifier for the power supply",
+ "type": "string"
+ },
+ "powerSupplyInputPower": {
+ "description": "input power in watts",
+ "type": "number"
+ },
+ "powerSupplyCurrentOutputPercent": {
+ "description": "current output voltage as a percentage of the design specified level",
+ "type": "number"
+ },
+ "powerSupplyTemperature": {
+ "description": "power supply temperature in celsius",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "powerSupplyIdentifier"
+ ]
+ },
+ "ipmiProcessor": {
+ "description": "intelligent platform management interface processor metrics",
+ "type": "object",
+ "properties": {
+ "processorIdentifier": {
+ "description": "identifier for an ipmi processor",
+ "type": "string"
+ },
+ "processorThermalControlPercent": {
+ "description": "io module temperature in celsius",
+ "type": "number"
+ },
+ "processorDtsThermalMargin": {
+ "description": "front panel temperature in celsius",
+ "type": "number"
+ },
+ "processorDimmAggregateThermalMarginArray": {
+ "description": "array of processorDimmAggregateThermalMargin objects",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/processorDimmAggregateThermalMargin"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "processorIdentifier"
+ ]
+ },
+ "jsonObject": {
+ "description": "json object schema, name and other meta-information along with one or more object instances",
+ "type": "object",
+ "properties": {
+ "objectInstances": {
+ "description": "one or more instances of the jsonObject",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/jsonObjectInstance"
+ }
+ },
+ "objectName": {
+ "description": "name of the JSON Object",
+ "type": "string"
+ },
+ "objectSchema": {
+ "description": "json schema for the object",
+ "type": "string"
+ },
+ "objectSchemaUrl": {
+ "description": "Url to the json schema for the object",
+ "type": "string"
+ },
+ "nfSubscribedObjectName": {
+ "description": "name of the object associated with the nfSubscriptonId",
+ "type": "string"
+ },
+ "nfSubscriptionId": {
+ "description": "identifies an openConfig telemetry subscription on a network function, which configures the network function to send complex object data associated with the jsonObject",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "objectInstances",
+ "objectName"
+ ]
+ },
+ "jsonObjectInstance": {
+ "description": "meta-information about an instance of a jsonObject along with the actual object instance",
+ "type": "object",
+ "properties": {
+ "jsonObject": {
+ "$ref": "#/definitions/jsonObject"
+ },
+ "objectInstance": {
+ "description": "an instance conforming to the jsonObject objectSchema",
+ "type": "object"
+ },
+ "objectInstanceEpochMicrosec": {
+ "description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds",
+ "type": "number"
+ },
+ "objectKeys": {
+ "description": "an ordered set of keys that identifies this particular instance of jsonObject",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/key"
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "key": {
+ "description": "tuple which provides the name of a key along with its value and relative order",
+ "type": "object",
+ "properties": {
+ "keyName": {
+ "description": "name of the key",
+ "type": "string"
+ },
+ "keyOrder": {
+ "description": "relative sequence or order of the key with respect to other keys",
+ "type": "integer"
+ },
+ "keyValue": {
+ "description": "value of the key",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "keyName"
+ ]
+ },
+ "latencyBucketMeasure": {
+ "description": "number of counts falling within a defined latency bucket",
+ "type": "object",
+ "properties": {
+ "countsInTheBucket": {
+ "type": "number"
+ },
+ "highEndOfLatencyBucket": {
+ "type": "number"
+ },
+ "lowEndOfLatencyBucket": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "countsInTheBucket"
+ ]
+ },
+ "load": {
+ "description": "/proc/loadavg cpu utilization and io utilization metrics",
+ "type": "object",
+ "properties": {
+ "longTerm": {
+ "description": "number of jobs in the run queue (state R, cpu utilization) or waiting for disk I/O (state D, io utilization) averaged over 15 minutes using /proc/loadavg",
+ "type": "number"
+ },
+ "midTerm": {
+ "description": "number of jobs in the run queue (state R, cpu utilization) or waiting for disk I/O (state D, io utilization) averaged over 5 minutes using /proc/loadavg",
+ "type": "number"
+ },
+ "shortTerm": {
+ "description": "number of jobs in the run queue (state R, cpu utilization) or waiting for disk I/O (state D, io utilization) averaged over 1 minute using /proc/loadavg",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ },
+ "machineCheckException": {
+ "description": "metrics on vm machine check exceptions",
+ "type": "object",
+ "properties": {
+ "correctedMemoryErrors": {
+ "description": "total hardware errors that were corrected by the hardware (e.g. data corruption corrected via ECC) over the measurementInterval",
+ "type": "number"
+ },
+ "correctedMemoryErrorsIn1Hr": {
+ "description": "total hardware errors that were corrected by the hardware over the last one hour",
+ "type": "number"
+ },
+ "uncorrectedMemoryErrors": {
+ "description": "total uncorrected hardware errors that were detected by the hardware (e.g., causing data corruption) over the measurementInterval",
+ "type": "number"
+ },
+ "uncorrectedMemoryErrorsIn1Hr": {
+ "description": "total uncorrected hardware errors that were detected by the hardware over the last one hour",
+ "type": "number"
+ },
+ "vmIdentifier": {
+ "description": "virtual machine identifier associated with the machine check exception",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "vmIdentifier"
+ ]
+ },
+ "measDataCollection": {
+ "description": "3GPP measurement collection structure aligned with 3GPP PM format",
+ "type": "object",
+ "properties": {
+ "formatVersion": {
+ "description": "3gpp PM reporting file format version from pre-standard TS 28.550 v2.0.0",
+ "type": "string"
+ },
+ "granularityPeriod": {
+ "description": "granularity period for the PM report in seconds",
+ "type": "number"
+ },
+ "measInfoList": {
+ "description": "array of measurements",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/measInfo"
+ }
+ },
+ "measObjInstIdList": {
+ "description": "array of monitored object local distinguished name ids per 3GPP TS 32.300",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "measuredEntityDn": {
+ "description": "distinguished name per 3GPP TS 28.550",
+ "type": "string"
+ },
+ "measuredEntitySoftwareVersion": {
+ "description": "software version for the NF providing the PM data as specified in 3GPP TS 28.550",
+ "type": "string"
+ },
+ "measuredEntityUserName": {
+ "description": "user definable name for the measured object per 3GPP TS 28.550",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "granularityPeriod",
+ "measInfoList",
+ "measuredEntityDn"
+ ]
+ },
+ "measInfo": {
+ "description": "measurement information.",
+ "type": "object",
+ "properties": {
+ "jobId": {
+ "description": "name of the measurement job",
+ "type": "string"
+ },
+ "measInfoId": {
+ "description": "measurement group identifier",
+ "oneOf": [
+ {
+ "$ref": "#/definitions/measInfoIdInteger"
+ },
+ {
+ "$ref": "#/definitions/measInfoIdString"
+ }
+ ]
+ },
+ "measTypes": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/measTypesInteger"
+ },
+ {
+ "$ref": "#/definitions/measTypesString"
+ }
+ ]
+ },
+ "measValuesList": {
+ "description": "an array of measurement values",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/measValues"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "measTypes",
+ "measValuesList"
+ ]
+ },
+ "measInfoIdInteger": {
+ "description": "integer measurement group identifier",
+ "type": "object",
+ "properties": {
+ "iMeasInfoId": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "iMeasInfoId"
+ ]
+ },
+ "measInfoIdString": {
+ "description": "string measurement group identifier",
+ "type": "object",
+ "properties": {
+ "sMeasInfoId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "sMeasInfoId"
+ ]
+ },
+ "measResultInteger": {
+ "description": "integer 3GPP PM measurement result",
+ "type": "object",
+ "properties": {
+ "p": {
+ "description": "integer reference to the counter",
+ "type": "integer"
+ },
+ "iValue": {
+ "description": "integer counter value",
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "p",
+ "iValue"
+ ]
+ },
+ "measResultNull": {
+ "description": "null 3GPP PM measurement result",
+ "type": "object",
+ "properties": {
+ "p": {
+ "description": "integer reference to the counter",
+ "type": "integer"
+ },
+ "isNull": {
+ "description": "true if the counter has no value",
+ "type": "string",
+ "enum": [
+ "true",
+ "false"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "p",
+ "isNull"
+ ]
+ },
+ "measResultNumber": {
+ "description": "number 3GPP PM measurement result",
+ "type": "object",
+ "properties": {
+ "p": {
+ "description": "integer reference to the counter",
+ "type": "integer"
+ },
+ "rValue": {
+ "description": "numeric counter value",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "p",
+ "rValue"
+ ]
+ },
+ "measResultString": {
+ "description": "string 3GPP PM measurement result",
+ "type": "object",
+ "properties": {
+ "p": {
+ "description": "integer reference to the counter",
+ "type": "integer"
+ },
+ "sValue": {
+ "description": "string counter value",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "p",
+ "sValue"
+ ]
+ },
+ "measTypesInteger": {
+ "description": "object containing an array of integer measurement identifiers associated with the measurement results",
+ "type": "object",
+ "properties": {
+ "iMeasTypesList": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "iMeasTypesList"
+ ]
+ },
+ "measTypesString": {
+ "description": "object containing an array of string measurement identifiers associated with the measurement results",
+ "type": "object",
+ "properties": {
+ "sMeasTypesList": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "sMeasTypesList"
+ ]
+ },
+ "measurementFields": {
+ "description": "measurement fields",
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "additionalMeasurements": {
+ "$ref": "#/definitions/arrayOfNamedHashMap"
+ },
+ "additionalObjects": {
+ "$ref": "#/definitions/arrayOfJsonObject"
+ },
+ "codecUsageArray": {
+ "description": "array of codecs in use",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/codecsInUse"
+ }
+ },
+ "concurrentSessions": {
+ "description": "peak concurrent sessions for the VM or xNF over the measurementInterval",
+ "type": "integer"
+ },
+ "configuredEntities": {
+ "description": "over the measurementInterval, peak total number of: users, subscribers, devices, adjacencies, etc., for the VM, or subscribers, devices, etc., for the xNF",
+ "type": "integer"
+ },
+ "cpuUsageArray": {
+ "description": "usage of an array of CPUs",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/cpuUsage"
+ }
+ },
+ "diskUsageArray": {
+ "description": "usage of an array of disks",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/diskUsage"
+ }
+ },
+ "featureUsageArray": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "filesystemUsageArray": {
+ "description": "filesystem usage of the VM on which the xNFC reporting the event is running",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/filesystemUsage"
+ }
+ },
+ "hugePagesArray": {
+ "description": "array of metrics on hugepPages",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/hugePages"
+ }
+ },
+ "ipmi": {
+ "$ref": "#/definitions/ipmi"
+ },
+ "latencyDistribution": {
+ "description": "array of integers representing counts of requests whose latency in milliseconds falls within per-xNF configured ranges",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/latencyBucketMeasure"
+ }
+ },
+ "loadArray": {
+ "description": "array of system load metrics",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/load"
+ }
+ },
+ "machineCheckExceptionArray": {
+ "description": "array of machine check exceptions",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/machineCheckException"
+ }
+ },
+ "meanRequestLatency": {
+ "description": "mean seconds required to respond to each request for the VM on which the xNFC reporting the event is running",
+ "type": "number"
+ },
+ "measurementInterval": {
+ "description": "interval over which measurements are being reported in seconds",
+ "type": "number"
+ },
+ "measurementFieldsVersion": {
+ "description": "version of the measurementFields block",
+ "type": "string",
+ "enum": [
+ "4.0"
+ ]
+ },
+ "memoryUsageArray": {
+ "description": "memory usage of an array of VMs",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/memoryUsage"
+ }
+ },
+ "numberOfMediaPortsInUse": {
+ "description": "number of media ports in use",
+ "type": "integer"
+ },
+ "requestRate": {
+ "description": "peak rate of service requests per second to the xNF over the measurementInterval",
+ "type": "number"
+ },
+ "nfcScalingMetric": {
+ "description": "represents busy-ness of the network function from 0 to 100 as reported by the xNFC",
+ "type": "integer"
+ },
+ "nicPerformanceArray": {
+ "description": "usage of an array of network interface cards",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/nicPerformance"
+ }
+ },
+ "processStatsArray": {
+ "description": "array of metrics on system processes",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/processStats"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "measurementInterval",
+ "measurementFieldsVersion"
+ ]
+ },
+ "measValues": {
+ "description": "3GPP measurement values",
+ "type": "object",
+ "properties": {
+ "measObjAddlFlds": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "measObjInstId": {
+ "description": "monitored object local distinguished name per 3GPP TS 32.300 and 3GPP TS 32.432",
+ "type": "string"
+ },
+ "measResults": {
+ "description": "array of results",
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/measResultInteger"
+ },
+ {
+ "$ref": "#/definitions/measResultNull"
+ },
+ {
+ "$ref": "#/definitions/measResultNumber"
+ },
+ {
+ "$ref": "#/definitions/measResultString"
+ }
+ ]
+ }
+ },
+ "suspectFlag": {
+ "description": "indicates if the values are suspect",
+ "type": "string",
+ "enum": [
+ "true",
+ "false"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "measObjInstId",
+ "measResults"
+ ]
+ },
+ "memoryUsage": {
+ "description": "memory usage of an identified virtual machine",
+ "type": "object",
+ "properties": {
+ "memoryBuffered": {
+ "description": "kibibytes of temporary storage for raw disk blocks",
+ "type": "number"
+ },
+ "memoryCached": {
+ "description": "kibibytes of memory used for cache",
+ "type": "number"
+ },
+ "memoryConfigured": {
+ "description": "kibibytes of memory configured in the virtual machine on which the xNFC reporting the event is running",
+ "type": "number"
+ },
+ "memoryDemand": {
+ "description": "host demand in kibibytes",
+ "type": "number"
+ },
+ "memoryFree": {
+ "description": "kibibytes of physical RAM left unused by the system",
+ "type": "number"
+ },
+ "memoryLatencyAvg": {
+ "description": "Percentage of time the VM is waiting to access swapped or compressed memory",
+ "type": "number"
+ },
+ "memorySharedAvg": {
+ "description": "shared memory in kilobytes",
+ "type": "number"
+ },
+ "memorySlabRecl": {
+ "description": "the part of the slab that can be reclaimed such as caches measured in kibibytes",
+ "type": "number"
+ },
+ "memorySlabUnrecl": {
+ "description": "the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes",
+ "type": "number"
+ },
+ "memorySwapInAvg": {
+ "description": "Amount of memory swapped-in from host cache in kibibytes",
+ "type": "number"
+ },
+ "memorySwapInRateAvg": {
+ "description": "rate at which memory is swapped from disk into active memory during the interval in kilobytes per second",
+ "type": "number"
+ },
+ "memorySwapOutAvg": {
+ "description": "Amount of memory swapped-out to host cache in kibibytes",
+ "type": "number"
+ },
+ "memorySwapOutRateAvg": {
+ "description": "rate at which memory is being swapped from active memory to disk during the current interval in kilobytes per second",
+ "type": "number"
+ },
+ "memorySwapUsedAvg": {
+ "description": "space used for caching swapped pages in the host cache in kibibytes",
+ "type": "number"
+ },
+ "memoryUsed": {
+ "description": "total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes",
+ "type": "number"
+ },
+ "percentMemoryUsage": {
+ "description": "Percentage of memory usage; value = (memoryUsed / (memoryUsed + memoryFree) x 100 if denomintor is nonzero, or 0, if otherwise",
+ "type": "number"
+ },
+ "vmIdentifier": {
+ "description": "virtual machine identifier associated with the memory metrics",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "memoryFree",
+ "memoryUsed",
+ "vmIdentifier"
+ ]
+ },
+ "mobileFlowFields": {
+ "description": "mobileFlow fields",
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "applicationType": {
+ "description": "Application type inferred",
+ "type": "string"
+ },
+ "appProtocolType": {
+ "description": "application protocol",
+ "type": "string"
+ },
+ "appProtocolVersion": {
+ "description": "application protocol version",
+ "type": "string"
+ },
+ "cid": {
+ "description": "cell id",
+ "type": "string"
+ },
+ "connectionType": {
+ "description": "Abbreviation referencing a 3GPP reference point e.g., S1-U, S11, etc",
+ "type": "string"
+ },
+ "ecgi": {
+ "description": "Evolved Cell Global Id",
+ "type": "string"
+ },
+ "flowDirection": {
+ "description": "Flow direction, indicating if the reporting node is the source of the flow or destination for the flow",
+ "type": "string"
+ },
+ "gtpPerFlowMetrics": {
+ "$ref": "#/definitions/gtpPerFlowMetrics"
+ },
+ "gtpProtocolType": {
+ "description": "GTP protocol",
+ "type": "string"
+ },
+ "gtpVersion": {
+ "description": "GTP protocol version",
+ "type": "string"
+ },
+ "httpHeader": {
+ "description": "HTTP request header, if the flow connects to a node referenced by HTTP",
+ "type": "string"
+ },
+ "imei": {
+ "description": "IMEI for the subscriber UE used in this flow, if the flow connects to a mobile device",
+ "type": "string"
+ },
+ "imsi": {
+ "description": "IMSI for the subscriber UE used in this flow, if the flow connects to a mobile device",
+ "type": "string"
+ },
+ "ipProtocolType": {
+ "description": "IP protocol type e.g., TCP, UDP, RTP...",
+ "type": "string"
+ },
+ "ipVersion": {
+ "description": "IP protocol version e.g., IPv4, IPv6",
+ "type": "string"
+ },
+ "lac": {
+ "description": "location area code",
+ "type": "string"
+ },
+ "mcc": {
+ "description": "mobile country code",
+ "type": "string"
+ },
+ "mnc": {
+ "description": "mobile network code",
+ "type": "string"
+ },
+ "mobileFlowFieldsVersion": {
+ "description": "version of the mobileFlowFields block",
+ "type": "string",
+ "enum": [
+ "4.0"
+ ]
+ },
+ "msisdn": {
+ "description": "MSISDN for the subscriber UE used in this flow, as an integer, if the flow connects to a mobile device",
+ "type": "string"
+ },
+ "otherEndpointIpAddress": {
+ "description": "IP address for the other endpoint, as used for the flow being reported on",
+ "type": "string"
+ },
+ "otherEndpointPort": {
+ "description": "IP Port for the reporting entity, as used for the flow being reported on",
+ "type": "integer"
+ },
+ "otherFunctionalRole": {
+ "description": "Functional role of the other endpoint for the flow being reported on e.g., MME, S-GW, P-GW, PCRF...",
+ "type": "string"
+ },
+ "rac": {
+ "description": "routing area code",
+ "type": "string"
+ },
+ "radioAccessTechnology": {
+ "description": "Radio Access Technology e.g., 2G, 3G, LTE",
+ "type": "string"
+ },
+ "reportingEndpointIpAddr": {
+ "description": "IP address for the reporting entity, as used for the flow being reported on",
+ "type": "string"
+ },
+ "reportingEndpointPort": {
+ "description": "IP port for the reporting entity, as used for the flow being reported on",
+ "type": "integer"
+ },
+ "sac": {
+ "description": "service area code",
+ "type": "string"
+ },
+ "samplingAlgorithm": {
+ "description": "Integer identifier for the sampling algorithm or rule being applied in calculating the flow metrics if metrics are calculated based on a sample of packets, or 0 if no sampling is applied",
+ "type": "integer"
+ },
+ "tac": {
+ "description": "transport area code",
+ "type": "string"
+ },
+ "tunnelId": {
+ "description": "tunnel identifier",
+ "type": "string"
+ },
+ "vlanId": {
+ "description": "VLAN identifier used by this flow",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "flowDirection",
+ "gtpPerFlowMetrics",
+ "ipProtocolType",
+ "ipVersion",
+ "mobileFlowFieldsVersion",
+ "otherEndpointIpAddress",
+ "otherEndpointPort",
+ "reportingEndpointIpAddr",
+ "reportingEndpointPort"
+ ]
+ },
+ "namedHashMap": {
+ "description": "a hashMap which is associated with and described by a name",
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "hashMap": {
+ "$ref": "#/definitions/hashMap"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "hashMap"
+ ]
+ },
+ "nicPerformance": {
+ "description": "describes the performance and errors of an identified network interface card",
+ "type": "object",
+ "properties": {
+ "administrativeState": {
+ "description": "administrative state",
+ "type": "string",
+ "enum": [
+ "inService",
+ "outOfService"
+ ]
+ },
+ "nicIdentifier": {
+ "description": "nic identification",
+ "type": "string"
+ },
+ "operationalState": {
+ "description": "operational state",
+ "type": "string",
+ "enum": [
+ "inService",
+ "outOfService"
+ ]
+ },
+ "receivedBroadcastPacketsAccumulated": {
+ "description": "Cumulative count of broadcast packets received as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "receivedBroadcastPacketsDelta": {
+ "description": "Count of broadcast packets received within the measurement interval",
+ "type": "number"
+ },
+ "receivedDiscardedPacketsAccumulated": {
+ "description": "Cumulative count of discarded packets received as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "receivedDiscardedPacketsDelta": {
+ "description": "Count of discarded packets received within the measurement interval",
+ "type": "number"
+ },
+ "receivedErrorPacketsAccumulated": {
+ "description": "Cumulative count of error packets received as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "receivedErrorPacketsDelta": {
+ "description": "Count of error packets received within the measurement interval",
+ "type": "number"
+ },
+ "receivedMulticastPacketsAccumulated": {
+ "description": "Cumulative count of multicast packets received as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "receivedMulticastPacketsDelta": {
+ "description": "Count of multicast packets received within the measurement interval",
+ "type": "number"
+ },
+ "receivedOctetsAccumulated": {
+ "description": "Cumulative count of octets received as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "receivedOctetsDelta": {
+ "description": "Count of octets received within the measurement interval",
+ "type": "number"
+ },
+ "receivedTotalPacketsAccumulated": {
+ "description": "Cumulative count of all packets received as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "receivedPercentDiscard": {
+ "description": "Percentage of discarded packets received; value = (receivedDiscardedPacketsDelta / receivedTotalPacketsDelta) x 100, if denominator is nonzero, or 0, if otherwise",
+ "type": "number"
+ },
+ "receivedPercentError": {
+ "description": "Percentage of error packets received; value = (receivedErrorPacketsDelta / receivedTotalPacketsDelta) x 100, if denominator is nonzero, or 0, if otherwise.",
+ "type": "number"
+ },
+ "receivedTotalPacketsDelta": {
+ "description": "Count of all packets received within the measurement interval",
+ "type": "number"
+ },
+ "receivedUnicastPacketsAccumulated": {
+ "description": "Cumulative count of unicast packets received as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "receivedUnicastPacketsDelta": {
+ "description": "Count of unicast packets received within the measurement interval",
+ "type": "number"
+ },
+ "receivedUtilization": {
+ "description": "Percentage of utilization received; value = (receivedOctetsDelta / (speed x (lastEpochMicrosec - startEpochMicrosec))) x 100, if denominator is nonzero, or 0, if otherwise",
+ "type": "number"
+ },
+ "speed": {
+ "description": "Speed configured in mbps",
+ "type": "number"
+ },
+ "transmittedBroadcastPacketsAccumulated": {
+ "description": "Cumulative count of broadcast packets transmitted as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "transmittedBroadcastPacketsDelta": {
+ "description": "Count of broadcast packets transmitted within the measurement interval",
+ "type": "number"
+ },
+ "transmittedDiscardedPacketsAccumulated": {
+ "description": "Cumulative count of discarded packets transmitted as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "transmittedDiscardedPacketsDelta": {
+ "description": "Count of discarded packets transmitted within the measurement interval",
+ "type": "number"
+ },
+ "transmittedErrorPacketsAccumulated": {
+ "description": "Cumulative count of error packets transmitted as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "transmittedErrorPacketsDelta": {
+ "description": "Count of error packets transmitted within the measurement interval",
+ "type": "number"
+ },
+ "transmittedMulticastPacketsAccumulated": {
+ "description": "Cumulative count of multicast packets transmitted as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "transmittedMulticastPacketsDelta": {
+ "description": "Count of multicast packets transmitted within the measurement interval",
+ "type": "number"
+ },
+ "transmittedOctetsAccumulated": {
+ "description": "Cumulative count of octets transmitted as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "transmittedOctetsDelta": {
+ "description": "Count of octets transmitted within the measurement interval",
+ "type": "number"
+ },
+ "transmittedTotalPacketsAccumulated": {
+ "description": "Cumulative count of all packets transmitted as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "transmittedTotalPacketsDelta": {
+ "description": "Count of all packets transmitted within the measurement interval",
+ "type": "number"
+ },
+ "transmittedUnicastPacketsAccumulated": {
+ "description": "Cumulative count of unicast packets transmitted as read at the end of the measurement interval",
+ "type": "number"
+ },
+ "transmittedUnicastPacketsDelta": {
+ "description": "Count of unicast packets transmitted within the measurement interval",
+ "type": "number"
+ },
+ "transmittedPercentDiscard": {
+ "description": "Percentage of discarded packets transmitted; value = (transmittedDiscardedPacketsDelta / transmittedTotalPacketsDelta) x 100, if denominator is nonzero, or 0, if otherwise",
+ "type": "number"
+ },
+ "transmittedPercentError": {
+ "description": "Percentage of error packets received; value = (transmittedErrorPacketsDelta / transmittedTotalPacketsDelta) x 100, if denominator is nonzero, or 0, if otherwise",
+ "type": "number"
+ },
+ "transmittedUtilization": {
+ "description": "Percentage of utilization transmitted; value = (transmittedOctetsDelta / (speed x (lastEpochMicrosec - startEpochMicrosec))) x 100, if denominator is nonzero, or 0, if otherwise.",
+ "type": "number"
+ },
+ "valuesAreSuspect": {
+ "description": "Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other condtions",
+ "type": "string",
+ "enum": [
+ "true",
+ "false"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "nicIdentifier",
+ "valuesAreSuspect"
+ ]
+ },
+ "notificationFields": {
+ "description": "notification fields",
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "arrayOfNamedHashMap": {
+ "$ref": "#/definitions/arrayOfNamedHashMap"
+ },
+ "changeContact": {
+ "description": "identifier for a contact related to the change",
+ "type": "string"
+ },
+ "changeIdentifier": {
+ "description": "system or session identifier associated with the change",
+ "type": "string"
+ },
+ "changeType": {
+ "description": "describes what has changed for the entity",
+ "type": "string"
+ },
+ "newState": {
+ "description": "new state of the entity",
+ "type": "string"
+ },
+ "oldState": {
+ "description": "previous state of the entity",
+ "type": "string"
+ },
+ "notificationFieldsVersion": {
+ "description": "version of the notificationFields block",
+ "type": "string",
+ "enum": [
+ "2.0"
+ ]
+ },
+ "stateInterface": {
+ "description": "card or port name of the entity that changed state",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "changeIdentifier",
+ "changeType",
+ "notificationFieldsVersion"
+ ]
+ },
+ "otherFields": {
+ "description": "fields for events belonging to the 'other' domain of the commonEventHeader domain enumeration",
+ "type": "object",
+ "properties": {
+ "arrayOfNamedHashMap": {
+ "$ref": "#/definitions/arrayOfNamedHashMap"
+ },
+ "hashMap": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "jsonObjects": {
+ "$ref": "#/definitions/arrayOfJsonObject"
+ },
+ "otherFieldsVersion": {
+ "description": "version of the otherFields block",
+ "type": "string",
+ "enum": [
+ "3.0"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "otherFieldsVersion"
+ ]
+ },
+ "perf3gppFields": {
+ "description": "fields for 3GPP PM format events, based on 3GPP TS 28.550, belonging to the 'perf3gpp' domain of the commonEventHeader domain enumeration",
+ "type": "object",
+ "properties": {
+ "eventAddlFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "measDataCollection": {
+ "$ref": "#/definitions/measDataCollection"
+ },
+ "perf3gppFieldsVersion": {
+ "description": "version of the perf3gppFields block",
+ "type": "string",
+ "enum": [
+ "1.0",
+ "1.0.1"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "measDataCollection",
+ "perf3gppFieldsVersion"
+ ]
+ },
+ "pnfRegistrationFields": {
+ "description": "hardware device registration fields",
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "lastServiceDate": {
+ "description": "TS 32.692 dateOfLastService = date of last service; e.g. 15022017",
+ "type": "string"
+ },
+ "macAddress": {
+ "description": "MAC address of OAM interface of the unit",
+ "type": "string"
+ },
+ "manufactureDate": {
+ "description": "TS 32.692 dateOfManufacture = manufacture date of the unit; 24032016",
+ "type": "string"
+ },
+ "modelNumber": {
+ "description": "TS 32.692 versionNumber = version of the unit from vendor; e.g. AJ02. Maps to AAI equip-model",
+ "type": "string"
+ },
+ "oamV4IpAddress": {
+ "description": "IPv4 m-plane IP address to be used by the manager to contact the PNF",
+ "type": "string"
+ },
+ "oamV6IpAddress": {
+ "description": "IPv6 m-plane IP address to be used by the manager to contact the PNF",
+ "type": "string"
+ },
+ "pnfRegistrationFieldsVersion": {
+ "description": "version of the pnfRegistrationFields block",
+ "type": "string",
+ "enum": [
+ "2.0"
+ ]
+ },
+ "serialNumber": {
+ "description": "TS 32.692 serialNumber = serial number of the unit; e.g. 6061ZW3",
+ "type": "string"
+ },
+ "softwareVersion": {
+ "description": "TS 32.692 swName = active SW running on the unit; e.g. 5gDUv18.05.201",
+ "type": "string"
+ },
+ "unitFamily": {
+ "description": "TS 32.692 vendorUnitFamilyType = general type of HW unit; e.g. BBU",
+ "type": "string"
+ },
+ "unitType": {
+ "description": "TS 32.692 vendorUnitTypeNumber = vendor name for the unit; e.g. Airscale",
+ "type": "string"
+ },
+ "vendorName": {
+ "description": "TS 32.692 vendorName = name of manufacturer; e.g. Nokia. Maps to AAI equip-vendor",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "pnfRegistrationFieldsVersion"
+ ]
+ },
+ "processorDimmAggregateThermalMargin": {
+ "description": "intelligent platform management interface (ipmi) processor dual inline memory module aggregate thermal margin metrics",
+ "type": "object",
+ "properties": {
+ "processorDimmAggregateThermalMarginIdentifier": {
+ "description": "identifier for the aggregate thermal margin metrics from the processor dual inline memory module",
+ "type": "string"
+ },
+ "thermalMargin": {
+ "description": "the difference between the DIMM's current temperature, in celsius, and the DIMM's throttling thermal trip point",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "processorDimmAggregateThermalMarginIdentifier",
+ "thermalMargin"
+ ]
+ },
+ "processStats": {
+ "description": "metrics on system processes",
+ "type": "object",
+ "properties": {
+ "forkRate": {
+ "description": "the number of threads created since the last reboot",
+ "type": "number"
+ },
+ "processIdentifier": {
+ "description": "processIdentifier",
+ "type": "string"
+ },
+ "psStateBlocked": {
+ "description": "the number of processes in a blocked state",
+ "type": "number"
+ },
+ "psStatePaging": {
+ "description": "the number of processes in a paging state",
+ "type": "number"
+ },
+ "psStateRunning": {
+ "description": "the number of processes in a running state",
+ "type": "number"
+ },
+ "psStateSleeping": {
+ "description": "the number of processes in a sleeping state",
+ "type": "number"
+ },
+ "psStateStopped": {
+ "description": "the number of processes in a stopped state",
+ "type": "number"
+ },
+ "psStateZombie": {
+ "description": "the number of processes in a zombie state",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "processIdentifier"
+ ]
+ },
+ "requestError": {
+ "description": "standard request error data structure",
+ "type": "object",
+ "properties": {
+ "messageId": {
+ "description": "Unique message identifier of the format ABCnnnn where ABC is either SVC for Service Exceptions or POL for Policy Exception",
+ "type": "string"
+ },
+ "text": {
+ "description": "Message text, with replacement variables marked with %n, where n is an index into the list of <variables> elements, starting at 1",
+ "type": "string"
+ },
+ "url": {
+ "description": "Hyperlink to a detailed error resource e.g., an HTML page for browser user agents",
+ "type": "string"
+ },
+ "variables": {
+ "description": "List of zero or more strings that represent the contents of the variables used by the message text",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "messageId",
+ "text"
+ ]
+ },
+ "sipSignalingFields": {
+ "description": "sip signaling fields",
+ "type": "object",
+ "properties": {
+ "additionalInformation": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "compressedSip": {
+ "description": "the full SIP request/response including headers and bodies",
+ "type": "string"
+ },
+ "correlator": {
+ "description": "this is the same for all events on this call",
+ "type": "string"
+ },
+ "localIpAddress": {
+ "description": "IP address on xNF",
+ "type": "string"
+ },
+ "localPort": {
+ "description": "port on xNF",
+ "type": "string"
+ },
+ "remoteIpAddress": {
+ "description": "IP address of peer endpoint",
+ "type": "string"
+ },
+ "remotePort": {
+ "description": "port of peer endpoint",
+ "type": "string"
+ },
+ "sipSignalingFieldsVersion": {
+ "description": "version of the sipSignalingFields block",
+ "type": "string",
+ "enum": [
+ "3.0"
+ ]
+ },
+ "summarySip": {
+ "description": "the SIP Method or Response ('INVITE', '200 OK', 'BYE', etc)",
+ "type": "string"
+ },
+ "vendorNfNameFields": {
+ "$ref": "#/definitions/vendorNfNameFields"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "correlator",
+ "localIpAddress",
+ "localPort",
+ "remoteIpAddress",
+ "remotePort",
+ "sipSignalingFieldsVersion",
+ "vendorNfNameFields"
+ ]
+ },
+ "stateChangeFields": {
+ "description": "stateChange fields",
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "newState": {
+ "description": "new state of the entity",
+ "type": "string",
+ "enum": [
+ "inService",
+ "maintenance",
+ "outOfService"
+ ]
+ },
+ "oldState": {
+ "description": "previous state of the entity",
+ "type": "string",
+ "enum": [
+ "inService",
+ "maintenance",
+ "outOfService"
+ ]
+ },
+ "stateChangeFieldsVersion": {
+ "description": "version of the stateChangeFields block",
+ "type": "string",
+ "enum": [
+ "4.0"
+ ]
+ },
+ "stateInterface": {
+ "description": "card or port name of the entity that changed state",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "newState",
+ "oldState",
+ "stateChangeFieldsVersion",
+ "stateInterface"
+ ]
+ },
+ "stndDefinedFields": {
+ "description": "stndDefined fields",
+ "type": "object",
+ "properties": {
+ "schemaReference": {
+ "description": "a uri of a standards-defined JSON object schema; used to valide the stndDefinedFields.data property contents",
+ "type": "string",
+ "format": "uri"
+ },
+ "data": {
+ "description": "a native standards-defined JSON notification",
+ "type": "object"
+ },
+ "stndDefinedFieldsVersion": {
+ "description": "version of stndDefinedFields block",
+ "type": "string",
+ "enum": [
+ "1.0"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "data",
+ "stndDefinedFieldsVersion"
+ ]
+ },
+ "syslogFields": {
+ "description": "sysLog fields",
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "eventSourceHost": {
+ "description": "hostname of the device",
+ "type": "string"
+ },
+ "eventSourceType": {
+ "description": "type of event source; examples: other, router, switch, host, card, port, slotThreshold, portThreshold, virtualMachine, virtualNetworkFunction",
+ "type": "string"
+ },
+ "syslogFacility": {
+ "description": "numeric code from 0 to 23 for facility--see table in documentation",
+ "type": "integer"
+ },
+ "syslogFieldsVersion": {
+ "description": "version of the syslogFields block",
+ "type": "string",
+ "enum": [
+ "4.0"
+ ]
+ },
+ "syslogMsg": {
+ "description": "syslog message",
+ "type": "string"
+ },
+ "syslogMsgHost": {
+ "description": "hostname parsed from non-VES syslog message",
+ "type": "string"
+ },
+ "syslogPri": {
+ "description": "0-192 combined severity and facility",
+ "type": "integer"
+ },
+ "syslogProc": {
+ "description": "identifies the application that originated the message",
+ "type": "string"
+ },
+ "syslogProcId": {
+ "description": "a change in the value of this field indicates a discontinuity in syslog reporting",
+ "type": "number"
+ },
+ "syslogSData": {
+ "description": "syslog structured data consisting of a structured data Id followed by a set of key value pairs",
+ "type": "string"
+ },
+ "syslogSdId": {
+ "description": "0-32 char in format name@number for example ourSDID@32473",
+ "type": "string"
+ },
+ "syslogSev": {
+ "description": "numerical Code for severity derived from syslogPri as remaider of syslogPri / 8",
+ "type": "string",
+ "enum": [
+ "Alert",
+ "Critical",
+ "Debug",
+ "Emergency",
+ "Error",
+ "Info",
+ "Notice",
+ "Warning"
+ ]
+ },
+ "syslogTag": {
+ "description": "msgId indicating the type of message such as TCPOUT or TCPIN; NILVALUE should be used when no other value can be provided",
+ "type": "string"
+ },
+ "syslogTs": {
+ "description": "timestamp parsed from non-VES syslog message",
+ "type": "string"
+ },
+ "syslogVer": {
+ "description": "IANA assigned version of the syslog protocol specification - typically 1",
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "eventSourceType",
+ "syslogFieldsVersion",
+ "syslogMsg",
+ "syslogTag"
+ ]
+ },
+ "thresholdCrossingAlertFields": {
+ "description": "fields specific to threshold crossing alert events",
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "additionalParameters": {
+ "description": "performance counters",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/counter"
+ }
+ },
+ "alertAction": {
+ "description": "Event action",
+ "type": "string",
+ "enum": [
+ "CLEAR",
+ "CONT",
+ "SET"
+ ]
+ },
+ "alertDescription": {
+ "description": "Unique short alert description such as IF-SHUB-ERRDROP",
+ "type": "string"
+ },
+ "alertType": {
+ "description": "Event type",
+ "type": "string",
+ "enum": [
+ "CARD-ANOMALY",
+ "ELEMENT-ANOMALY",
+ "INTERFACE-ANOMALY",
+ "SERVICE-ANOMALY"
+ ]
+ },
+ "alertValue": {
+ "description": "Calculated API value (if applicable)",
+ "type": "string"
+ },
+ "associatedAlertIdList": {
+ "description": "List of eventIds associated with the event being reported",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "collectionTimestamp": {
+ "description": "Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800",
+ "type": "string"
+ },
+ "dataCollector": {
+ "description": "Specific performance collector instance used",
+ "type": "string"
+ },
+ "elementType": {
+ "description": "type of network element - internal ATT field",
+ "type": "string"
+ },
+ "eventSeverity": {
+ "description": "event severity or priority",
+ "type": "string",
+ "enum": [
+ "CRITICAL",
+ "MAJOR",
+ "MINOR",
+ "WARNING",
+ "NORMAL"
+ ]
+ },
+ "eventStartTimestamp": {
+ "description": "Time closest to when the measurement was made; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800",
+ "type": "string"
+ },
+ "interfaceName": {
+ "description": "Physical or logical port or card (if applicable)",
+ "type": "string"
+ },
+ "networkService": {
+ "description": "network name - internal ATT field",
+ "type": "string"
+ },
+ "possibleRootCause": {
+ "description": "Reserved for future use",
+ "type": "string"
+ },
+ "thresholdCrossingFieldsVersion": {
+ "description": "version of the thresholdCrossingAlertFields block",
+ "type": "string",
+ "enum": [
+ "4.0"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "additionalParameters",
+ "alertAction",
+ "alertDescription",
+ "alertType",
+ "collectionTimestamp",
+ "eventSeverity",
+ "eventStartTimestamp",
+ "thresholdCrossingFieldsVersion"
+ ]
+ },
+ "vendorNfNameFields": {
+ "description": "provides vendor, nf and nfModule identifying information",
+ "type": "object",
+ "properties": {
+ "vendorName": {
+ "description": "network function vendor name",
+ "type": "string"
+ },
+ "nfModuleName": {
+ "description": "name of the nfModule generating the event",
+ "type": "string"
+ },
+ "nfName": {
+ "description": "name of the network function generating the event",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "vendorName"
+ ]
+ },
+ "voiceQualityFields": {
+ "description": "provides statistics related to customer facing voice products",
+ "type": "object",
+ "properties": {
+ "additionalInformation": {
+ "$ref": "#/definitions/hashMap"
+ },
+ "calleeSideCodec": {
+ "description": "callee codec for the call",
+ "type": "string"
+ },
+ "callerSideCodec": {
+ "description": "caller codec for the call",
+ "type": "string"
+ },
+ "correlator": {
+ "description": "this is the same for all events on this call",
+ "type": "string"
+ },
+ "endOfCallVqmSummaries": {
+ "$ref": "#/definitions/endOfCallVqmSummaries"
+ },
+ "phoneNumber": {
+ "description": "phone number associated with the correlator",
+ "type": "string"
+ },
+ "midCallRtcp": {
+ "description": "Base64 encoding of the binary RTCP data excluding Eth/IP/UDP headers",
+ "type": "string"
+ },
+ "vendorNfNameFields": {
+ "$ref": "#/definitions/vendorNfNameFields"
+ },
+ "voiceQualityFieldsVersion": {
+ "description": "version of the voiceQualityFields block",
+ "type": "string",
+ "enum": [
+ "4.0"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "calleeSideCodec",
+ "callerSideCodec",
+ "correlator",
+ "midCallRtcp",
+ "vendorNfNameFields",
+ "voiceQualityFieldsVersion"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json b/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json
new file mode 100644
index 00000000..b999ea3b
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "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"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-FaultSupervision.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-FaultSupervision.json
new file mode 100644
index 00000000..78d682bb
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-FaultSupervision.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "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"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Heartbeat.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Heartbeat.json
new file mode 100644
index 00000000..e1ca3117
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Heartbeat.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-Heartbeat",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "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"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-PerformanceAssurance.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-PerformanceAssurance.json
new file mode 100644
index 00000000..cbcd2eee
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-PerformanceAssurance.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-PerformanceAssurance",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "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"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning.json
new file mode 100644
index 00000000..1f12dc0a
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-Provisioning",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "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"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning_missing_sourceName.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning_missing_sourceName.json
new file mode 100644
index 00000000..2ffe17c7
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_3GPP-Provisioning_missing_sourceName.json
@@ -0,0 +1,44 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-Provisioning",
+ "lastEpochMicrosec": 1234567890,
+ "priority": "Normal",
+ "reportingEntityName": "Nokia123456",
+ "sequence": 0,
+ "startEpochMicrosec": 1234567890,
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://www.3gpp.org/Rel-16/TS28532_generic_fault_supervision.json#definitions/schemas/notifyNewAlarm-NotifType",
+ "data": {
+ "uri": "xyz",
+ "notificationId": "xyz",
+ "notificationType": "notifyNewAlarm",
+ "eventTime": "xyz",
+ "systemDN": "xyz",
+ "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"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_data_fields.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_data_fields.json
new file mode 100644
index 00000000..14595a7a
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_data_fields.json
@@ -0,0 +1,23 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {},
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_namespace.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_namespace.json
new file mode 100644
index 00000000..0964e5a2
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_namespace.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "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"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_incorrect_schema_ref.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_incorrect_schema_ref.json
new file mode 100644
index 00000000..3359ea61
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_incorrect_schema_ref.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/invalid-ref.json",
+ "data": {
+ "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"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_data_fields_no_schema_ref.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_data_fields_no_schema_ref.json
new file mode 100644
index 00000000..33342c6c
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_data_fields_no_schema_ref.json
@@ -0,0 +1,22 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "data": {},
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_type_data_field.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_type_data_field.json
new file mode 100644
index 00000000..ad659640
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_type_data_field.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "href": 1,
+ "uri": "1",
+ "notificationId": 1,
+ "notificationType": "notifyNewAlarm",
+ "eventTime": "xyz",
+ "systemDN": 123,
+ "probableCause": 1,
+ "perceivedSeverity": "INDETERMINATE",
+ "rootCauseIndicator": "false",
+ "specificProblem": "xyz",
+ "correlatedNotifications": 123,
+ "backedUpStatus": "true",
+ "backUpObject": 123,
+ "trendIndication": "MORE_SEVERE",
+ "thresholdInfo": {
+ "observedMeasurement": "new",
+ "observedValue": "123"
+ },
+ "stateChangeDefinition": {
+ },
+ "monitoredAttributes": {
+ "newAtt": "new"
+ },
+ "proposedRepairActions": "xyz",
+ "additionalText": "xyz",
+ "additionalInformation": {
+ "addInfo": "new"
+ },
+ "alarmId": 1,
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_missing_namespace.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_missing_namespace.json
new file mode 100644
index 00000000..54861598
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_missing_namespace.json
@@ -0,0 +1,53 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "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"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_no_value.json b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_no_value.json
new file mode 100644
index 00000000..1a317574
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_no_value.json
@@ -0,0 +1,54 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/invalid-ref.json",
+ "data": {
+ "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"
+ },
+ "alarmId": ,
+ "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
index 500afd5d..00000000
--- a/tests/dcaegen2/testcases/resources/DMaaP.py
+++ /dev/null
@@ -1,413 +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:
- 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:]
-
- if not enque_event(post_body):
- 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 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
index 6b96826c..00000000
--- a/tests/dcaegen2/testcases/resources/DcaeLibrary.py
+++ /dev/null
@@ -1,172 +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(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)
diff --git a/tests/dcaegen2/testcases/resources/collector.properties b/tests/dcaegen2/testcases/resources/collector_basic_auth.properties
index c555e485..cd417635 100755
--- a/tests/dcaegen2/testcases/resources/collector.properties
+++ b/tests/dcaegen2/testcases/resources/collector_basic_auth.properties
@@ -25,8 +25,6 @@ collector.service.secure.port=8443
# auth.method flags:
#
# noAuth - default option - no security (http)
-# certOnly - auth by certificate (https)
-# basicAuth - auth by basic auth username and password (https)
# certBasicAuth - auth by certificate and basic auth username / password (https)
auth.method=certBasicAuth
@@ -50,16 +48,26 @@ collector.truststore.passwordfile=etc/trustpasswordfile
## default no validation checkflag (-1)
## If enabled (1) - schemafile location must be specified
collector.schema.checkflag=1
-collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.0.1.json\"}
+collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.2_ONAP.json\"}
+
+## Schema StndDefinedFields Validation checkflag
+## 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.checkflag=1
+collector.externalSchema.schemasLocation=./etc/externalRepo/
+collector.externalSchema.mappingFileLocation=./etc/externalRepo/schema-map.json
+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
+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
collector.dmaapfile=./etc/DmaapConfig.json
## Event transformation Flag - when set expects configurable transformation
## defined under ./etc/eventTransform.json
## Enabled by default; to disable set to 0
-event.transform.flag=0
+event.transform.flag=1
# Describes at what frequency (measured in minutes) should application try to fetch config from CBS
collector.dynamic.config.update.frequency=5
diff --git a/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties b/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties
new file mode 100644
index 00000000..9712dff5
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties
@@ -0,0 +1,73 @@
+###############################################################################
+##
+## Collector Server config
+##
+## - Default values are shown as commented settings.
+##
+###############################################################################
+##
+## HTTP(S) service
+##
+## Normally:
+##
+## - 8080 is http service
+## - https is disabled by default
+##
+## - At this time, the server always binds to 0.0.0.0
+##
+##
+collector.service.port=8080
+
+## Authentication is only supported via secure port
+## When enabled - require valid keystore defined
+collector.service.secure.port=8443
+
+# auth.method flags:
+#
+# noAuth - default option - no security (http)
+# certBasicAuth - auth by certificate and basic auth username / password (https)
+auth.method=certBasicAuth
+
+## Combination of userid,hashPassword encoded pwd list to be supported
+## userid and pwd comma separated; pipe delimitation between each pair
+## Password is generated by crypt-password library using BCrypt algorithm stored in dcaegen2/sdk package
+## or https://nexus.onap.org/#nexus-search;quick~crypt-password
+header.authlist=sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6
+
+## The keystore must be setup per installation when secure port is configured
+collector.keystore.file.location=etc/keystore
+collector.keystore.passwordfile=etc/passwordfile
+
+collector.cert.subject.matcher=etc/certSubjectMatcher.properties
+
+## The truststore must be setup per installation when mutual tls support is configured
+collector.truststore.file.location=etc/truststore
+collector.truststore.passwordfile=etc/trustpasswordfile
+
+## Schema Validation checkflag
+## default no validation checkflag (-1)
+## If enabled (1) - schemafile location must be specified
+collector.schema.checkflag=1
+collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.2_ONAP.json\"}
+
+## Schema StndDefinedFields Validation checkflag
+## 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.checkflag=-1
+collector.externalSchema.schemasLocation=./etc/externalRepo/
+collector.externalSchema.mappingFileLocation=./etc/externalRepo/schema-map.json
+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
+collector.dmaapfile=./etc/DmaapConfig.json
+
+## Event transformation Flag - when set expects configurable transformation
+## defined under ./etc/eventTransform.json
+## Enabled by default; to disable set to 0
+event.transform.flag=1
+
+# Describes at what frequency (measured in minutes) should application try to fetch config from CBS
+collector.dynamic.config.update.frequency=5
diff --git a/tests/dcaegen2/testcases/resources/dcae_keywords.robot b/tests/dcaegen2/testcases/resources/dcae_keywords.robot
index 89a87868..b45ee57d 100644
--- a/tests/dcaegen2/testcases/resources/dcae_keywords.robot
+++ b/tests/dcaegen2/testcases/resources/dcae_keywords.robot
@@ -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
@@ -18,23 +19,23 @@ Create sessions
${wrong_certs}= Create List ${VESC_WRONG_CERT} ${VESC_WRONG_KEY}
${outdated_certs}= Create List ${VESC_OUTDATED_CERT} ${VESC_OUTDATED_KEY}
Create Session dcae_vesc_url ${VESC_URL}
- Set Suite Variable ${http_session} dcae_vesc_url
+ Set Global Variable ${http_session} dcae_vesc_url
Create Session dcae_vesc_url_https ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1
- Set Suite Variable ${https_basic_auth_session} dcae_vesc_url_https
+ Set Global Variable ${https_basic_auth_session} dcae_vesc_url_https
Create Session dcae_vesc_url_https_wrong_auth ${VESC_URL_HTTPS} auth=${wrong_auth} disable_warnings=1
- Set Suite Variable ${https_wrong_auth_session} dcae_vesc_url_https_wrong_auth
+ Set Global Variable ${https_wrong_auth_session} dcae_vesc_url_https_wrong_auth
Create Client Cert Session dcae_vesc_url_https_cert ${VESC_URL_HTTPS} client_certs=${certs} disable_warnings=1
- Set Suite Variable ${https_valid_cert_session} dcae_vesc_url_https_cert
+ Set Global Variable ${https_valid_cert_session} dcae_vesc_url_https_cert
Create Client Cert Session dcae_vesc_url_https_wrong_cert ${VESC_URL_HTTPS} client_certs=${wrong_certs} disable_warnings=1 verify=${False}
- Set Suite Variable ${https_invalid_cert_session} dcae_vesc_url_https_wrong_cert
+ Set Global Variable ${https_invalid_cert_session} dcae_vesc_url_https_wrong_cert
Create Client Cert Session dcae_vesc_url_https_outdated_cert ${VESC_URL_HTTPS} client_certs=${outdated_certs} disable_warnings=1 verify=${False}
- Set Suite Variable ${https_outdated_cert_session} dcae_vesc_url_https_outdated_cert
+ Set Global Variable ${https_outdated_cert_session} dcae_vesc_url_https_outdated_cert
Create Session dcae_vesc_url_https_wo_auth ${VESC_URL_HTTPS} disable_warnings=1
- Set Suite Variable ${https_no_cert_no_auth_session} dcae_vesc_url_https_wo_auth
+ Set Global Variable ${https_no_cert_no_auth_session} dcae_vesc_url_https_wo_auth
Create header
${headers}= Create Dictionary Content-Type=application/json
- Set Suite Variable ${suite_headers} ${headers}
+ Set Global Variable ${suite_headers} ${headers}
Get DCAE Nodes
[Documentation] Get DCAE Nodes from Consul Catalog
@@ -139,21 +140,30 @@ Publish Event To VES Collector With Put Method
${resp}= Put Request ${session} ${evtpath} data=${evtdata} headers=${suite_headers}
[Return] ${resp}
+Send Request And Validate Response And Error Message
+ [Documentation] Post single event to passed url and validate received response code and content
+ [Arguments] ${keyword} ${session} ${evtpath} ${evtjson} ${resp_code} ${msg_content}
+ ${resp}= Send Request And Validate Response ${keyword} ${session} ${evtpath} ${evtjson} ${resp_code}
+ ${error_message}= Set Variable ${resp.json()['requestError']['ServiceException']['text']}
+ Should Be Equal As Strings ${msg_content} ${error_message}
+
Send Request And Validate Response
- [Documentation] Post singel event to passed url with passed data and validate received response
- [Arguments] ${keyword} ${session} ${evtpath} ${evtjson} ${resp_code} ${msg_code}=None
+ [Documentation] Post single event to passed url with passed data and validate received response
+ [Arguments] ${keyword} ${session} ${evtpath} ${evtjson} ${resp_code} ${msg_code}=None ${topic}=None
${evtdata}= Get Data From File ${evtjson}
${resp}= Run Keyword ${keyword} ${session} ${evtpath} ${evtdata}
Log Receive HTTPS Status code ${resp.status_code}
Should Be Equal As Strings ${resp.status_code} ${resp_code}
${isEmpty}= Is Json Empty ${resp}
Run Keyword If '${isEmpty}' == False Log ${resp.json()}
- Run Keyword If '${msg_code}' != 'None' Check Whether Message Received ${msg_code}
+ Run Keyword If '${msg_code}' != 'None' Check Whether Message Received ${msg_code} ${topic}
+ [Return] ${resp}
Check Whether Message Received
- [Documentation] Validare if message has been received
- [Arguments] ${msg_code}
- ${ret}= DMaaP Message Receive ${msg_code}
+ [Documentation] Validate if message has been received
+ [Arguments] ${msg_code} ${topic}
+ ${ret}= Run Keyword If '${topic}' != 'None' DMaaP Message Receive On Topic ${msg_code} ${topic}
+ ... ELSE DMaaP Message Receive ${msg_code}
Should Be Equal As Strings ${ret} true
Send Request And Expect Error
diff --git a/tests/dcaegen2/testcases/resources/dcae_properties.robot b/tests/dcaegen2/testcases/resources/dcae_properties.robot
index 961bb46d..65eba841 100644
--- a/tests/dcaegen2/testcases/resources/dcae_properties.robot
+++ b/tests/dcaegen2/testcases/resources/dcae_properties.robot
@@ -30,6 +30,7 @@ ${VES_THROTTLE_STATE_EVENT_PATH} /eventListener/v5/clientThrottlingState
${VES_EVENTLISTENER_V7} /eventListener/v7
${VES_BATCH_EVENT_ENDPOINT_V7} /eventListener/v7/eventBatch
${VES_VALID_JSON_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid.json
+${VES_VALID_JSON_V7_STND_DEF_FIELDS} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields.json
${VES_INVALID_JSON_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_invalid.json
${VES_PARAMETER_OUT_OF_SCHEMA_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_parameter_out_of_schema.json
${VES_MISSING_MANDATORY_PARAMETER_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_parameter.json
@@ -45,6 +46,20 @@ ${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_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_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
+${VES_STND_DEFINED_EMPTY_DATA} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_empty_data_fields.json
+${VES_STND_DEFINED_INVALID_DATA_NO_SCHEMA_REF} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_data_fields_no_schema_ref.json
+${VES_STND_DEFINED_INCORRECT_SCHEMA_REF} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_incorrect_schema_ref.json
+${VES_STND_DEFINED_NO_VALUE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_no_value.json
+${VES_STND_DEFINED_INVALID_TYPE_DATA} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_type_data_field.json
+${VES_CERT_BASIC_AUTH_COLLECTOR_PROPERTIES} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_basic_auth.properties
+${VES_DISABLED_STNDDEFINED_COLLECTOR_PROPERTIES} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties
#DCAE Health Check
${CONFIG_BINDING_URL} http://localhost:8443
diff --git a/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh b/tests/dcaegen2/testcases/resources/override_collector_properties.sh
index 29700bc5..f6a46e13 100755
--- a/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh
+++ b/tests/dcaegen2/testcases/resources/override_collector_properties.sh
@@ -13,11 +13,21 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+if [ $# -ne 1 ]; then
+ echo "Incorrect number of parameters"
+ exit 1
+fi
-docker exec vesc /opt/app/VESCollector/bin/appController.sh stop
+LOCAL_COLLECTOR_PROPERTIES_PATH=$1
+FILENAME=$(basename $LOCAL_COLLECTOR_PROPERTIES_PATH)
+ETC_PATH=/opt/app/VESCollector/etc
+APP_CONTROLLER_PATH=/opt/app/VESCollector/bin/appController.sh
+
+docker exec vesc $APP_CONTROLLER_PATH stop
sleep 2
-docker cp ${WORKSPACE}/tests/dcaegen2/testcases/resources/collector.properties vesc:/opt/app/VESCollector/etc
+docker cp $LOCAL_COLLECTOR_PROPERTIES_PATH vesc:$ETC_PATH
sleep 10
-docker exec vesc /opt/app/VESCollector/bin/appController.sh start
+docker exec vesc mv $ETC_PATH/$FILENAME $ETC_PATH/collector.properties
+docker exec vesc $APP_CONTROLLER_PATH start
sleep 5
-echo "VES Collector Restarted with certBasicAuth"
+echo "VES Collector Restarted with overridden collector.properties"
diff --git a/tests/dcaegen2/testcases/resources/CertsLibrary.py b/tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py
index b8189422..b8189422 100644
--- a/tests/dcaegen2/testcases/resources/CertsLibrary.py
+++ b/tests/dcaegen2/testcases/resources/robot_library/CertsLibrary.py
diff --git a/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py b/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py
new file mode 100644
index 00000000..d5dd9721
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py
@@ -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 override_collector_properties(properties_path):
+ global client
+ if 'Windows' in platform.system():
+ try:
+ DcaeLibrary.change_properties_for_windows_platform_system(properties_path)
+ finally:
+ client.close()
+ return
+ DcaeLibrary.change_properties_for_non_windows_platform_system(properties_path)
+ return
+
+ @staticmethod
+ def change_properties_for_non_windows_platform_system(properties_path):
+ ws = os.environ['WORKSPACE']
+ script2run = ws + '/tests/dcaegen2/testcases/resources/override_collector_properties.sh'
+ logger.info("Running script: " + script2run)
+ logger.console("Running script: " + script2run)
+ subprocess.call([script2run, properties_path])
+ time.sleep(5)
+
+ @staticmethod
+ def change_properties_for_windows_platform_system(properties_path):
+ 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/override_collector_properties.sh', properties_path)
+ 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)
diff --git a/tests/dcaegen2/testcases/resources/DcaeVariables.py b/tests/dcaegen2/testcases/resources/robot_library/DcaeVariables.py
index 84d06ae0..47d169f1 100644
--- a/tests/dcaegen2/testcases/resources/DcaeVariables.py
+++ b/tests/dcaegen2/testcases/resources/robot_library/DcaeVariables.py
@@ -8,10 +8,6 @@ def get_environment_variable(env_varstr):
DCAE_HEALTH_CHECK_URL = "http://135.205.228.129:8500"
DCAE_HEALTH_CHECK_URL1 = "http://135.205.228.170:8500"
-CommonEventSchema = get_environment_variable('WORKSPACE') + "/tests/dcaegen2/testcases/assets/json_events/CommonEventFormat_30.1.1.json"
+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
index 00000000..c9a0ff7b
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/DmaapLibrary.py
@@ -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
index 00000000..ac432f79
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/README.md
@@ -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
index 00000000..e69de29b
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/__init__.py
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
index 00000000..f1c46e19
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPHandler.py
@@ -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
index 00000000..3d3a81fa
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPQueue.py
@@ -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
index 00000000..37499be8
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/DMaaPServer.py
@@ -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
index 00000000..e69de29b
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_simulator/__init__.py
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
index 00000000..e69de29b
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/__init__.py
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
index 00000000..7a687204
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/requirements.txt
@@ -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
index 00000000..f278a391
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSQueue.py
@@ -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
index 00000000..82f95ff8
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/robot_library/dmaap_test/test_DMaaPSimulator.py
@@ -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'
diff --git a/tests/aaf/certservice/assets/invalid.csr b/tests/oom-platform-cert-service/certservice/assets/invalid.csr
index 7284ab4d..7284ab4d 100644
--- a/tests/aaf/certservice/assets/invalid.csr
+++ b/tests/oom-platform-cert-service/certservice/assets/invalid.csr
diff --git a/tests/aaf/certservice/assets/invalid.key b/tests/oom-platform-cert-service/certservice/assets/invalid.key
index 6484fb6f..6484fb6f 100644
--- a/tests/aaf/certservice/assets/invalid.key
+++ b/tests/oom-platform-cert-service/certservice/assets/invalid.key
diff --git a/tests/aaf/certservice/assets/invalid_client_docker.env b/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env
index e96237ca..4f19a9e7 100644
--- a/tests/aaf/certservice/assets/invalid_client_docker.env
+++ b/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env
@@ -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
diff --git a/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env b/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env
new file mode 100644
index 00000000..4cdcd9ed
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env
@@ -0,0 +1,17 @@
+#Client envs
+REQUEST_TIMEOUT=30000
+OUTPUT_PATH=/var/certs
+CA_NAME=RA
+OUTPUT_TYPE=INV
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PASSWORD=secret
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
+TRUSTSTORE_PASSWORD=secret
+#Csr config envs
+COMMON_NAME=onap.org
+ORGANIZATION=Linux-Foundation
+ORGANIZATION_UNIT=ONAP
+LOCATION=San-Francisco
+STATE=California
+COUNTRY=US
+SANS=example.com:sample.com
diff --git a/tests/aaf/certservice/assets/valid_client.csr b/tests/oom-platform-cert-service/certservice/assets/valid_client.csr
index 59e5c6af..59e5c6af 100644
--- a/tests/aaf/certservice/assets/valid_client.csr
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client.csr
diff --git a/tests/aaf/certservice/assets/valid_client.pk b/tests/oom-platform-cert-service/certservice/assets/valid_client.pk
index c84908ff..c84908ff 100644
--- a/tests/aaf/certservice/assets/valid_client.pk
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client.pk
diff --git a/tests/aaf/certservice/assets/valid_client_docker.env b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env
index 55fefa3e..6fad6d21 100644
--- a/tests/aaf/certservice/assets/valid_client_docker.env
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env
@@ -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
diff --git a/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env
new file mode 100644
index 00000000..0e2d8367
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env
@@ -0,0 +1,17 @@
+#Client envs
+REQUEST_TIMEOUT=30000
+OUTPUT_PATH=/var/certs
+CA_NAME=RA
+OUTPUT_TYPE=JKS
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PASSWORD=secret
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
+TRUSTSTORE_PASSWORD=secret
+#Csr config envs
+COMMON_NAME=onap.org
+ORGANIZATION=Linux-Foundation
+ORGANIZATION_UNIT=ONAP
+LOCATION=San-Francisco
+STATE=California
+COUNTRY=US
+SANS=example.com:sample.com
diff --git a/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env
new file mode 100644
index 00000000..c3ed729f
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env
@@ -0,0 +1,17 @@
+#Client envs
+REQUEST_TIMEOUT=30000
+OUTPUT_PATH=/var/certs
+CA_NAME=RA
+OUTPUT_TYPE=P12
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PASSWORD=secret
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
+TRUSTSTORE_PASSWORD=secret
+#Csr config envs
+COMMON_NAME=onap.org
+ORGANIZATION=Linux-Foundation
+ORGANIZATION_UNIT=ONAP
+LOCATION=San-Francisco
+STATE=California
+COUNTRY=US
+SANS=example.com:sample.com
diff --git a/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env
new file mode 100644
index 00000000..aca2a54b
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env
@@ -0,0 +1,17 @@
+#Client envs
+REQUEST_TIMEOUT=30000
+OUTPUT_PATH=/var/certs
+CA_NAME=RA
+OUTPUT_TYPE=PEM
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PASSWORD=secret
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
+TRUSTSTORE_PASSWORD=secret
+#Csr config envs
+COMMON_NAME=onap.org
+ORGANIZATION=Linux-Foundation
+ORGANIZATION_UNIT=ONAP
+LOCATION=San-Francisco
+STATE=California
+COUNTRY=US
+SANS=example.com:sample.com
diff --git a/tests/aaf/certservice/assets/valid_ra.csr b/tests/oom-platform-cert-service/certservice/assets/valid_ra.csr
index 5decd8ee..5decd8ee 100644
--- a/tests/aaf/certservice/assets/valid_ra.csr
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_ra.csr
diff --git a/tests/aaf/certservice/assets/valid_ra.pk b/tests/oom-platform-cert-service/certservice/assets/valid_ra.pk
index b1ad633a..b1ad633a 100644
--- a/tests/aaf/certservice/assets/valid_ra.pk
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_ra.pk
diff --git a/tests/aaf/certservice/cert-service-test.robot b/tests/oom-platform-cert-service/certservice/cert-service-test.robot
index 90ee1a37..58e8a7e3 100644
--- a/tests/aaf/certservice/cert-service-test.robot
+++ b/tests/oom-platform-cert-service/certservice/cert-service-test.robot
@@ -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,57 +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 and truststore
- [Tags] AAF-CERT-SERVICE
+Cert Service Client successfully creates keystore.p12 and truststore.p12
+ [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} 0
+ Run Cert Service Client And Validate PKCS12 File Creation And Client Exit Code ${VALID_ENV_FILE} 0
-Cert Service Client successfully creates keystore and truststore with expected data
- [Tags] AAF-CERT-SERVICE
+Cert Service Client successfully creates keystore.jks and truststore.jks
+ [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] 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] 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} 0
+ 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] 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] 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] 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
diff --git a/tests/oom-platform-cert-service/certservice/libraries/ArtifactParser.py b/tests/oom-platform-cert-service/certservice/libraries/ArtifactParser.py
new file mode 100644
index 00000000..54e8d0ff
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/libraries/ArtifactParser.py
@@ -0,0 +1,40 @@
+from cryptography.x509.oid import ExtensionOID
+from cryptography import x509
+
+class ArtifactParser:
+
+ def __init__(self, mount_path, ext):
+ self.keystorePassPath = mount_path + '/keystore.pass'
+ self.keystorePath = mount_path + '/keystore.' + ext
+ self.truststorePassPath = mount_path + '/truststore.pass'
+ self.truststorePath = mount_path + '/truststore.' + ext
+
+ def contains_expected_data(self, data):
+ expectedData = data.expectedData
+ actualData = data.actualData
+ return cmp(expectedData, actualData) == 0
+
+ def get_owner_data_from_certificate(self, certificate):
+ list = certificate.get_subject().get_components()
+ return dict((k, v) for k, v in list)
+
+ def get_sans(self, cert):
+ extension = cert.to_cryptography().extensions.get_extension_for_oid(ExtensionOID.SUBJECT_ALTERNATIVE_NAME)
+ dnsList = extension.value.get_values_for_type(x509.DNSName)
+ return ':'.join(map(lambda dns: dns.encode('ascii','ignore'), dnsList))
+
+ def get_envs_as_dict(self, list):
+ envs = self.get_list_of_pairs_by_mappings(list)
+ return self.remove_nones_from_dict(envs)
+
+ def remove_nones_from_dict(self, dictionary):
+ return dict((k, v) for k, v in dictionary.iteritems() if k is not None)
+
+ def get_list_of_pairs_by_mappings(self, list):
+ mappings = self.get_mappings()
+ listOfEnvs = map(lambda k: k.split('='), list)
+ return dict((mappings.get(a[0]), a[1]) for a in listOfEnvs)
+
+ def get_mappings(self):
+ return {'COMMON_NAME':'CN', 'ORGANIZATION':'O', 'ORGANIZATION_UNIT':'OU', 'LOCATION':'L', 'STATE':'ST', 'COUNTRY':'C', 'SANS':'SANS'}
+
diff --git a/tests/aaf/certservice/libraries/CertClientManager.py b/tests/oom-platform-cert-service/certservice/libraries/CertClientManager.py
index a4a0df23..46d69bb8 100644
--- a/tests/aaf/certservice/libraries/CertClientManager.py
+++ b/tests/oom-platform-cert-service/certservice/libraries/CertClientManager.py
@@ -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()
diff --git a/tests/aaf/certservice/libraries/EnvsReader.py b/tests/oom-platform-cert-service/certservice/libraries/EnvsReader.py
index cc60eed6..cc60eed6 100644
--- a/tests/aaf/certservice/libraries/EnvsReader.py
+++ b/tests/oom-platform-cert-service/certservice/libraries/EnvsReader.py
diff --git a/tests/oom-platform-cert-service/certservice/libraries/JksArtifactsValidator.py b/tests/oom-platform-cert-service/certservice/libraries/JksArtifactsValidator.py
new file mode 100644
index 00000000..e2fdde91
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/libraries/JksArtifactsValidator.py
@@ -0,0 +1,45 @@
+import jks
+from OpenSSL import crypto
+from cryptography import x509
+from cryptography.hazmat.backends import default_backend
+from EnvsReader import EnvsReader
+from ArtifactParser import ArtifactParser
+
+class JksArtifactsValidator:
+
+ def __init__(self, mount_path):
+ self.parser = ArtifactParser(mount_path, "jks")
+
+ def get_and_compare_data_jks(self, path_to_env):
+ data = self.get_data_jks(path_to_env)
+ return data, self.parser.contains_expected_data(data)
+
+ def get_keystore(self):
+ keystore = jks.KeyStore.load(self.parser.keystorePath, open(self.parser.keystorePassPath, 'rb').read())
+ return keystore.private_keys['certificate'].cert_chain[0][1]
+
+ def get_truststore(self):
+ truststore = jks.KeyStore.load(self.parser.truststorePath, open(self.parser.truststorePassPath, 'rb').read())
+ return truststore.certs
+
+ def can_open_keystore_and_truststore_with_pass_jks(self):
+ try:
+ jks.KeyStore.load(self.parser.keystorePath, open(self.parser.keystorePassPath, 'rb').read())
+ jks.KeyStore.load(self.parser.truststorePath, open(self.parser.truststorePassPath, 'rb').read())
+ return True
+ except:
+ return False
+
+ def get_data_jks(self, path_to_env):
+ envs = self.parser.get_envs_as_dict(EnvsReader().read_env_list_from_file(path_to_env))
+ certificate = self.get_keystore_certificate()
+ data = self.parser.get_owner_data_from_certificate(certificate)
+ data['SANS'] = self.parser.get_sans(certificate)
+ return type('', (object,), {"expectedData": envs, "actualData": data})
+
+ def get_keystore_certificate(self):
+ return crypto.X509.from_cryptography(self.load_x509_certificate(self.get_keystore()))
+
+ def load_x509_certificate(self, data):
+ cert = x509.load_der_x509_certificate(data, default_backend())
+ return cert
diff --git a/tests/oom-platform-cert-service/certservice/libraries/P12ArtifactsValidator.py b/tests/oom-platform-cert-service/certservice/libraries/P12ArtifactsValidator.py
new file mode 100644
index 00000000..b0701718
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/libraries/P12ArtifactsValidator.py
@@ -0,0 +1,37 @@
+from OpenSSL import crypto
+from EnvsReader import EnvsReader
+from ArtifactParser import ArtifactParser
+
+class P12ArtifactsValidator:
+
+ def __init__(self, mount_path):
+ self.parser = ArtifactParser(mount_path, "p12")
+
+ def get_and_compare_data_p12(self, path_to_env):
+ data = self.get_data(path_to_env)
+ return data, self.parser.contains_expected_data(data)
+
+ def can_open_keystore_and_truststore_with_pass(self):
+ can_open_keystore = self.can_open_store_file_with_pass_file(self.parser.keystorePassPath, self.parser.keystorePath)
+ can_open_truststore = self.can_open_store_file_with_pass_file(self.parser.truststorePassPath, self.parser.truststorePath)
+
+ return can_open_keystore & can_open_truststore
+
+ def can_open_store_file_with_pass_file(self, pass_file_path, store_file_path):
+ try:
+ self.get_certificate(pass_file_path, store_file_path)
+ return True
+ except:
+ return False
+
+ def get_data(self, path_to_env):
+ envs = self.parser.get_envs_as_dict(EnvsReader().read_env_list_from_file(path_to_env))
+ certificate = self.get_certificate(self.parser.keystorePassPath, self.parser.keystorePath)
+ data = self.parser.get_owner_data_from_certificate(certificate)
+ data['SANS'] = self.parser.get_sans(certificate)
+ return type('', (object,), {"expectedData": envs, "actualData": data})
+
+ def get_certificate(self, pass_file_path, store_file_path):
+ password = open(pass_file_path, 'rb').read()
+ crypto.load_pkcs12(open(store_file_path, 'rb').read(), password)
+ return crypto.load_pkcs12(open(store_file_path, 'rb').read(), password).get_certificate()
diff --git a/tests/oom-platform-cert-service/certservice/libraries/PemArtifactsValidator.py b/tests/oom-platform-cert-service/certservice/libraries/PemArtifactsValidator.py
new file mode 100644
index 00000000..46e0357e
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/libraries/PemArtifactsValidator.py
@@ -0,0 +1,39 @@
+import os
+from OpenSSL import crypto
+from cryptography import x509
+from cryptography.hazmat.backends import default_backend
+from EnvsReader import EnvsReader
+from ArtifactParser import ArtifactParser
+
+class PemArtifactsValidator:
+
+ def __init__(self, mount_path):
+ self.parser = ArtifactParser(mount_path, "pem")
+ self.key = mount_path + '/key.pem'
+
+ def get_and_compare_data_pem(self, path_to_env):
+ data = self.get_data_pem(path_to_env)
+ return data, self.parser.contains_expected_data(data)
+
+ def artifacts_exist_and_are_not_empty(self):
+ keystoreExists = self.file_exists_and_is_not_empty(self.parser.keystorePath)
+ truststoreExists = self.file_exists_and_is_not_empty(self.parser.truststorePath)
+ keyExists = self.file_exists_and_is_not_empty(self.key)
+ return keystoreExists and truststoreExists and keyExists
+
+ def file_exists_and_is_not_empty(self, pathToFile):
+ return os.path.isfile(pathToFile) and os.path.getsize(pathToFile) > 0
+
+ def get_data_pem(self, path_to_env):
+ envs = self.parser.get_envs_as_dict(EnvsReader().read_env_list_from_file(path_to_env))
+ certificate = self.get_keystore_certificate()
+ data = self.parser.get_owner_data_from_certificate(certificate)
+ data['SANS'] = self.parser.get_sans(certificate)
+ return type('', (object,), {"expectedData": envs, "actualData": data})
+
+ def get_keystore_certificate(self):
+ return crypto.X509.from_cryptography(self.load_x509_certificate())
+
+ def load_x509_certificate(self):
+ cert = x509.load_pem_x509_certificate(open(self.parser.keystorePath, 'rb').read(), default_backend())
+ return cert
diff --git a/tests/aaf/certservice/resources/cert-service-keywords.robot b/tests/oom-platform-cert-service/certservice/resources/cert-service-keywords.robot
index d4d4fd93..fea210b5 100644
--- a/tests/aaf/certservice/resources/cert-service-keywords.robot
+++ b/tests/oom-platform-cert-service/certservice/resources/cert-service-keywords.robot
@@ -6,14 +6,16 @@ Library RequestsLibrary
Library HttpLibrary.HTTP
Library Collections
Library ../libraries/CertClientManager.py ${MOUNT_PATH} ${TRUSTSTORE_PATH}
-Library ../libraries/JksFilesValidator.py ${MOUNT_PATH}
+Library ../libraries/P12ArtifactsValidator.py ${MOUNT_PATH}
+Library ../libraries/JksArtifactsValidator.py ${MOUNT_PATH}
+Library ../libraries/PemArtifactsValidator.py ${MOUNT_PATH}
*** Keywords ***
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
@@ -85,7 +87,7 @@ Send Post Request And Validate Response
${resp}= Post Request ${https_valid_cert_session} ${path}
Should Be Equal As Strings ${resp.status_code} ${resp_code}
-Run Cert Service Client And Validate JKS File Creation And Client Exit Code
+Run Cert Service Client And Validate PKCS12 File Creation And Client Exit Code
[Documentation] Run Cert Service Client Container And Validate Exit Code
[Arguments] ${env_file} ${expected_exit_code}
${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
@@ -94,13 +96,42 @@ Run Cert Service Client And Validate JKS File Creation And Client Exit Code
Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return: ${exitcode} exit code, but expected: ${expected_exit_code}
Should Be True ${can_open} Cannot Open Keystore/TrustStore by passpshase
+Run Cert Service Client And Validate JKS File Creation And Client Exit Code
+ [Documentation] Run Cert Service Client Container And Validate Exit Code
+ [Arguments] ${env_file} ${expected_exit_code}
+ ${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
+ ${can_open}= Can Open Keystore And Truststore With Pass Jks
+ Remove Client Container And Save Logs ${CLIENT_CONTAINER_NAME} positive_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return: ${exitcode} exit code, but expected: ${expected_exit_code}
+ Should Be True ${can_open} Cannot Open Keystore/TrustStore by passpshase
+
+Run Cert Service Client And Validate PKCS12 Files Contain Expected Data
+ [Documentation] Run Cert Service Client Container And Validate PKCS12 Files Contain Expected Data
+ [Arguments] ${env_file} ${expected_exit_code}
+ ${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
+ ${data} ${isEqual}= Get And Compare Data P12 ${env_file}
+ Remove Client Container And Save Logs ${CLIENT_CONTAINER_NAME} positive_path_with_data
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return: ${exitcode} exit code, but expected: ${expected_exit_code}
+ Should Be True ${isEqual} Keystore doesn't contain ${data.expectedData}. Actual data is: ${data.actualData}
+
Run Cert Service Client And Validate JKS Files Contain Expected Data
[Documentation] Run Cert Service Client Container And Validate JKS Files Contain Expected Data
[Arguments] ${env_file} ${expected_exit_code}
${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
- ${data} ${isEqual}= Get And Compare Data ${env_file}
+ ${data} ${isEqual}= Get And Compare Data Jks ${env_file}
+ Remove Client Container And Save Logs ${CLIENT_CONTAINER_NAME} positive_path_with_data
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return: ${exitcode} exit code, but expected: ${expected_exit_code}
+ Should Be True ${isEqual} Keystore doesn't contain ${data.expectedData}. Actual data is: ${data.actualData}
+
+Run Cert Service Client And Validate PEM Files Contain Expected Data
+ [Documentation] Run Cert Service Client Container And Validate PEM Files Contain Expected Data
+ [Arguments] ${env_file} ${expected_exit_code}
+ ${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
+ ${existNotEmpty}= Artifacts Exist And Are Not Empty
+ ${data} ${isEqual}= Get And Compare Data Pem ${env_file}
Remove Client Container And Save Logs ${CLIENT_CONTAINER_NAME} positive_path_with_data
Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return: ${exitcode} exit code, but expected: ${expected_exit_code}
+ Should Be True ${existNotEmpty} PEM artifacts not created properly
Should Be True ${isEqual} Keystore doesn't contain ${data.expectedData}. Actual data is: ${data.actualData}
Run Cert Service Client And Validate Http Response Code And Client Exit Code
@@ -113,3 +144,11 @@ Run Cert Service Client And Validate Http Response Code And Client Exit Code
Should Be True ${can_find_API_response} Cannot Find API response in logs
Should Be Equal As Strings ${api_response_code} ${expected_api_response_code} API return ${api_response_code} but expected: ${expected_api_response_code}
Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+
+Run Cert Service Client And Validate Client Exit Code
+ [Documentation] Run Cert Service Client Container And Validate Exit Code
+ [Arguments] ${env_file} ${expected_exit_code}
+ ${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
+ Remove Client Container And Save Logs ${CLIENT_CONTAINER_NAME} negative_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+
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
index 00000000..ff0500a2
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/resources/cert-service-properties.robot
@@ -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
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks b/tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks
new file mode 100644
index 00000000..390f2410
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks
Binary files differ
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks.bak b/tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks.bak
new file mode 100644
index 00000000..390f2410
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks.bak
Binary files differ
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/jksAndPemAndP12.jks b/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/jksAndPemAndP12.jks
new file mode 100644
index 00000000..1c9f111a
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/jksAndPemAndP12.jks
Binary files differ
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/pemAndP12.pem b/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/pemAndP12.pem
new file mode 100644
index 00000000..978e682d
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/pemAndP12.pem
@@ -0,0 +1,63 @@
+-----BEGIN CERTIFICATE-----
+MIIEszCCAxugAwIBAgIUZrzliCEcld8Q7Fa20QOooFrkewAwDQYJKoZIhvcNAQEL
+BQAwYTEjMCEGCgmSJomT8ixkAQEME2MtMGI4NDYyNzkzMDkyYzFhZGYxFTATBgNV
+BAMMDE1hbmFnZW1lbnRDQTEjMCEGA1UECgwaRUpCQ0EgQ29udGFpbmVyIFF1aWNr
+c3RhcnQwHhcNMjAwNzE1MTI1NTI1WhcNMzAwNzE1MTI1NTI1WjBhMSMwIQYKCZIm
+iZPyLGQBAQwTYy0wYjg0NjI3OTMwOTJjMWFkZjEVMBMGA1UEAwwMTWFuYWdlbWVu
+dENBMSMwIQYDVQQKDBpFSkJDQSBDb250YWluZXIgUXVpY2tzdGFydDCCAaIwDQYJ
+KoZIhvcNAQEBBQADggGPADCCAYoCggGBAPKU+p62gXve2rCo2ojyyKcy9T/yEZJi
+9eZJoawets18FNKzWgXDz3ZK+dgc8hVHZahmIzfh9ovcEALYvCx1bLKN5tqbV7O0
+lUFGI+DGlP9QzGKopCh/uMXas4/lfVNogEB7cXu62ak6FuIuaKHETeqez5wC0d1d
+KcilG4loaN3tGXn8j1rnUq1fVu4QyxYfDekRzFiLOvdGeYfZlMkGcVYq3jDV9/sH
+5wKUKIxRwa+t1GlvzJqjVY6K3UvxS8ZBrNYTAtsvI/s6fd8Ah4FIM0Zsc8X1CIb4
+rxqhU6CDx1fQCgKyO6FG/3kVA9Y6+VLeRXsa/VaZxRwQWn0XfVrVpajiD+q3m9xd
+/NJUEAu1xEyfZw43ZSduGjrf5pwHR871noo+7pEbTDlM92ktDFW3go1DowrhEUlf
+XaU6C25yuzThl8f9pFD9/Bo82nHL5n8BENLCmaYrioVWQBAmrQKo1Y3uFgY+fP7y
+CL1POlJTuoXO++KhnEvhGfiIVBlzwdBATwIDAQABo2MwYTAPBgNVHRMBAf8EBTAD
+AQH/MB8GA1UdIwQYMBaAFAZ6Sy3QQ0dNORdnfg5ppmOI6ngpMB0GA1UdDgQWBBQG
+ekst0ENHTTkXZ34OaaZjiOp4KTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL
+BQADggGBAM8MyROdYt0458uCRM/8KZYU9q5xRDGXUGXVpEcGyu1hVlnzlnv7YJSX
+BWQenl092IVM7B0hsttpQIAXK4lS3hQ1fTaYWub0TPbK7xORGwi2uTDEagWXMc5e
+c2J6Sb9IFl2UqX8cERRCJNuENnuf10MU3rXa2TfydaELDXxr49KPPx3tgl/OfbtY
+MmFWLiyxo1jIZ/LeIiaN1m0OtGskkR8TF2D/ZA7YPzEWl2R3PhYNR1gkfAtYPWya
+DTXgiQwXuWDhdSTqiN3QuxRDVXFiQgoV0wqjgkqh4NiOXWB2ryaPvqiYRCvoM6Ly
+OcYy4LidGz9J+jQGAJPh4fI/1G4SgwVAT0bgYREy4IP6Y8R4zGoU0rGKnknfL70E
+t4Xm2ASu5jEcne2l1UOPPctFmei+QHmZ0c8V8HNmP5XRf+47OSi+ryCrRQfKrkyw
+UgvoB49yV3M1+IgCx18daEQCYal98hhQMn/3NVrOJeOjzDcF6Gxb679Cu/biZ8Wx
+li7RV0Xt1g==
+-----END CERTIFICATE-----
+Bag Attributes
+ friendlyName: trusted-certificate-1
+ 2.16.840.1.113894.746875.1.1: <Unsupported tag 6>
+subject=UID = c-0b8462793092c1adf, CN = ManagementCA, O = EJBCA Container Quickstart
+
+issuer=UID = c-0b8462793092c1adf, CN = ManagementCA, O = EJBCA Container Quickstart
+
+-----BEGIN CERTIFICATE-----
+MIIEszCCAxugAwIBAgIUZrzliCEcld8Q7Fa20QOooFrkewAwDQYJKoZIhvcNAQEL
+BQAwYTEjMCEGCgmSJomT8ixkAQEME2MtMGI4NDYyNzkzMDkyYzFhZGYxFTATBgNV
+BAMMDE1hbmFnZW1lbnRDQTEjMCEGA1UECgwaRUpCQ0EgQ29udGFpbmVyIFF1aWNr
+c3RhcnQwHhcNMjAwNzE1MTI1NTI1WhcNMzAwNzE1MTI1NTI1WjBhMSMwIQYKCZIm
+iZPyLGQBAQwTYy0wYjg0NjI3OTMwOTJjMWFkZjEVMBMGA1UEAwwMTWFuYWdlbWVu
+dENBMSMwIQYDVQQKDBpFSkJDQSBDb250YWluZXIgUXVpY2tzdGFydDCCAaIwDQYJ
+KoZIhvcNAQEBBQADggGPADCCAYoCggGBAPKU+p62gXve2rCo2ojyyKcy9T/yEZJi
+9eZJoawets18FNKzWgXDz3ZK+dgc8hVHZahmIzfh9ovcEALYvCx1bLKN5tqbV7O0
+lUFGI+DGlP9QzGKopCh/uMXas4/lfVNogEB7cXu62ak6FuIuaKHETeqez5wC0d1d
+KcilG4loaN3tGXn8j1rnUq1fVu4QyxYfDekRzFiLOvdGeYfZlMkGcVYq3jDV9/sH
+5wKUKIxRwa+t1GlvzJqjVY6K3UvxS8ZBrNYTAtsvI/s6fd8Ah4FIM0Zsc8X1CIb4
+rxqhU6CDx1fQCgKyO6FG/3kVA9Y6+VLeRXsa/VaZxRwQWn0XfVrVpajiD+q3m9xd
+/NJUEAu1xEyfZw43ZSduGjrf5pwHR871noo+7pEbTDlM92ktDFW3go1DowrhEUlf
+XaU6C25yuzThl8f9pFD9/Bo82nHL5n8BENLCmaYrioVWQBAmrQKo1Y3uFgY+fP7y
+CL1POlJTuoXO++KhnEvhGfiIVBlzwdBATwIDAQABo2MwYTAPBgNVHRMBAf8EBTAD
+AQH/MB8GA1UdIwQYMBaAFAZ6Sy3QQ0dNORdnfg5ppmOI6ngpMB0GA1UdDgQWBBQG
+ekst0ENHTTkXZ34OaaZjiOp4KTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL
+BQADggGBAM8MyROdYt0458uCRM/8KZYU9q5xRDGXUGXVpEcGyu1hVlnzlnv7YJSX
+BWQenl092IVM7B0hsttpQIAXK4lS3hQ1fTaYWub0TPbK7xORGwi2uTDEagWXMc5e
+c2J6Sb9IFl2UqX8cERRCJNuENnuf10MU3rXa2TfydaELDXxr49KPPx3tgl/OfbtY
+MmFWLiyxo1jIZ/LeIiaN1m0OtGskkR8TF2D/ZA7YPzEWl2R3PhYNR1gkfAtYPWya
+DTXgiQwXuWDhdSTqiN3QuxRDVXFiQgoV0wqjgkqh4NiOXWB2ryaPvqiYRCvoM6Ly
+OcYy4LidGz9J+jQGAJPh4fI/1G4SgwVAT0bgYREy4IP6Y8R4zGoU0rGKnknfL70E
+t4Xm2ASu5jEcne2l1UOPPctFmei+QHmZ0c8V8HNmP5XRf+47OSi+ryCrRQfKrkyw
+UgvoB49yV3M1+IgCx18daEQCYal98hhQMn/3NVrOJeOjzDcF6Gxb679Cu/biZ8Wx
+li7RV0Xt1g==
+-----END CERTIFICATE-----
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_different_lists_size.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_different_lists_size.env
new file mode 100644
index 00000000..9edfaa41
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_different_lists_size.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass:/var/certs/truststoreP12.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_duplicated_aliases.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_duplicated_aliases.env
new file mode 100644
index 00000000..f98b3366
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_duplicated_aliases.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.jks
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass:/var/certs/truststoreJks.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_certs.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_certs.env
new file mode 100644
index 00000000..95c00fc2
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_certs.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/empty.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=:/var/certs/truststoreP12.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_file.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_file.env
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_file.env
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_keystore_destination_path.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_keystore_destination_path.env
new file mode 100644
index 00000000..526357b0
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_keystore_destination_path.env
@@ -0,0 +1,3 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass::/var/certs/truststoreP12.pass
+KEYSTORE_SOURCE_PATHS=/var/certs/external/keystore13.jks
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_passwords.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_passwords.env
new file mode 100644
index 00000000..840728bb
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_passwords.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_extension.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_extension.env
new file mode 100644
index 00000000..5b971616
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_extension.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.txt:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass:/var/certs/truststoreP12.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_file_password_pair.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_file_password_pair.env
new file mode 100644
index 00000000..1a195116
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_file_password_pair.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreP12.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_keystore_source_paths.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_keystore_source_paths.env
new file mode 100644
index 00000000..7090151c
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_keystore_source_paths.env
@@ -0,0 +1,4 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass::/var/certs/truststoreP12.pass
+KEYSTORE_SOURCE_PATHS=/var/certs/external/keystore13.jks
+KEYSTORE_DESTINATION_PATHS=/var/certs/cert.jks
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_password_path.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_password_path.env
new file mode 100644
index 00000000..b397f9ac
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_password_path.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks_invalid.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/invalid_truststore_paths.env b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_truststore_paths.env
new file mode 100644
index 00000000..52fa88c6
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/invalid_truststore_paths.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/invalid/truststore.jks:/invalid/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass:/var/certs/truststoreP12.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/truststores/empty.pem b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/empty.pem
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/empty.pem
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.jks b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.jks
new file mode 100644
index 00000000..390f2410
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.jks
Binary files differ
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.pass b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.pass
new file mode 100644
index 00000000..8b11c5b6
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.pass
@@ -0,0 +1 @@
+wgg2_fLSQ8I4sLfyUOCC7uYn \ No newline at end of file
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/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.jks
index 88d61846..3bd85a06 100755..100644
--- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/main/resources/truststore/org.onap.so.trust.jks
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.jks
Binary files differ
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.p12 b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.p12
new file mode 100644
index 00000000..3a98c4a2
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.p12
Binary files differ
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pem b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pem
new file mode 100644
index 00000000..8815d6cb
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pem
@@ -0,0 +1,28 @@
+-----BEGIN CERTIFICATE-----
+MIIEszCCAxugAwIBAgIUZrzliCEcld8Q7Fa20QOooFrkewAwDQYJKoZIhvcNAQEL
+BQAwYTEjMCEGCgmSJomT8ixkAQEME2MtMGI4NDYyNzkzMDkyYzFhZGYxFTATBgNV
+BAMMDE1hbmFnZW1lbnRDQTEjMCEGA1UECgwaRUpCQ0EgQ29udGFpbmVyIFF1aWNr
+c3RhcnQwHhcNMjAwNzE1MTI1NTI1WhcNMzAwNzE1MTI1NTI1WjBhMSMwIQYKCZIm
+iZPyLGQBAQwTYy0wYjg0NjI3OTMwOTJjMWFkZjEVMBMGA1UEAwwMTWFuYWdlbWVu
+dENBMSMwIQYDVQQKDBpFSkJDQSBDb250YWluZXIgUXVpY2tzdGFydDCCAaIwDQYJ
+KoZIhvcNAQEBBQADggGPADCCAYoCggGBAPKU+p62gXve2rCo2ojyyKcy9T/yEZJi
+9eZJoawets18FNKzWgXDz3ZK+dgc8hVHZahmIzfh9ovcEALYvCx1bLKN5tqbV7O0
+lUFGI+DGlP9QzGKopCh/uMXas4/lfVNogEB7cXu62ak6FuIuaKHETeqez5wC0d1d
+KcilG4loaN3tGXn8j1rnUq1fVu4QyxYfDekRzFiLOvdGeYfZlMkGcVYq3jDV9/sH
+5wKUKIxRwa+t1GlvzJqjVY6K3UvxS8ZBrNYTAtsvI/s6fd8Ah4FIM0Zsc8X1CIb4
+rxqhU6CDx1fQCgKyO6FG/3kVA9Y6+VLeRXsa/VaZxRwQWn0XfVrVpajiD+q3m9xd
+/NJUEAu1xEyfZw43ZSduGjrf5pwHR871noo+7pEbTDlM92ktDFW3go1DowrhEUlf
+XaU6C25yuzThl8f9pFD9/Bo82nHL5n8BENLCmaYrioVWQBAmrQKo1Y3uFgY+fP7y
+CL1POlJTuoXO++KhnEvhGfiIVBlzwdBATwIDAQABo2MwYTAPBgNVHRMBAf8EBTAD
+AQH/MB8GA1UdIwQYMBaAFAZ6Sy3QQ0dNORdnfg5ppmOI6ngpMB0GA1UdDgQWBBQG
+ekst0ENHTTkXZ34OaaZjiOp4KTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL
+BQADggGBAM8MyROdYt0458uCRM/8KZYU9q5xRDGXUGXVpEcGyu1hVlnzlnv7YJSX
+BWQenl092IVM7B0hsttpQIAXK4lS3hQ1fTaYWub0TPbK7xORGwi2uTDEagWXMc5e
+c2J6Sb9IFl2UqX8cERRCJNuENnuf10MU3rXa2TfydaELDXxr49KPPx3tgl/OfbtY
+MmFWLiyxo1jIZ/LeIiaN1m0OtGskkR8TF2D/ZA7YPzEWl2R3PhYNR1gkfAtYPWya
+DTXgiQwXuWDhdSTqiN3QuxRDVXFiQgoV0wqjgkqh4NiOXWB2ryaPvqiYRCvoM6Ly
+OcYy4LidGz9J+jQGAJPh4fI/1G4SgwVAT0bgYREy4IP6Y8R4zGoU0rGKnknfL70E
+t4Xm2ASu5jEcne2l1UOPPctFmei+QHmZ0c8V8HNmP5XRf+47OSi+ryCrRQfKrkyw
+UgvoB49yV3M1+IgCx18daEQCYal98hhQMn/3NVrOJeOjzDcF6Gxb679Cu/biZ8Wx
+li7RV0Xt1g==
+-----END CERTIFICATE-----
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreJks.pass b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreJks.pass
new file mode 100644
index 00000000..817b6194
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreJks.pass
@@ -0,0 +1 @@
+WkTGRmhSe%PM;it?NRY888Ak \ No newline at end of file
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreP12.pass b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreP12.pass
new file mode 100644
index 00000000..48036abd
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreP12.pass
@@ -0,0 +1 @@
+0TZd_x#qp$78hJsm0wzc1dm_ \ No newline at end of file
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/valid_envs_and_extra_optional.env b/tests/oom-platform-cert-service/truststoremerger/assets/valid_envs_and_extra_optional.env
new file mode 100644
index 00000000..928bf637
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/valid_envs_and_extra_optional.env
@@ -0,0 +1,4 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=:/var/certs/truststoreP12.pass
+KEYSTORE_SOURCE_PATHS=/var/certs/external/keystore.jks:/var/certs/external/keystore.pass
+KEYSTORE_DESTINATION_PATHS=/var/certs/keystore.jks:/var/certs/keystore.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/valid_jks_pem_p12.env b/tests/oom-platform-cert-service/truststoremerger/assets/valid_jks_pem_p12.env
new file mode 100644
index 00000000..4afa1a27
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/valid_jks_pem_p12.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass::/var/certs/truststoreP12.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/valid_pem_p12.env b/tests/oom-platform-cert-service/truststoremerger/assets/valid_pem_p12.env
new file mode 100644
index 00000000..e0240a74
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/valid_pem_p12.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=:/var/certs/truststoreP12.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/assets/valid_single_truststore.env b/tests/oom-platform-cert-service/truststoremerger/assets/valid_single_truststore.env
new file mode 100644
index 00000000..66b6f66f
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/assets/valid_single_truststore.env
@@ -0,0 +1,2 @@
+TRUSTSTORES_PATHS=/var/certs/truststore.jks
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass
diff --git a/tests/oom-platform-cert-service/truststoremerger/libraries/EnvsReader.py b/tests/oom-platform-cert-service/truststoremerger/libraries/EnvsReader.py
new file mode 100644
index 00000000..cc60eed6
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/libraries/EnvsReader.py
@@ -0,0 +1,11 @@
+
+class EnvsReader:
+
+ def read_env_list_from_file(self, path):
+ f = open(path, "r")
+ r_list = []
+ for line in f:
+ line = line.strip()
+ if line[0] != "#":
+ r_list.append(line)
+ return r_list
diff --git a/tests/oom-platform-cert-service/truststoremerger/libraries/JksValidator.py b/tests/oom-platform-cert-service/truststoremerger/libraries/JksValidator.py
new file mode 100644
index 00000000..983f66bb
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/libraries/JksValidator.py
@@ -0,0 +1,28 @@
+
+import jks
+
+class JksValidator:
+
+ def get_jks_entries(self, jks_path, password_path):
+ store = jks.KeyStore.load(jks_path, open(password_path, 'rb').read())
+ return store.entries
+
+ def assert_jks_truststores_equal(self, result_truststore_path, password_path, expected_truststore_path):
+ result_keys = self.get_jks_entries(result_truststore_path, password_path)
+ expected_keys = self.get_jks_entries(expected_truststore_path, password_path)
+ if len(result_keys) != len(expected_keys):
+ return False
+ for k in result_keys:
+ if not (k in expected_keys and result_keys[k].cert == expected_keys[k].cert):
+ return False
+ return True
+
+ def assert_jks_keystores_equal(self, result_keystore_path, password_path, expected_keystore_path):
+ result_keys = self.get_jks_entries(result_keystore_path, password_path)
+ expected_keys = self.get_jks_entries(expected_keystore_path, password_path)
+ if len(result_keys) != len(expected_keys):
+ return False
+ for k in result_keys:
+ if not (k in expected_keys and result_keys[k].pkey == expected_keys[k].pkey):
+ return False
+ return True
diff --git a/tests/oom-platform-cert-service/truststoremerger/libraries/PemTruststoreValidator.py b/tests/oom-platform-cert-service/truststoremerger/libraries/PemTruststoreValidator.py
new file mode 100644
index 00000000..8dc9623d
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/libraries/PemTruststoreValidator.py
@@ -0,0 +1,19 @@
+import re
+
+BEGIN_CERT = "-----BEGIN CERTIFICATE-----"
+END_CERT = "-----END CERTIFICATE-----"
+
+class PemTruststoreValidator:
+
+ def assert_pem_truststores_equal(self, result_pem_path, expected_pem_path):
+ result_certs = self.get_list_of_pem_certificates(result_pem_path)
+ expected_certs = self.get_list_of_pem_certificates(expected_pem_path)
+ result_certs.sort()
+ expected_certs.sort()
+ if len(result_certs) != len(expected_certs):
+ return False
+ return result_certs == expected_certs
+
+
+ def get_list_of_pem_certificates(self, path):
+ return re.findall(BEGIN_CERT + '(.+?)' + END_CERT, open(path, 'rb').read(), re.DOTALL)
diff --git a/tests/oom-platform-cert-service/truststoremerger/libraries/TrustMergerManager.py b/tests/oom-platform-cert-service/truststoremerger/libraries/TrustMergerManager.py
new file mode 100644
index 00000000..f7a493c4
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/libraries/TrustMergerManager.py
@@ -0,0 +1,47 @@
+import docker
+import os
+import shutil
+from EnvsReader import EnvsReader
+from docker.types import Mount
+
+ARCHIVES_PATH = os.getenv("WORKSPACE") + "/archives/"
+
+
+class TrustMergerManager:
+
+ def __init__(self, mount_path, truststores_path):
+ self.mount_path = mount_path
+ self.truststores_path = truststores_path
+
+ def run_merger_container(self, merger_image, merger_name, path_to_env):
+ self.remove_mount_dir()
+ shutil.copytree(self.truststores_path, self.mount_path)
+ client = docker.from_env()
+ environment = EnvsReader().read_env_list_from_file(path_to_env)
+ container = client.containers.run(
+ image=merger_image,
+ name=merger_name,
+ environment=environment,
+ 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')],
+ detach=True
+ )
+ exitcode = container.wait()
+ return exitcode
+
+ def create_mount_dir(self):
+ if not os.path.exists(self.mount_path):
+ os.makedirs(self.mount_path)
+
+ def remove_mount_dir(self):
+ if os.path.exists(self.mount_path):
+ shutil.rmtree(self.mount_path)
+
+ def remove_merger_container_and_save_logs(self, container_name, log_file_name):
+ client = docker.from_env()
+ container = client.containers.get(container_name)
+ text_file = open(ARCHIVES_PATH + "merger_container_" + log_file_name + ".log", "w")
+ text_file.write(container.logs())
+ text_file.close()
+ container.remove()
+ self.remove_mount_dir()
diff --git a/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot
new file mode 100644
index 00000000..416ce610
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot
@@ -0,0 +1,44 @@
+*** Settings ***
+
+Resource ../../../common.robot
+Resource ./trust-merger-properties.robot
+Library ../libraries/TrustMergerManager.py ${MOUNT_PATH} ${TRUSTSTORES_PATH}
+Library ../libraries/JksValidator.py
+Library ../libraries/PemTruststoreValidator.py
+
+*** Keywords ***
+
+Run Trust Merger And Expect Error
+ [Documentation] Run Truststore Merger Container And Validate Exit Code
+ [Arguments] ${env_file} ${expected_exit_code}
+ ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
+ Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} negative_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+
+Run Trust Merger And Merge Truststore Files To Jks
+ [Documentation] Run Truststore Merger Container And Validate Exit Code And Provided Truststore Files
+ [Arguments] ${env_file} ${expected_exit_code} ${jks_path} ${jks_password} ${expected_jks_path}
+ ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
+ ${files_equal}= Assert Jks Truststores Equal ${jks_path} ${jks_password} ${expected_jks_path}
+ Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} positive_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+ Should Be True ${files_equal}
+
+Run Trust Merger And Check Copied Keystore Files
+ [Documentation] Run Truststore Merger Container And Validate Exit Code And Provided Keystore Files
+ [Arguments] ${env_file} ${expected_exit_code} ${jks_path} ${jks_password} ${expected_jks_path}
+ ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
+ ${files_equal}= Assert Jks Keystores Equal ${jks_path} ${jks_password} ${expected_jks_path}
+ Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} positive_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+ Should Be True ${files_equal}
+
+Run Trust Merger And Merge Truststore Files To Pem
+ [Documentation] Run Truststore Merger Container And Validate Exit Code And Files
+ [Arguments] ${env_file} ${expected_exit_code} ${pem_path} ${expected_pem_path}
+ ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
+ ${files_equal}= Assert Pem Truststores Equal ${pem_path} ${expected_pem_path}
+ Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} positive_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+ Should Be True ${files_equal}
+
diff --git a/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-properties.robot b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-properties.robot
new file mode 100644
index 00000000..c773735c
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-properties.robot
@@ -0,0 +1,61 @@
+*** Variables ***
+
+${DOCKER_MERGER_IMAGE} nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-truststore-merger:latest
+${MERGER_CONTAINER_NAME} %{MergerContainerName}
+${MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp
+${TRUSTSTORES_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores
+${EXPECTED_TRUSTSTORES_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores
+
+${JKS_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.jks
+${JKS_PASSWORD_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststoreJks.pass
+${P12_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.p12
+${P12_PASSWORD_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststoreP12.pass
+${PEM_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.pem
+${JKS_KEYSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/external/keystore.jks
+
+${JKS_TRUSTSTORE_EXPECTED_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/jksAndPemAndP12.jks
+${PEM_TRUSTSTORE_EXPECTED_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/pemAndP12.pem
+${JKSBAK_KEYSTORE_EXPECTED_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks.bak
+${JKS_KEYSTORE_EXPECTED_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_keystores/keystore.jks
+
+${ENV_FILE_EMPTY} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_file.env
+${ENV_FILE_INVALID_FILE_LIST_SIZE} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_different_lists_size.env
+${ENV_FILE_EMPTY_PASSWORDS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_passwords.env
+${ENV_FILE_INVALID_PASSWORD_PATHS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_password_path.env
+${ENV_FILE_INVALID_TRUSTSTORE_PATHS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_truststore_paths.env
+${ENV_FILE_INVALID_PASSWORD} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_file_password_pair.env
+${ENV_FILE_INVALID_FILE_EXTENSION} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_extension.env
+${ENV_FILE_DUPLICATED_ALIASES} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_duplicated_aliases.env
+${ENV_FILE_EMPTY_CERTS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_certs.env
+${ENV_FILE_JKS_PEM_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_jks_pem_p12.env
+${ENV_FILE_PEM_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_pem_p12.env
+${ENV_FILE_SINGLE_TRUSTSTORE} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_single_truststore.env
+${ENV_FILE_INVALID_KEYSTORE_SOURCE_PATHS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_keystore_source_paths.env
+${ENV_FILE_EMPTY_KEYSTORE_DESTINATION_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_keystore_destination_path.env
+${ENV_FILE_EXTRA_OPTIONAL_ENVS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_envs_and_extra_optional.env
+
+${KEYSTORE_JKS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.jks
+${KEYSTORE_JKS_PASS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/external/keystore.pass
+${TRUSTSTORE_JKS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.jks
+${TRUSTSTORE_JKS_PASS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreJks.pass
+${TRUSTSTORE_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.p12
+${TRUSTSTORE_P12_PASS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pass
+${TRUSTSTORE_PEM} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pem
+
+${EXITCODE_SUCCESS} 0
+${EXITCODE_CERTIFICATES_PATHS_VALIDATION_EXCEPTION} 1
+${EXITCODE_CONFIGURATION_EXCEPTION} 2
+${EXITCODE_TRUSTSTORE_FILE_FACTORY_EXCEPTION} 3
+${EXITCODE_PASSWORD_READER_EXCEPTION} 4
+${EXITCODE_CREATE_BACKUP_EXCEPTION} 5
+${EXITCODE_KEYSTORE_INSTANCE_EXCEPTION} 6
+${EXITCODE_TRUSTSTORE_LOAD_FILE_EXCEPTION} 7
+${EXITCODE_TRUSTSTORE_DATA_OPERATION_EXCEPTION} 8
+${EXITCODE_MISSING_TRUSTSTORE_EXCEPTIONSUCCESS} 9
+${EXITCODE_ALIAS_CONFLICT_EXCEPTION} 10
+${EXITCODE_WRITE_TRUSTSTORE_FILE_EXCEPTION} 11
+${EXITCODE_KEYSTORE_FILE_COPY_EXCEPTION} 12
+${EXITCODE_KEYSTORE_NOT_EXIST_EXCEPTION} 13
+${EXITCODE_UNEXPECTED_EXCEPTION} 99
+
+
diff --git a/tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot b/tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot
new file mode 100644
index 00000000..41e55cf5
--- /dev/null
+++ b/tests/oom-platform-cert-service/truststoremerger/trust-merger-test.robot
@@ -0,0 +1,88 @@
+*** Settings ***
+
+Documentation Truststore merger test case scenarios
+Library RequestsLibrary
+Resource ./resources/trust-merger-keywords.robot
+
+*** Test Cases ***
+
+Trust Merger fails when file extension is invalid
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with invalid truststore extension env and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_INVALID_FILE_EXTENSION} ${EXITCODE_CERTIFICATES_PATHS_VALIDATION_EXCEPTION}
+
+Trust Merger fails when a variable is empty
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with empty truststore password path env and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_EMPTY_PASSWORDS} ${EXITCODE_CERTIFICATES_PATHS_VALIDATION_EXCEPTION}
+
+Trust Merger fails when truststore and passwords envs not provided
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with invalid empty envs and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_EMPTY} ${EXITCODE_CONFIGURATION_EXCEPTION}
+
+Trust Merger fails when list sizes are different
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with different truststore and password envs size and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_INVALID_FILE_LIST_SIZE} ${EXITCODE_CONFIGURATION_EXCEPTION}
+
+Trust Merger fails when truststore paths are invalid
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with invalid truststore path and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_INVALID_TRUSTSTORE_PATHS} ${EXITCODE_TRUSTSTORE_FILE_FACTORY_EXCEPTION}
+
+Trust Merger fails when password path is invalid
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with invalid password path and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_INVALID_PASSWORD_PATHS} ${EXITCODE_PASSWORD_READER_EXCEPTION}
+
+Trust Merger fails when password file pair is invalid
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with incorrect password env and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_INVALID_PASSWORD} ${EXITCODE_TRUSTSTORE_LOAD_FILE_EXCEPTION}
+
+Trust Merger fails when pem does not contain cert
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with empty pem truststore and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_EMPTY_CERTS} ${EXITCODE_MISSING_TRUSTSTORE_EXCEPTIONSUCCESS}
+
+Trust Merger fails when aliases are duplicated
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with duplicated aliases in truststores and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_DUPLICATED_ALIASES} ${EXITCODE_ALIAS_CONFLICT_EXCEPTION}
+
+Trust Merger merges successfully jks pem p12
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with valid env file and expect merged certs from jks, pem and p12
+ Run Trust Merger And Merge Truststore Files To Jks ${ENV_FILE_JKS_PEM_P12} ${EXITCODE_SUCCESS} ${JKS_TRUSTSTORE_MOUNT_PATH} ${TRUSTSTORE_JKS_PASS} ${JKS_TRUSTSTORE_EXPECTED_PATH}
+
+Trust Merger merges successfully pem p12
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with valid env file and expect merged certs from pem and p12
+ Run Trust Merger And Merge Truststore Files To Pem ${ENV_FILE_PEM_P12} ${EXITCODE_SUCCESS} ${PEM_TRUSTSTORE_MOUNT_PATH} ${PEM_TRUSTSTORE_EXPECTED_PATH}
+
+Trust Merger ends successfully with single truststore
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with one truststore in env file and expect code 0
+ Run Trust Merger And Merge Truststore Files To Jks ${ENV_FILE_SINGLE_TRUSTSTORE} ${EXITCODE_SUCCESS} ${JKS_TRUSTSTORE_MOUNT_PATH} ${TRUSTSTORE_JKS_PASS} ${TRUSTSTORE_JKS}
+
+Trust Merger fails when file to copy does not exist
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with invalid extra optional env as a path to file and expect error code
+ Run Trust Merger And Expect Error ${ENV_FILE_INVALID_KEYSTORE_SOURCE_PATHS} ${EXITCODE_KEYSTORE_NOT_EXIST_EXCEPTION}
+
+Trust Merger fails when only one extra optional env is set
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with empty extra optional env and expect code
+ Run Trust Merger And Expect Error ${ENV_FILE_EMPTY_KEYSTORE_DESTINATION_PATH} ${EXITCODE_CONFIGURATION_EXCEPTION}
+
+Trust Merger's Copier successfully backs up files
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with valid env file and expect successfully backed up file
+ Run Trust Merger And Check Copied Keystore Files ${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${EXITCODE_SUCCESS} ${JKS_KEYSTORE_MOUNT_PATH} ${KEYSTORE_JKS_PASS} ${JKSBAK_KEYSTORE_EXPECTED_PATH}
+
+Trust Merger's Copier successfully copies file
+ [Tags] OOM-TRUST-STORE-MERGER
+ [Documentation] Run with valid env file and expect successfully copied file
+ Run Trust Merger And Check Copied Keystore Files ${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${EXITCODE_SUCCESS} ${JKS_KEYSTORE_MOUNT_PATH} ${KEYSTORE_JKS_PASS} ${JKS_KEYSTORE_EXPECTED_PATH}
+
diff --git a/tests/policy/api/api-test.robot b/tests/policy/api/api-test.robot
index 76c1bdc6..2f5c6972 100644
--- a/tests/policy/api/api-test.robot
+++ b/tests/policy/api/api-test.robot
@@ -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
@@ -78,11 +78,11 @@ RetrieveMonitoringPolicyTypes
CreateNewMonitoringPolicyV1
[Documentation] Create a new Monitoring TCA policy version 1
${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Post Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies data=${postjson} headers=${headers}
+ ${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
@@ -92,7 +92,7 @@ CreateNewMonitoringPolicyV1
SimpleCreateNewMonitoringPolicyV1
[Documentation] Create a new Monitoring TCA policiy version 1 using simple endpoint. Trying to create an existing policy with any change and same version should cause error.
${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1_2.json
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.v1_2.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
@@ -103,7 +103,7 @@ SimpleCreateNewMonitoringPolicyV1
SimpleCreateNewMonitoringPolicyV2
[Documentation] Create a new Monitoring TCA policiy version 2 using simple endpoint
${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v2.json
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.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
@@ -117,27 +117,54 @@ SimpleCreateNewMonitoringPolicyV2
RetrievePoliciesOfType
[Documentation] Retrieve all Policies Created for a specific Policy Type
${auth}= Create List healthcheck zb!XztG34
- ${expjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
+ ${expjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= 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
Dictionary Should Contain Key ${resp.json()['topology_template']['policies'][0]} onap.restart.tca
Dictionary Should Contain Key ${expjsonobject['topology_template']['policies'][0]} onap.restart.tca
-DeleteSpecificPolicyV1
- [Documentation] Delete the Monitoring Policy Version 1 of the TCA Policy Type
+RetrieveAllPolicies
+ [Documentation] Retrieve all Policies
${auth}= Create List healthcheck zb!XztG34
+ ${expjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Delete Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/1.0.0 headers=${headers}
+ ${resp}= Get Request policy /policy/api/v1/policies headers=${headers}
+ Log Received response from policy ${resp.text}
+ ${expjsonobject} To Json ${expjson}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${expjsonobject['topology_template']['policies'][0]} onap.restart.tca
+
+RetrieveSpecificPolicy
+ [Documentation] Retrieve a specific Policy named 'onap.restart.tca' and version '1.0.0'
+ ${auth}= Create List healthcheck zb!XztG34
+ ${expjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
+ Log Creating session https://${POLICY_API_IP}:6969
+ ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/api/v1/policies/onap.restart.tca/versions/1.0.0/ headers=${headers}
+ Log Received response from policy ${resp.text}
+ ${expjsonobject} To Json ${expjson}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Dictionary Should Contain Key ${resp.json()['topology_template']['policies'][0]} onap.restart.tca
+ Dictionary Should Contain Key ${expjsonobject['topology_template']['policies'][0]} onap.restart.tca
+
+DeleteSpecificPolicy
+ [Documentation] Delete a specific Policy named 'onap.restart.tca' and version '1.0.0'
+ ${auth}= Create List healthcheck zb!XztG34
+ 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/policies/onap.restart.tca/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/policies/onap.restart.tca/versions/1.0.0 headers=${headers}
+ ${resp}= Delete Request policy /policy/api/v1/policies/onap.restart.tca/versions/1.0.0 headers=${headers}
Should Be Equal As Strings ${resp.status_code} 404
DeleteSpecificPolicyV2
@@ -146,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
@@ -158,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
@@ -170,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
diff --git a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json b/tests/policy/api/data/onap.policy.monitoring.tcagen2.v1.json
index 15c20458..a2e2ddc9 100644
--- a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
+++ b/tests/policy/api/data/onap.policy.monitoring.tcagen2.v1.json
@@ -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"
}
diff --git a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json b/tests/policy/api/data/onap.policy.monitoring.tcagen2.v2.json
index a7a801a8..d86749ef 100644
--- a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json
+++ b/tests/policy/api/data/onap.policy.monitoring.tcagen2.v2.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"
}
diff --git a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json
deleted file mode 100644
index 1079c7c1..00000000
--- a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca_policy" : {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
diff --git a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json
deleted file mode 100644
index 35ad3c54..00000000
--- a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1_2.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "description": "monitoring policy",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca_policy" : {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
diff --git a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json
deleted file mode 100644
index c6b2ad2d..00000000
--- a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "2.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca_policy" : {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
diff --git a/tests/policy/pap/data/create.group.request.json b/tests/policy/pap/data/create.group.request.json
index ea04c0e5..1b63563f 100644
--- a/tests/policy/pap/data/create.group.request.json
+++ b/tests/policy/pap/data/create.group.request.json
@@ -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"
}
],
diff --git a/tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json b/tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json
deleted file mode 100644
index 3003d9a8..00000000
--- a/tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca_policy": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
diff --git a/tests/policy/pap/pap-test.robot b/tests/policy/pap/pap-test.robot
index 67a57828..3e8bc211 100644
--- a/tests/policy/pap/pap-test.robot
+++ b/tests/policy/pap/pap-test.robot
@@ -11,8 +11,8 @@ LoadPolicy
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
- ${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}
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
+ ${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
diff --git a/tests/policy/xacml-pdp/data/onap.policy.naming.decision.request.json b/tests/policy/xacml-pdp/data/onap.policy.naming.decision.request.json
index d30e0e27..3833a241 100644
--- a/tests/policy/xacml-pdp/data/onap.policy.naming.decision.request.json
+++ b/tests/policy/xacml-pdp/data/onap.policy.naming.decision.request.json
@@ -1,6 +1,6 @@
{
"ONAPName": "SDNC",
- "ONAPComponent": "SNDC-component",
+ "ONAPComponent": "SDNC-component",
"ONAPInstance": "SDNC-component-instance",
"requestId": "unique-request-sdnc-1",
"action": "naming",
diff --git a/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json b/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json
deleted file mode 100644
index 3003d9a8..00000000
--- a/tests/policy/xacml-pdp/data/vCPE.policy.monitoring.input.tosca.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca_policy": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
diff --git a/tests/policy/xacml-pdp/xacml-pdp-test.robot b/tests/policy/xacml-pdp/xacml-pdp-test.robot
index 6e2fa008..150c97e6 100644
--- a/tests/policy/xacml-pdp/xacml-pdp-test.robot
+++ b/tests/policy/xacml-pdp/xacml-pdp-test.robot
@@ -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
diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/netconf_pnp_simulator_csr.env b/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/netconf_pnp_simulator_csr.env
index 557860de..e85ab6cc 100644
--- a/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/netconf_pnp_simulator_csr.env
+++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/netconf_pnp_simulator_csr.env
@@ -2,6 +2,7 @@
REQUEST_TIMEOUT=30000
OUTPUT_PATH=/var/certs
CA_NAME=RA
+OUTPUT_TYPE=P12
KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
KEYSTORE_PASSWORD=secret
TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/sdnc_csr.env b/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/sdnc_csr.env
index 28411797..5d647de6 100644
--- a/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/sdnc_csr.env
+++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/sdnc_csr.env
@@ -2,6 +2,7 @@
REQUEST_TIMEOUT=30000
OUTPUT_PATH=/var/certs
CA_NAME=RA
+OUTPUT_TYPE=PEM
KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
KEYSTORE_PASSWORD=secret
TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/ClientManager.py b/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/ClientManager.py
index ceff9742..b1c024ff 100644
--- a/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/ClientManager.py
+++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/ClientManager.py
@@ -38,12 +38,15 @@ class ClientManager:
def __init__(self, mount_path, truststore_path):
self.mount_path = mount_path
self.truststore_path = truststore_path
+ self.keyPem = mount_path + '/key.pem'
self.caCertPem = mount_path + '/ca.pem'
self.serverKeyPem = mount_path + '/server_key.pem'
self.serverCertPem = mount_path + '/server_cert.pem'
- self.keystoreJksPath = mount_path + '/keystore.jks'
+ self.keystorePemPath = mount_path + '/keystore.pem'
+ self.keystoreP12Path = mount_path + '/keystore.p12'
self.keystorePassPath = mount_path + '/keystore.pass'
- self.truststoreJksPath = mount_path + '/truststore.jks'
+ self.truststorePemPath = mount_path + '/truststore.pem'
+ self.truststoreP12Path = mount_path + '/truststore.p12'
self.truststorePassPath = mount_path + '/truststore.pass'
# Function Create docker container.
@@ -65,20 +68,40 @@ class ClientManager:
exitcode = container.wait()
return exitcode
- # Function to validate keystore.jks/truststore.jks can be opened with generated pass-phrase.
- def can_open_keystore_and_truststore_with_pass(self):
- can_open_keystore = self.can_open_jks_file_with_pass_file(self.keystorePassPath, self.keystoreJksPath)
- can_open_truststore = self.can_open_jks_file_with_pass_file(self.truststorePassPath, self.truststoreJksPath)
+ # Function to validate keystore/truststore can be opened with generated pass-phrase.
+ def can_open_keystore_and_truststore_with_pass(self, container_name):
+ if container_name != NETCONF_PNP_SIM_CONTAINER_NAME:
+ return self.can_open_keystore_and_truststore_pem_files()
+ else:
+ return self.can_open_keystore_and_truststore_p12_files()
+
+ # Function to validate keystore.pem/truststore.pem exist and are not empty.
+ def can_open_keystore_and_truststore_pem_files(self):
+ try:
+ private_key = self.file_exist_and_not_empty(self.keyPem)
+ keystore_pem = self.file_exist_and_not_empty(self.keystorePemPath)
+ truststore_pem = self.file_exist_and_not_empty(self.truststorePemPath)
+ return private_key and keystore_pem and truststore_pem
+ except Exception as e:
+ print("UnExpected Error in validating keystore.pem/truststore.pem: {0}".format(e))
+ return False
+
+ # Function to validate keystore.p12/truststore.p12 can be opened with generated pass-phrase.
+ def can_open_keystore_and_truststore_p12_files(self):
+ can_open_keystore = self.can_open_p12_file_with_pass_file(self.keystorePassPath, self.keystoreP12Path)
+ can_open_truststore = self.can_open_p12_file_with_pass_file(self.truststorePassPath, self.truststoreP12Path)
return can_open_keystore & can_open_truststore
# Method for Uploading Certificate in SDNC-Container.
# Creating/Uploading Server-key, Server-cert, Ca-cert PEM files in Netconf-Pnp-Simulator.
- def can_install_keystore_and_truststore_certs(self, cmd, container_name):
+ def can_install_keystore_and_truststore_certs(self, cmd, cmd_tls, container_name):
continue_exec = True
if container_name == NETCONF_PNP_SIM_CONTAINER_NAME:
- print("Generating PEM files for {0} from JKS files".format(container_name))
- continue_exec = self.create_pem(self.keystorePassPath, self.keystoreJksPath, self.truststorePassPath,
- self.truststoreJksPath)
+ print("Generating PEM files for {0} from P12 files".format(container_name))
+ continue_exec = self.create_pem(self.keystorePassPath, self.keystoreP12Path, self.truststorePassPath,
+ self.truststoreP12Path)
+ else:
+ cmd = cmd_tls
if continue_exec:
print("Initiate Configuration Push for : {0}".format(container_name))
resp_code = self.execute_bash_config(cmd, container_name)
@@ -89,19 +112,22 @@ class ClientManager:
print("Execution Failed for: {0}".format(container_name))
return False
- def create_pem(self, keystore_pass_file_path, keystore_jks_file_path, truststore_pass_file_path,
- truststore_jks_file_path):
+ def create_pem(self, keystore_pass_path, keystore_p12_path, truststore_pass_path, truststore_p12_path):
# Create [server_key.pem, server_cert.pem, ca.pem] files for Netconf-Pnp-Simulation/TLS Configuration.
try:
- keystore_p12 = self.get_pkcs12(keystore_pass_file_path, keystore_jks_file_path)
- truststore_p12 = self.get_pkcs12(truststore_pass_file_path, truststore_jks_file_path)
with open(self.serverKeyPem, "wb+") as key_file:
- key_file.write(crypto.dump_privatekey(crypto.FILETYPE_PEM, keystore_p12.get_privatekey()))
+ key_file.write(crypto.dump_privatekey(crypto.FILETYPE_PEM,
+ self.get_pkcs12(keystore_pass_path,
+ keystore_p12_path).get_privatekey()))
with open(self.serverCertPem, "wb+") as server_cert_file:
- server_cert_file.write(crypto.dump_certificate(crypto.FILETYPE_PEM, keystore_p12.get_certificate()))
+ server_cert_file.write(crypto.dump_certificate(crypto.FILETYPE_PEM,
+ self.get_pkcs12(keystore_pass_path,
+ keystore_p12_path).get_certificate()))
with open(self.caCertPem, "wb+") as ca_cert_file:
ca_cert_file.write(
- crypto.dump_certificate(crypto.FILETYPE_PEM, truststore_p12.get_ca_certificates()[0]))
+ crypto.dump_certificate(crypto.FILETYPE_PEM,
+ self.get_pkcs12(truststore_pass_path,
+ truststore_p12_path).get_ca_certificates()[0]))
return True
except IOError as err:
print("I/O Error: {0}".format(err))
@@ -110,12 +136,12 @@ class ClientManager:
print("UnExpected Error: {0}".format(e))
return False
- def can_open_jks_file_with_pass_file(self, pass_file_path, jks_file_path):
+ def can_open_p12_file_with_pass_file(self, pass_file_path, p12_file_path):
try:
- if jks_file_path.split('/')[-1] == 'truststore.jks':
- pkcs12 = self.get_pkcs12(pass_file_path, jks_file_path).get_ca_certificates()[0]
+ if p12_file_path.split('/')[-1] == 'truststore.p12':
+ pkcs12 = self.get_pkcs12(pass_file_path, p12_file_path).get_ca_certificates()[0]
else:
- pkcs12 = self.get_pkcs12(pass_file_path, jks_file_path).get_certificate()
+ pkcs12 = self.get_pkcs12(pass_file_path, p12_file_path).get_certificate()
if pkcs12 is None:
return False
return True
@@ -142,12 +168,14 @@ class ClientManager:
def remove_mount_dir(self):
shutil.rmtree(self.mount_path)
+ def file_exist_and_not_empty(self, path_to_file):
+ return os.path.isfile(path_to_file) and os.path.getsize(path_to_file) > 0
+
@staticmethod
- def get_pkcs12(pass_file_path, jks_file_path):
+ def get_pkcs12(pass_file_path, p12_file_path):
# Load PKCS12 Object
password = open(pass_file_path, 'rb').read()
- p12 = crypto.load_pkcs12(open(jks_file_path, 'rb').read(), password)
- return p12
+ return crypto.load_pkcs12(open(p12_file_path, 'rb').read(), password)
@staticmethod
def execute_bash_config(cmd, container_name):
diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config_tls.sh b/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config_tls.sh
new file mode 100755
index 00000000..323f8100
--- /dev/null
+++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config_tls.sh
@@ -0,0 +1,104 @@
+#!/bin/bash
+
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+set -o errexit
+set -o pipefail
+set -o nounset
+[ "${SHELL_XTRACE:-false}" = "true" ] && set -o xtrace
+
+CONFIG=${CONFIG:-"${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/cert-data}
+CONTAINER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' sdnc)
+ODL_URL=${ODL_URL:-http://"${CONTAINER_IP}":8282}
+PROC_NAME=${0##*/}
+PROC_NAME=${PROC_NAME%.sh}
+
+function now_ms() {
+ # Requires coreutils package
+ date +"%Y-%m-%d %H:%M:%S.%3N"
+}
+
+function log() {
+ local level=$1
+ shift
+ local message="$*"
+ printf "%s %-5s [%s] %s\n" "$(now_ms)" $level $PROC_NAME "$message"
+}
+
+# Extracts the body of a PEM file by removing the dashed header and footer
+pem_body() {
+ grep -Fv -- ----- $1
+}
+
+CA_CERT_ID=xNF_CA_certificate_0_0
+CA_CERT=$(pem_body $CONFIG/truststore.pem)
+
+SERVER_PRIV_KEY_ID=ODL_private_key_0
+SERVER_KEY=$(pem_body $CONFIG/key.pem)
+SERVER_CERT=$(pem_body $CONFIG/keystore.pem)
+
+RESTCONF_URL=$ODL_URL/restconf
+NETCONF_KEYSTORE_PATH=$RESTCONF_URL/config/netconf-keystore:keystore
+
+xcurl() {
+ curl -s -o /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -w %{http_code} "$@"
+}
+
+log INFO Delete Keystore
+sc=$(xcurl -X DELETE $NETCONF_KEYSTORE_PATH)
+
+if [ "$sc" != "200" -a "$sc" != "404" ]; then
+ log ERROR "Keystore deletion failed with SC=$sc"
+ exit 1
+fi
+
+log INFO Load CA certificate
+sc=$(xcurl -X POST $NETCONF_KEYSTORE_PATH --header "Content-Type: application/json" --data "
+{
+ \"trusted-certificate\": [
+ {
+ \"name\": \"$CA_CERT_ID\",
+ \"certificate\": \"$CA_CERT\"
+ }
+ ]
+}
+")
+
+if [ "$sc" != "200" -a "$sc" != "204" ]; then
+ log ERROR Trusted-certificate update failed with SC=$sc
+ exit 1
+fi
+
+log INFO Load server private key and certificate
+sc=$(xcurl -X POST $NETCONF_KEYSTORE_PATH --header "Content-Type: application/json" --data "
+{
+ \"private-key\": {
+ \"name\": \"$SERVER_PRIV_KEY_ID\",
+ \"certificate-chain\": [
+ \"$SERVER_CERT\"
+ ],
+ \"data\": \"$SERVER_KEY\"
+ }
+}
+")
+
+if [ "$sc" != "200" -a "$sc" != "204" ]; then
+ log ERROR Private-key update failed with SC=$sc
+ exit 1
+fi \ No newline at end of file
diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot b/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot
index 8e36e65f..52cc5d2f 100644
--- a/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot
+++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot
@@ -76,8 +76,8 @@ Run Cert Service Client And Validate JKS File Creation And Client Exit Code
[Documentation] Run Cert Service Client Container And Validate Exit Code For SDNC
[Arguments] ${env_file} ${CONTAINER_NAME} ${expected_exit_code}
${exit_code}= Run Client Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${env_file} ${CERT_SERVICE_ADDRESS}${CERT_SERVICE_ENDPOINT} ${CERT_SERVICE_NETWORK}
- ${can_open}= Can Open Keystore And Truststore With Pass
- ${install_certs}= Can Install Keystore And Truststore Certs ${CONF_SCRIPT} ${CONTAINER_NAME}
+ ${can_open}= Can Open Keystore And Truststore With Pass ${CONTAINER_NAME}
+ ${install_certs}= Can Install Keystore And Truststore Certs ${CONF_SCRIPT} ${CONF_TLS_SCRIPT} ${CONTAINER_NAME}
Remove Client Container And Save Logs ${CLIENT_CONTAINER_NAME} positive_path
Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return: ${exitcode} exit code, but expected: ${expected_exit_code}
Should Be True ${can_open} Cannot Open Keystore/TrustStore by Passphrase
diff --git a/tests/so/etsi/data/notification.json b/tests/so/etsi/data/notification.json
new file mode 100644
index 00000000..54bbc09f
--- /dev/null
+++ b/tests/so/etsi/data/notification.json
@@ -0,0 +1,26 @@
+{
+ "id": "3aa49739-aabd-4d40-8c32-b5b97940201b",
+ "notificationType": "VnfLcmOperationOccurrenceNotification",
+ "subscriptionId": null,
+ "timeStamp": null,
+ "notificationStatus": "START",
+ "operationState": "PROCESSING",
+ "vnfInstanceId": "a23c5388-e035-4ca6-a126-662ad8dd8687",
+ "operation": "INSTANTIATE",
+ "isAutomaticInvocation": null,
+ "vnfLcmOpOccId": null,
+ "affectedVnfcs": null,
+ "affectedVirtualLinks": null,
+ "affectedVirtualStorages": null,
+ "changedInfo": null,
+ "changedExtConnectivity": null,
+ "error": null,
+ "_links": {
+ "vnfInstance": {
+ "href": "https://so-vnfm-simulator:9093/vnflcm/v1/vnf_instances/a23c5388-e035-4ca6-a126-662ad8dd8687"
+ },
+ "subscription": null,
+ "vnfLcmOpOcc": null
+ }
+}
+
diff --git a/tests/so/etsi/etsi_tests.robot b/tests/so/etsi/etsi_tests.robot
index 684034b7..49670d96 100644
--- a/tests/so/etsi/etsi_tests.robot
+++ b/tests/so/etsi/etsi_tests.robot
@@ -78,6 +78,15 @@ Invoke VNF Instantiation
Run Keyword If '${actual_request_state}' == 'COMPLETE' log to console \nexecuted with expected result
Should Be Equal As Strings '${actual_request_state}' 'COMPLETE'
+Invoke VNF Notification for SOL002
+ Create Session ve-vnfm-adapter-session http://${REPO_IP}:9098
+ ${data}= Get Binary File ${CURDIR}${/}data${/}notification.json
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json Authorization=Basic YWRtaW46YTRiM2MyZDE=
+ ${notification_request}= Post Request ve-vnfm-adapter-session /lcm/v1/vnf/instances/notifications data=${data} headers=${headers}
+ Log To Console ${notification_request}
+ Run Keyword If '${notification_request.status_code}' == '200' Log To Console \nexecuted with expected result
+ Should Be Equal As Strings '${notification_request.status_code}' '200'
+
Delete VNF Instance
Run Keyword If "${vnf_instance_Id}" != "${EMPTY}" Log to Console VNF Instance ID :${vnf_instance_Id} received
... ELSE Fail Log to Console Invalid VNF Instance ID :${vnf_instance_Id} recieved
diff --git a/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot b/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot
index fe3b1cec..660c5f64 100644
--- a/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot
+++ b/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot
@@ -25,7 +25,7 @@ ${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Datafile file published" %{WORKSP
${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}
${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/archives/metadata.json
${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec dcaegen2-pm-mapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > %{WORKSPACE}/archives/pmmapper_docker.log
-${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful Event" %{WORKSPACE}/archives/pmmapper_docker.log
+${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful" %{WORKSPACE}/archives/pmmapper_docker.log
${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} grep "Successfully published VES events to messagerouter" %{WORKSPACE}/archives/pmmapper_docker.log
${metadataSchemaPath} %{WORKSPACE}/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json
${metadataJsonPath} %{WORKSPACE}/archives/metadata.json
@@ -113,7 +113,7 @@ Verify PM-Mapper successfully receives uncompressed the PM XML file
${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} shell=yes
Log ${cli_cmd_output.stdout}
Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} XML validation successful Event
+ Should Contain ${cli_cmd_output.stdout} XML validation successful
Verify PM-Mapper successfully publishes VES event the Message Router
[Tags] Bulk_PM_E2E_08
diff --git a/tests/vfc/nfvo-driver-ems/test.robot b/tests/vfc/nfvo-driver-ems/test.robot
deleted file mode 100755
index 29aa10a5..00000000
--- a/tests/vfc/nfvo-driver-ems/test.robot
+++ /dev/null
@@ -1,21 +0,0 @@
-*** Settings ***
-Library Collections
-Library RequestsLibrary
-Library OperatingSystem
-Library json
-
-*** Variables ***
-@{return_ok_list}= 200 201 202
-${queryswagger_url} /api/emsdriver/v1/swagger.json
-
-*** Test Cases ***
-EMSDriverSwaggerTest
- [Documentation] query swagger info of emsdriver
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${EMS_DRV_IP}:8206 headers=${headers}
- ${resp}= Get Request web_session ${queryswagger_url}
- ${responese_code}= Convert To String ${resp.status_code}
- List Should Contain Value ${return_ok_list} ${responese_code}
- ${response_json} json.loads ${resp.content}
- ${swagger_version}= Convert To String ${response_json['swagger']}
- Should Be Equal ${swagger_version} 2.0
diff --git a/tests/vfc/nfvo-driver-sfc/test.robot b/tests/vfc/nfvo-driver-sfc/test.robot
deleted file mode 100644
index 13115943..00000000
--- a/tests/vfc/nfvo-driver-sfc/test.robot
+++ /dev/null
@@ -1,21 +0,0 @@
-*** settings ***
-Library Collections
-Library RequestsLibrary
-Library OperatingSystem
-Library json
-
-*** Variables ***
-@{return_ok_list}= 200 201 202
-${queryswagger_url} /api/ztesdncdriver/v1/swagger
-
-*** Test Cases ***
-ZteSdncDriverSwaggerTest
- [Documentation] query swagger info of ztesdncdriver
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${SFC_DRV_IP}:8411 headers=${headers}
- ${resp}= Get Request web_session ${queryswagger_url}
- ${responese_code}= Convert To String ${resp.status_code}
- List Should Contain Value ${return_ok_list} ${responese_code}
- ${response_json} json.loads ${resp.content}
- ${swagger_version}= Convert To String ${response_json['swagger']}
- Should Be Equal ${swagger_version} 2.0
diff --git a/tests/vfc/nfvo-lcm/test.robot b/tests/vfc/nfvo-lcm/test.robot
index 8ce0adb2..241ebb81 100644
--- a/tests/vfc/nfvo-lcm/test.robot
+++ b/tests/vfc/nfvo-lcm/test.robot
@@ -59,7 +59,7 @@ NslcmSwaggerTest
NslcmSwaggerByMSBTest
[Documentation] query swagger info of nslcm by MSB
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Get Request web_session ${queryswagger_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -72,7 +72,7 @@ CreateNSTest
${json_value}= json_from_file ${create_ns_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${ns_url} ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -87,7 +87,7 @@ CreateVnfTest
Set To Dictionary ${json_value} nsInstanceId=${nsInstId}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${vnfs_url} ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -99,7 +99,7 @@ CreateVnfTest
QueryVnfTest
[Documentation] Query vnf function test
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Get Request web_session ${vnfs_url}/${vnfInstId}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -109,7 +109,7 @@ TerminateVnfTest
${json_value}= json_from_file ${terminate_vnf_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${terminate_vnfs_url}/${vnfInstId} ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -121,7 +121,7 @@ CreateVlTest
Set To Dictionary ${json_value} nsInstanceId=${nsInstId}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${vls_url} ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -133,7 +133,7 @@ CreateVlTest
DeleteVlTest
[Documentation] Delete vl function test
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Delete Request web_session ${vls_url}/${vlInstId}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -143,7 +143,7 @@ ScaleNSTest
${json_value}= json_from_file ${scale_ns_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${ns_url}/${nsInstId}/scale ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -154,7 +154,7 @@ HealNSTest
${json_value}= json_from_file ${heal_ns_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${ns_url}/${nsInstId}/heal ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -166,7 +166,7 @@ HealNSTest
GetJobTest
[Documentation] Query Ns Job function test
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Get Request web_session ${get_job_url}/${jobInstId}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -176,7 +176,7 @@ UpdateNSTest
${json_value}= json_from_file ${update_ns_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${ns_url}/${nsInstId}/update ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -187,7 +187,7 @@ TerminateNSTest
${json_value}= json_from_file ${terminate_ns_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${ns_url}/${nsInstId}/terminate ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -196,7 +196,7 @@ TerminateNSTest
DeleteNSTest
[Documentation] Delete NS function test
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Delete Request web_session ${ns_url}/${nsInstId}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -204,7 +204,7 @@ DeleteNSTest
LcmHealthCheckTest
[Documentation] check health for nslcm by MSB
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Get Request web_session ${healthcheck_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -215,7 +215,7 @@ LcmHealthCheckTest
LcmGetNsTest
[Documentation] get ns instances for nslcm by MSB
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Get Request web_session ${ns_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -223,7 +223,7 @@ LcmGetNsTest
QueryAllPnfsTest
[Documentation] Query all pnfs function test
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Get Request web_session ${pnfs_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -233,7 +233,7 @@ CreateNSInstanceTest
${json_value}= json_from_file ${create_ns_instance_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json globalcustomerid=global-customer-id-test1 servicetype=service-type-test1
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${ns_instances_url} ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -245,7 +245,7 @@ CreateNSInstanceTest
QueryNSInstancesTest
[Documentation] Query Ns Instances function test
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Get Request web_session ${ns_instances_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
@@ -256,7 +256,7 @@ UpdateNSInstanceTest
${json_string}= string_from_json ${json_value}
Log ${json_string}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${ns_instances_url}/${nsInstId}/update ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -267,7 +267,7 @@ TerminateNSInstanceTest
${json_value}= json_from_file ${terminate_ns_instance_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${ns_instances_url}/${nsInstanceId}/terminate ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -278,7 +278,7 @@ LcmCreateSubscriptionsTest
${json_value}= json_from_file ${create_subscriptions_json}
${json_string}= string_from_json ${json_value}
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
Set Request Body ${json_string}
${resp}= Post Request web_session ${get_subscriptions_url} ${json_string}
${responese_code}= Convert To String ${resp.status_code}
@@ -287,7 +287,7 @@ LcmCreateSubscriptionsTest
LcmGetSubscriptionsTest
[Documentation] get subscriptions for nslcm by MSB
${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ Create Session web_session http://${NSLCM_IP}:8403 headers=${headers}
${resp}= Get Request web_session ${get_subscriptions_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code} \ No newline at end of file
diff --git a/tests/vfc/nfvo-multivimproxy/test.robot b/tests/vfc/nfvo-multivimproxy/test.robot
deleted file mode 100644
index fab3694e..00000000
--- a/tests/vfc/nfvo-multivimproxy/test.robot
+++ /dev/null
@@ -1,24 +0,0 @@
-*** settings ***
-Resource ../../common.robot
-Library Collections
-Library RequestsLibrary
-Library simplejson
-Library OperatingSystem
-Library json
-Library HttpLibrary.HTTP
-
-*** Variables ***
-@{return_ok_list}= 200 201 202
-${queryswagger_url} /api/multivimproxy/v1/swagger.json
-
-*** Test Cases ***
-SwaggerFuncTest
- [Documentation] query swagger info rest test
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${RESMGR_IP}:8481 headers=${headers}
- ${resp}= Get Request web_session ${queryswagger_url}
- ${responese_code}= Convert To String ${resp.status_code}
- List Should Contain Value ${return_ok_list} ${responese_code}
- ${response_json} json.loads ${resp.content}
- ${swagger_version}= Convert To String ${response_json['swagger']}
- Should Be Equal ${swagger_version} 2.0 \ No newline at end of file
diff --git a/tests/vfc/nfvo-resmanagement/test.robot b/tests/vfc/nfvo-resmanagement/test.robot
deleted file mode 100644
index 2f247553..00000000
--- a/tests/vfc/nfvo-resmanagement/test.robot
+++ /dev/null
@@ -1,24 +0,0 @@
-*** settings ***
-Resource ../../common.robot
-Library Collections
-Library RequestsLibrary
-Library simplejson
-Library OperatingSystem
-Library json
-Library HttpLibrary.HTTP
-
-*** Variables ***
-@{return_ok_list}= 200 201 202
-${queryswagger_url} /api/resmgr/v1/swagger.json
-
-*** Test Cases ***
-SwaggerFuncTest
- [Documentation] query swagger info rest test
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${RESMGR_IP}:8480 headers=${headers}
- ${resp}= Get Request web_session ${queryswagger_url}
- ${responese_code}= Convert To String ${resp.status_code}
- List Should Contain Value ${return_ok_list} ${responese_code}
- ${response_json} json.loads ${resp.content}
- ${swagger_version}= Convert To String ${response_json['swagger']}
- Should Be Equal ${swagger_version} 2.0 \ No newline at end of file
diff --git a/tests/vfc/nfvo-wfengine/workflow.robot b/tests/vfc/nfvo-wfengine/workflow.robot
deleted file mode 100644
index 8039ae17..00000000
--- a/tests/vfc/nfvo-wfengine/workflow.robot
+++ /dev/null
@@ -1,113 +0,0 @@
-*** Settings ***
-Resource ../../common.robot
-Library Collections
-Library json
-Library OperatingSystem
-Library RequestsLibrary
-Library HttpLibrary.HTTP
-
-*** Variables ***
-${MSB_IP} 127.0.0.1
-${MSB_PORT} 10550
-${ACTIVITI_IP} 127.0.0.1
-${ACTIVITI_PORT} 8804
-${MGRSERVICE_IP} 127.0.0.1
-${MGRSERVICE_PORT} 8805
-${processId} demo
-${deployid} 0
-${bmpfilepath} ${SCRIPTS}/nfvo-wfengine/demo.bpmn20.xml
-
-*** Test Cases ***
-Deploy BPMN File Test On Activiti
- [Documentation] Check if the test bpmn file can be deployed in activiti engine
- ${auth}= Create List kermit kermit
- ${headers}= Create Dictionary Accept=application/json
- Create Session web_session http://${ACTIVITI_IP}:${ACTIVITI_PORT} headers=${headers} auth=${auth}
- ${files}= evaluate {"file":open('${bmpfilepath}','rb')}
- ${resp}= Post Request web_session /activiti-rest/service/repository/deployments files=${files}
- Should Be Equal ${resp.status_code} ${201}
- Log ${resp.json()}
- ${deployedId}= Set Variable ${resp.json()["id"]}
- Set Global Variable ${deployedId}
-
-Exectue BPMN File Testt On Activiti
- [Documentation] Check if the test bpmn file can be exectued in activiti engine
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json Authorization=Basic a2VybWl0Omtlcm1pdA==
- Create Session web_session http://${ACTIVITI_IP}:${ACTIVITI_PORT} headers=${headers}
- ${body} Create Dictionary processDefinitionKey=${processId}
- ${body} dumps ${body}
- ${resp}= Post Request web_session /activiti-rest/service/runtime/process-instances ${body}
- Should Be Equal ${resp.status_code} ${201}
-
-UnDeploy BPMN File Testt On Activiti
- [Documentation] Check if the test bpmn file can be undeployed in activiti engine
- log ${deployedId}
- ${auth}= Create List kermit kermit
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${ACTIVITI_IP}:${ACTIVITI_PORT} headers=${headers} auth=${auth}
- ${resp}= Delete Request web_session /activiti-rest/service/repository/deployments/${deployedId}?cascade=true
- Should Be Equal ${resp.status_code} ${204}
-
-Deploy BPMN File Test On MgrService
- [Documentation] Check if the test bpmn file can be deployed in Management Service
- ${auth}= Create List kermit kermit
- ${headers}= Create Dictionary Accept=application/json
- Create Session web_session http://${MGRSERVICE_IP}:${MGRSERVICE_PORT} headers=${headers} auth=${auth}
- ${files}= evaluate {"file":open('${bmpfilepath}','rb')}
- ${resp}= Post Request web_session api/workflow/v1/package files=${files}
- Should Be Equal ${resp.status_code} ${200}
- Log ${resp.json()}
- ${deployedId}= Set Variable ${resp.json()["deployedId"]}
- Set Global Variable ${deployedId}
-
-Exectue BPMN File Testt On MgrService
- [Documentation] Check if the test bpmn file can be exectued in Management Service
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json Authorization=Basic a2VybWl0Omtlcm1pdA==
- Create Session web_session http://${MGRSERVICE_IP}:${MGRSERVICE_PORT} headers=${headers}
- ${body} Create Dictionary processDefinitionKey=${processId}
- ${body} dumps ${body}
- ${resp}= Post Request web_session api/workflow/v1/process/instance ${body}
- Should Be Equal ${resp.status_code} ${200}
- Log ${resp.json()}
- Should Be Equal ${resp.json()["processDefinitionKey"]} ${processId}
-
-UnDeploy BPMN File Testt On MgrService
- [Documentation] Check if the test bpmn file can be undeployed in Management Service
- log ${deployedId}
- ${auth}= Create List kermit kermit
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MGRSERVICE_IP}:${MGRSERVICE_PORT} headers=${headers} auth=${auth}
- ${resp}= Delete Request web_session /api/workflow/v1/package/${deployedId}
- Should Be Equal ${resp.status_code} ${200}
-
-# Deploy BPMN File Test On MSB
-# [Documentation] Check if the test bpmn file can be deployed in activiti engine
-# ${auth}= Create List kermit kermit
-# ${headers}= Create Dictionary Accept=application/json
-# Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers} auth=${auth}
-# ${files}= evaluate {"file":open('${bmpfilepath}','rb')}
-# ${resp}= Post Request web_session api/workflow/v1/package files=${files}
-# Should Be Equal ${resp.status_code} ${200}
-# Log ${resp.json()}
-# ${deployedId}= Set Variable ${resp.json()["deployedId"]}
-# Set Global Variable ${deployedId}
-
-# Exectue BPMN File Testt On MSB
-# [Documentation] Check if the test bpmn file can be exectued in MSB
-# ${headers} Create Dictionary Content-Type=application/json Accept=application/json Authorization=Basic a2VybWl0Omtlcm1pdA==
-# Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers}
-# ${body} Create Dictionary processDefinitionKey=${processId}
-# ${body} dumps ${body}
-# ${resp}= Post Request web_session api/workflow/v1/process/instance ${body}
-# Should Be Equal ${resp.status_code} ${200}
-# Log ${resp.json()}
-# Should Be Equal ${resp.json()["processDefinitionKey"]} ${processId}
-
-# UnDeploy BPMN File Testt On MSB
-# [Documentation] Check if the test bpmn file can be undeployed in MSB
-# log ${deployedId}
-# ${auth}= Create List kermit kermit
-# ${headers} Create Dictionary Content-Type=application/json Accept=application/json
-# Create Session web_session http://${MSB_IP}:${MSB_PORT} headers=${headers} auth=${auth}
-# ${resp}= Delete Request web_session /api/workflow/v1/package/${deployedId}
-# Should Be Equal ${resp.status_code} ${200}