aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcinrzepeckiwroc <marcin.rzepecki@nokia.com>2020-07-21 13:41:46 +0200
committermarcinrzepeckiwroc <marcin.rzepecki@nokia.com>2020-07-21 13:41:46 +0200
commit713b9eacf505adfde742f4ef40a8909fd16e313f (patch)
tree6819e09b6d4787d70d576f510007f60337949814
parent18151c54880666f061ede79cf920a01dd425b696 (diff)
Add testcase for PM Mapper filtering (regex support)
Issue-ID: DCAEGEN2-2347 Signed-off-by: marcinrzepeckiwroc <marcin.rzepecki@nokia.com> Change-Id: I8cb2e8bb201b5445341838a4a2c2889d447f923f
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json42
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot11
2 files changed, 53 insertions, 0 deletions
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 7f99e120..55b4f795 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -31,6 +31,7 @@ ${NR-TYPE-A_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pm
${NR-TYPE-C_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.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
@@ -138,6 +139,16 @@ Verify that PM Mapper correctly maps an NR Type-C file based on counter filterin
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=6
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+
*** Keywords ***
SendToDatarouter