*** Variables ***
-${CLI_EXEC_CLI_CONFIG} { head -n 6 | tail -2;} < /tmp/pmmapper.log
+${CLI_EXEC_CLI_CONFIG} { head -n 10 | tail -5;} < /tmp/pmmapper.log
${CLI_EXEC_CLI_SUBS} curl -k https://${DR_PROV_IP}:8443/internal/prov
${PMMAPPER_BASE_URL} http://${PMMAPPER_IP}:8081
${DELIVERY_ENDPOINT} /delivery
${NO_MANAGED_ELEMENT_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_managed_element.xml
${NO_MEASDATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_measdata.xml
${VALID_METADATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json
+${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
-${CLI_EXEC_CLI_PM_LOG} docker exec pmmapper /bin/sh -c "tail -10 /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log"
+${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"
${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
-${PUBLISH_CONTENT_TYPE} application/octet-stream
+${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
${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_RESTART_PMMAPPER} docker restart pmmapper
-${CLI_DELETE_SUB1} curl -i -X DELETE -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:DGL" -k https://localhost:8443/subs/1
-${CLI_DELETE_SUB2} curl -i -X DELETE -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:DGL" -k https://localhost:8443/subs/2
-${CLI_MESSAGE_ROUTER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000
-${CLI_MR_EVENT_COUNT} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 | egrep -o 'measInfoId1|measInfoId2|measInfoId3' > /tmp/mr.log
+${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
+
*** Test Cases ***
Verify PM Mapper Receive Configuraton From Config Binding Service
[Tags] PM_MAPPER_01
VerifyResponse ${resp.content} Malformed Metadata.
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=2
-Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router
+Verify that PM Mapper logs successful when a file that contains no measdata is provided
[Tags] PM_MAPPER_05
- [Documentation] Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router.
+ [Documentation] Verify that PM Mapper logs successful when a file that contains no measdata is provided
[Timeout] 1 minute
- SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3
- CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+ SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=3
- Sleep 10s
- CheckLog ${CLI_MESSAGE_ROUTER_TOPIC} perf3gpp_gnb-Ericsson_pmMeasResult
-Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router.
+Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided
[Tags] PM_MAPPER_06
- [Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router.
+ [Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided
[Timeout] 1 minute
- SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4
- CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+ SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=4
- Run Process ${CLI_MR_EVENT_COUNT} shell=yes
- CheckLog ${CLI_MR_LOG} measInfoId1
- CheckLog ${CLI_MR_LOG} measInfoId2
- CheckLog ${CLI_MR_LOG} measInfoId3
-Verify that PM Mapper logs successful when a file that contains no measdata is provided
+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 logs successful when a file that contains no measdata is provided
+ [Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router.
[Timeout] 1 minute
- 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=5
+ SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
-Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided
+Verify 3GPP PM Mapper maps Type-A file based on counter filtering and publish 3gpp perf VES evnets to message router
[Tags] PM_MAPPER_08
- [Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided
+ [Documentation] Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router.
[Timeout] 1 minute
- 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=6
+ ${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
+ 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.
[Tags] PM_MAPPER_09
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
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} PM measurement file must have an extension of .xml
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=8
+
+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
+ [Documentation] Verify 3GPP PM Mapper maps an NR Type-A file and publish 3gpp perf VES evnets to message router.
+ [Timeout] 1 minute
+ ${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
+ 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
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter
+
*** Keywords ***
SendToDatarouter