From 98ed0327558d259097cfa91c696d5a20a9cbbc53 Mon Sep 17 00:00:00 2001 From: Lasse Kaihlavirta Date: Thu, 27 May 2021 14:51:45 +0300 Subject: Remove obsolete PM-Mapper CSITs - the tests have moved to dcaegen2/services/pm-mapper repo Issue-ID: DCAEGEN2-2796 Signed-off-by: Lasse Kaihlavirta Change-Id: I398edd1c0bfa53aaa719c3f3a380505c7366bdf7 --- .../__init__.robot | 2 - .../assets/.gitattributes | 1 - .../assets/ABigFile.xml | 163 ----------------- .../assets/config_10_1.env | 3 - .../assets/config_1_1.env | 3 - .../assets/config_1_10.env | 3 - .../assets/valid_metadata.json | 12 -- .../files-processing-config-pmmapper.robot | 148 --------------- .../libraries/DockerContainerManager.py | 29 --- .../libraries/EnvsReader.py | 11 -- .../libraries/LogReader.py | 22 --- tests/dcaegen2-pmmapper/pmmapper/__init__.robot | 2 - .../pmmapper/assets/.gitattributes | 1 - .../assets/A20181002.0000-1000-0015-1000_5G.xml | 88 --------- .../assets/A20181002.0000-1000-0015-1000_5G.xml.gz | Bin 959 -> 0 bytes .../pmmapper/assets/A_no_managed_element.xml | 27 --- .../pmmapper/assets/A_no_measdata.xml | 11 -- .../pmmapper/assets/C20190328.0000-0015.xml | 49 ----- .../pmmapper/assets/diff_vendor_metadata.json | 12 -- .../new_radio/A20181004.0000-1000-0015-1000_5G.xml | 88 --------- .../assets/new_radio/C20190329.0000-0015.xml | 49 ----- ...01+020024C202007171207+0200-1215+0200_45678.xml | 88 --------- .../pmmapper/assets/new_radio/valid_metadata.json | 12 -- .../pmmapper/assets/pm_filter_config.json | 42 ----- .../pmmapper/assets/pm_filter_regex_config.json | 42 ----- .../pmmapper/assets/valid_metadata.json | 12 -- .../pmmapper/assets/vendor_filter_config.json | 42 ----- tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot | 200 --------------------- 28 files changed, 1162 deletions(-) delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/__init__.robot delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/.gitattributes delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/ABigFile.xml delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_10_1.env delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_1.env delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_10.env delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/valid_metadata.json delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/files-processing-config-pmmapper.robot delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/DockerContainerManager.py delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/EnvsReader.py delete mode 100644 tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/LogReader.py delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/__init__.robot delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/A_no_managed_element.xml delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/A_no_measdata.xml delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/C20190328.0000-0015.xml delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/A20181004.0000-1000-0015-1000_5G.xml delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.xml delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/PM202007171301+020024C202007171207+0200-1215+0200_45678.xml delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json delete mode 100644 tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot (limited to 'tests') diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/__init__.robot b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/__init__.robot deleted file mode 100644 index 9eda6de0..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -*** Settings *** -Documentation Files Processing Config PM Mapper Testcases diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/.gitattributes b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/.gitattributes deleted file mode 100644 index 57cdc503..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.gz binary diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/ABigFile.xml b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/ABigFile.xml deleted file mode 100644 index 8a3bcf4d..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/ABigFile.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - attTCHSeizures - succTCHSeizures - attImmediateAssignProcs - succImmediateAssignProcs - - 234 - 345 - 567 - 789 - - - 890 - 901 - 123 - 234 - - - 456 - 567 - 678 - 789 - true - - - - - - - attTCHSeizures1 - succTCHSeizures2 - attImmediateAssignProcs3 - succImmediateAssignProcs4 - - 4 - 86,87,2,6,77,96,75,33,24 - 40 - 90 - false - - - - - - - attTCHSeizures5 - succTCHSeizures6 - attImmediateAssignProcs7 - succImmediateAssignProcs8 - - 238 - 344 - 563 - 787 - - - 898 - 905 - 127 - 238 - - - 454 - 569 - 672 - 785 - true - - - - - - - - - - attTCHSeizures - succTCHSeizures - attImmediateAssignProcs - succImmediateAssignProcs - - 234 - 345 - 567 - 789 - - - 890 - 901 - 123 - 234 - - - 456 - 567 - 678 - 789 - true - - - - - - - attTCHSeizures1 - succTCHSeizures2 - attImmediateAssignProcs3 - succImmediateAssignProcs4 - - 4 - 86,87,2,6,77,96,75,33,24 - 40 - 90 - false - - - - - - - attTCHSeizures5 - succTCHSeizures6 - attImmediateAssignProcs7 - succImmediateAssignProcs8 - - 238 - 344 - 563 - 787 - - - 898 - 905 - 127 - 238 - - - 454 - 569 - 672 - 785 - true - - - - - - - diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_10_1.env b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_10_1.env deleted file mode 100644 index 050d2f2a..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_10_1.env +++ /dev/null @@ -1,3 +0,0 @@ -PROCESSING_LIMIT_RATE=10 -THREADS_MULTIPLIER=1 -PROCESSING_THREADS_COUNT=1 diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_1.env b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_1.env deleted file mode 100644 index c138912b..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_1.env +++ /dev/null @@ -1,3 +0,0 @@ -PROCESSING_LIMIT_RATE=1 -THREADS_MULTIPLIER=1 -PROCESSING_THREADS_COUNT=1 diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_10.env b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_10.env deleted file mode 100644 index b4c290e8..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_10.env +++ /dev/null @@ -1,3 +0,0 @@ -PROCESSING_LIMIT_RATE=1 -THREADS_MULTIPLIER=1 -PROCESSING_THREADS_COUNT=10 diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/valid_metadata.json b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/valid_metadata.json deleted file mode 100644 index da809d7b..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/valid_metadata.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "productName": "gnb", - "vendorName": "Ericsson", - "lastEpochMicrosec": "1538478000000", - "sourceName": "oteNB5309", - "startEpochMicrosec": "1538478900000", - "timeZoneOffset": "UTC+05.00", - "location": "ftpes://192.168.0.101:22/ftp/rop/A20161224.1045-1100.bin.gz", - "compression": "gzip", - "fileFormatType": "org.3GPP.32.435#measCollec", - "fileFormatVersion": "V9" - } \ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/files-processing-config-pmmapper.robot b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/files-processing-config-pmmapper.robot deleted file mode 100644 index 09a7de4f..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/files-processing-config-pmmapper.robot +++ /dev/null @@ -1,148 +0,0 @@ -*** Settings *** -Documentation Testing PM Mapper functionality -Library Collections -Library OperatingSystem -Library RequestsLibrary -Library Process -Library String -Library libraries/DockerContainerManager.py -Library libraries/LogReader.py - -*** Variables *** - -${NR_VALID_METADATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/valid_metadata.json -${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 -${CLI_EXEC_LOGS_LIST} docker exec datarouter-node /bin/sh -c "ls /opt/app/datartr/logs" -${DOCKER_CLIENT_IMAGE} nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:latest -${CLIENT_CONTAINER_NAME} pmmapper -${FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/ABigFile.xml -${CONFIG_ENVS_1_1} %{WORKSPACE}/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_1.env -${CONFIG_ENVS_4_1} %{WORKSPACE}/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_4_1.env -${CONFIG_ENVS_10_1} %{WORKSPACE}/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_10_1.env -${CONFIG_ENVS_1_10} %{WORKSPACE}/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/assets/config_1_10.env - -*** Test Cases *** - -Verify that PM Mapper rejects 6-9 messages when limitRate is 1 and threads count is 1 - [Tags] FILES_PROCESSING_CONFIG_PM_MAPPER_1 - [Documentation] Verify that PM Mapper rejects 6-9/10 messages. Configuration: limitRate=1, threadsCount=1 - [Timeout] 15 minute - - RestartPmmapper ${CONFIG_ENVS_1_1} - - ${testname}= Set Variable Afirst- - - SendFilesToDatarouter ${testname} - ${alllogs}= GetLogsOutput - ${filtered_logs}= GetFilteredLogs ${alllogs} ${testname} - ${dropped_nr}= GetDroppedNumber ${filtered_logs} - - Sleep 40s - ${isCorrectDroppedCount}= Evaluate ${5} < ${dropped_nr} < ${10} - SavePmMapperLogsAndDroppedCount config_1_1 ${dropped_nr} - Should Be True ${isCorrectDroppedCount} Pm-mapper drop: ${dropped_nr} messages. Expected drop count: 6-9 - ClearLogs - -Verify that PM Mapper rejects 0 messages when limitRate is 10 and threads count is 1 - [Tags] FILES_PROCESSING_CONFIG_PM_MAPPER_2 - [Documentation] Verify that PM Mapper rejects 0/10 messages. Configuration: limitRate=10, threadsCount=1 - [Timeout] 25 minute - - RestartPmmapper ${CONFIG_ENVS_10_1} - - ${testname}= Set Variable Athird- - - SendFilesToDatarouter ${testname} - ${alllogs}= GetLogsOutput - ${filtered_logs}= GetFilteredLogs ${alllogs} ${testname} - ${dropped_nr}= GetDroppedNumber ${filtered_logs} - - Sleep 15s - SavePmMapperLogsAndDroppedCount config_10_1 ${dropped_nr} - Should Be Equal As Numbers ${dropped_nr} 0 Pm-mapper drop: ${dropped_nr} messages. Expected drop count: 0 - ClearLogs - -Verify that PM Mapper rejects 0 messages when limitRate is 1 and threads count is 10 - [Tags] FILES_PROCESSING_CONFIG_PM_MAPPER_3 - [Documentation] Verify that PM Mapper rejects 0/10 messages. Configuration: limitRate=1, threadsCount=10 - [Timeout] 25 minute - - RestartPmmapper ${CONFIG_ENVS_1_10} - - ${testname}= Set Variable Afourth- - - SendFilesToDatarouter ${testname} - ${alllogs}= GetLogsOutput - ${filtered_logs}= GetFilteredLogs ${alllogs} ${testname} - ${dropped_nr}= GetDroppedNumber ${filtered_logs} - - Sleep 15s - SavePmMapperLogsAndDroppedCount config_1_10 ${dropped_nr} - Should Be Equal As Numbers ${dropped_nr} 0 Pm-mapper drop: ${dropped_nr} messages. Expected drop count: 0 - ClearLogs - -*** Keywords *** - -SendFilesToDatarouter - [Arguments] ${testnr} - FOR ${i} IN RANGE 10 - SendToDatarouter ${FILE_PATH} ${NR_VALID_METADATA_PATH} X-ONAP-RequestID=${i} ${testnr} ${i} - END - Sleep 20s - -SendToDatarouter - [Arguments] ${filepath} ${metadatapath} ${request_id} ${testnr} ${i} - ${pmdata}= Get File ${filepath} - ${metatdata} Get File ${metadatapath} - ${newFilename} Catenate SEPARATOR= ${testnr} ${i} .xml - ${resp}= PutCall ${PUBLISH_NODE_URL}/${newFilename} ${request_id} ${pmdata} ${metatdata.replace("\n","")} pmmapper - VerifyResponse ${resp.status_code} 204 - -PutCall - [Arguments] ${url} ${request_id} ${data} ${meta} ${user} - ${headers}= Create Dictionary X-ONAP-RequestID=${request_id} X-DMAAP-DR-META=${meta} Content-Type=application/octet-stream X-DMAAP-DR-ON-BEHALF-OF=${user} Authorization=Basic cG1tYXBwZXI6cG1tYXBwZXI= - ${resp}= Evaluate requests.put('${url}', data="""${data}""", headers=${headers}, verify=False, allow_redirects=False) requests - [Return] ${resp} - -VerifyResponse - [Arguments] ${actual_response_value} ${expected_response_value} - Should Be Equal As Strings ${actual_response_value} ${expected_response_value} - -ClearLogs - Run Process ${CLI_EXEC_CLI_PM_LOG_CLEAR} shell=yes - -GetLogsOutput - ${filesString}= Run Process ${CLI_EXEC_LOGS_LIST} shell=yes - ${filesList}= Get Log Files List ${filesString.stdout} - ${output}= Set Variable ${EMPTY} - FOR ${file} IN @{filesList} - ${file_path}= Catenate SEPARATOR= "cat /opt/app/datartr/logs/ ${file} " - ${exec}= Catenate docker exec datarouter-node /bin/sh -c ${file_path} - ${single_file}= Run Process ${exec} shell=yes - ${output}= Catenate SEPARATOR=\n ${output} ${single_file.stdout} - END - [Return] ${output} - -GetFilteredLogs - [Arguments] ${all_logs} ${testname} - ${filtered_logs}= Filter Unique ${all_logs} ${testname} - [Return] ${filtered_logs} - -GetDroppedNumber - [Arguments] ${logs_output} - ${number}= Get Number Of Dropped Messages ${logs_output} - [Return] ${number} - -RestartPmmapper - [Arguments] ${envs} - Remove Container ${CLIENT_CONTAINER_NAME} - Sleep 5s - Run Pmmapper Container ${DOCKER_CLIENT_IMAGE} ${CLIENT_CONTAINER_NAME} ${envs} ${DR_NODE_IP} ${NODE_IP} - Sleep 15s - -SavePmMapperLogsAndDroppedCount - [Arguments] ${test_name} ${dropped_count} - Run Process echo "Dropped: ${dropped_count}" > %{WORKSPACE}/archives/${test_name}_dropped_count.log shell=yes - Run Process docker logs ${CLIENT_CONTAINER_NAME} > %{WORKSPACE}/archives/${test_name}_pm_mapper_container_logs.log shell=yes - diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/DockerContainerManager.py b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/DockerContainerManager.py deleted file mode 100644 index 3e3ae58e..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/DockerContainerManager.py +++ /dev/null @@ -1,29 +0,0 @@ -import docker -from EnvsReader import EnvsReader -from docker.types import Mount - -class DockerContainerManager: - - def run_pmmapper_container(self, client_image, container_name, path_to_env, dr_node_ip, mr_ip): - client = docker.from_env() - environment = EnvsReader().read_env_list_from_file(path_to_env) - environment.append("CONFIG_BINDING_SERVICE_SERVICE_HOST=172.18.0.5") - environment.append("CONFIG_BINDING_SERVICE_SERVICE_PORT=10000") - environment.append("HOSTNAME=pmmapper") - client.containers.run( - image=client_image, - name=container_name, - environment=environment, - ports={'8081': 8081}, - network='filesprocessingconfigpmmapper_pmmapper-network', - extra_hosts={'dmaap-dr-node': dr_node_ip, 'message-router': mr_ip}, - user='root', - mounts=[Mount(target='/opt/app/pm-mapper/etc/certs/', source='/var/tmp/', type='bind')], - detach=True - ) - - def remove_container(self, container_name): - client = docker.from_env() - container = client.containers.get(container_name) - container.stop() - container.remove() diff --git a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/EnvsReader.py b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/EnvsReader.py deleted file mode 100644 index cc60eed6..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/EnvsReader.py +++ /dev/null @@ -1,11 +0,0 @@ - -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/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/LogReader.py b/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/LogReader.py deleted file mode 100644 index 01718e35..00000000 --- a/tests/dcaegen2-pmmapper/files-processing-config-pmmapper/libraries/LogReader.py +++ /dev/null @@ -1,22 +0,0 @@ -import re - -class LogReader: - - def filter_unique(self, merged_logs_output, testname): - logs = merged_logs_output.splitlines() - del_logs = list(filter(lambda line: "|DEL|" in line, logs)) - nrs_set = set() - ret_logs = set() - for log in del_logs: - filename = re.findall(testname + "\d", log) - if len(filename) > 0 and filename[0] not in nrs_set: - ret_logs.add(log) - nrs_set.add(filename[0]) - return ret_logs - - def get_number_of_dropped_messages(self, logs_output): - return len(list(filter(lambda line: "|429|" in line, logs_output))) - - def get_log_files_list(self, fileNames): - files = fileNames.split() - return files diff --git a/tests/dcaegen2-pmmapper/pmmapper/__init__.robot b/tests/dcaegen2-pmmapper/pmmapper/__init__.robot deleted file mode 100644 index 3e4501c2..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -*** Settings *** -Documentation PM Mapper Testcases diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes b/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes deleted file mode 100644 index 57cdc503..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.gz binary diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml deleted file mode 100644 index fadc8a65..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - attTCHSeizures - succTCHSeizures - attImmediateAssignProcs - succImmediateAssignProcs - - 234 - 345 - 567 - 789 - - - 890 - 901 - 123 - 234 - - - 456 - 567 - 678 - 789 - true - - - - - - - attTCHSeizures1 - succTCHSeizures2 - attImmediateAssignProcs3 - succImmediateAssignProcs4 - - 4 - 86,87,2,6,77,96,75,33,24 - 40 - 90 - false - - - - - - - attTCHSeizures5 - succTCHSeizures6 - attImmediateAssignProcs7 - succImmediateAssignProcs8 - - 238 - 344 - 563 - 787 - - - 898 - 905 - 127 - 238 - - - 454 - 569 - 672 - 785 - true - - - - - - - diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz deleted file mode 100644 index 32865fc1..00000000 Binary files a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz and /dev/null differ diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_managed_element.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_managed_element.xml deleted file mode 100644 index 23e5c215..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_managed_element.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - a - b - c - - 86 - 67 - 14 - false - - - - - - - \ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_measdata.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_measdata.xml deleted file mode 100644 index 855b2e91..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_measdata.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/C20190328.0000-0015.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/C20190328.0000-0015.xml deleted file mode 100644 index b6a3b436..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/C20190328.0000-0015.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - z1 a1 zz1 b1 - - 1 11 111 1111 - false - - - - - - - - - - z2 a2 zz2 b2 - - 2 22 222 2222 - false - - - - - - - - - - z3 a3 zz3 b3 - - 3 33 333 3333 - false - - - - - - - diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json b/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json deleted file mode 100644 index 0abf8e3e..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "productName": "gnb", - "vendorName": "Anon", - "lastEpochMicrosec": "1538478000000", - "sourceName": "oteNB5309", - "startEpochMicrosec": "1538478900000", - "timeZoneOffset": "UTC+05.00", - "location": "ftpes://192.168.0.101:22/ftp/rop/A20161224.1045-1100.bin.gz", - "compression": "gzip", - "fileFormatType": "org.3GPP.32.435#measCollec", - "fileFormatVersion": "V9" - } \ No newline at end of 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 deleted file mode 100644 index 8d42d62c..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/A20181004.0000-1000-0015-1000_5G.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - attTCHSeizures - succTCHSeizures - attImmediateAssignProcs - succImmediateAssignProcs - - 234 - 345 - 567 - 789 - - - 890 - 901 - 123 - 234 - - - 456 - 567 - 678 - 789 - true - - - - - - - attTCHSeizures1 - succTCHSeizures2 - attImmediateAssignProcs3 - succImmediateAssignProcs4 - - 4 - 86,87,2,6,77,96,75,33,24 - 40 - 90 - false - - - - - - - attTCHSeizures5 - succTCHSeizures6 - attImmediateAssignProcs7 - succImmediateAssignProcs8 - - 238 - 344 - 563 - 787 - - - 898 - 905 - 127 - 238 - - - 454 - 569 - 672 - 785 - true - - - - - - - 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 deleted file mode 100644 index 9c1b9857..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/C20190329.0000-0015.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - z1 a1 zz1 b1 - - 1 11 111 1111 - false - - - - - - - - - - attTCHSeizures succTCHSeizures2 zz2 b2 - - 2 22 222 2222 - false - - - - - - - - - - z3 a3 zz3 succImmediateAssignProcs8 - - 3 33 333 3333 - false - - - - - - - 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 deleted file mode 100644 index 8d42d62c..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/PM202007171301+020024C202007171207+0200-1215+0200_45678.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - attTCHSeizures - succTCHSeizures - attImmediateAssignProcs - succImmediateAssignProcs - - 234 - 345 - 567 - 789 - - - 890 - 901 - 123 - 234 - - - 456 - 567 - 678 - 789 - true - - - - - - - attTCHSeizures1 - succTCHSeizures2 - attImmediateAssignProcs3 - succImmediateAssignProcs4 - - 4 - 86,87,2,6,77,96,75,33,24 - 40 - 90 - false - - - - - - - attTCHSeizures5 - succTCHSeizures6 - attImmediateAssignProcs7 - succImmediateAssignProcs8 - - 238 - 344 - 563 - 787 - - - 898 - 905 - 127 - 238 - - - 454 - 569 - 672 - 785 - true - - - - - - - diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json deleted file mode 100644 index f75adb84..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "productName": "gnb", - "vendorName": "Ericsson", - "lastEpochMicrosec": "1538478000000", - "sourceName": "oteNB5309", - "startEpochMicrosec": "1538478900000", - "timeZoneOffset": "UTC+05.00", - "location": "ftpes://192.168.0.101:22/ftp/rop/A20161224.1045-1100.bin.gz", - "compression": "gzip", - "fileFormatType": "org.3GPP.28.532#measData", - "fileFormatVersion": "V9" -} diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json b/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json deleted file mode 100644 index 79e3f98e..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "pm-mapper-filter": { - "filters":[{ - "pmDefVsn": "1.0", - "nfType": "gnb", - "vendor": "Ericsson", - "measTypes": ["attTCHSeizures","succTCHSeizures2","succImmediateAssignProcs8"] - }] - }, - "key_store_path": "/opt/app/pm-mapper/etc/cert.jks", - "key_store_pass_path": "/opt/app/pm-mapper/etc/jks.pass", - "trust_store_path": "/opt/app/pm-mapper/etc/trust.jks", - "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/assets/pm_filter_regex_config.json b/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json deleted file mode 100644 index 5cd7146e..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_regex_config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "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/assets/valid_metadata.json b/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json deleted file mode 100644 index da809d7b..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "productName": "gnb", - "vendorName": "Ericsson", - "lastEpochMicrosec": "1538478000000", - "sourceName": "oteNB5309", - "startEpochMicrosec": "1538478900000", - "timeZoneOffset": "UTC+05.00", - "location": "ftpes://192.168.0.101:22/ftp/rop/A20161224.1045-1100.bin.gz", - "compression": "gzip", - "fileFormatType": "org.3GPP.32.435#measCollec", - "fileFormatVersion": "V9" - } \ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json b/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json deleted file mode 100644 index 94d0911b..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "pm-mapper-filter": { - "filters":[{ - "pmDefVsn": "1.0", - "nfType": "gnb", - "vendor": "Ericsson", - "measTypes": [] - }] - }, - "key_store_path": "/opt/app/pm-mapper/etc/cert.jks", - "key_store_pass_path": "/opt/app/pm-mapper/etc/jks.pass", - "trust_store_path": "/opt/app/pm-mapper/etc/trust.jks", - "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 deleted file mode 100644 index bd02e7ff..00000000 --- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot +++ /dev/null @@ -1,200 +0,0 @@ -*** Settings *** -Documentation Testing PM Mapper functionality -Library Collections -Library OperatingSystem -Library RequestsLibrary -Library Process -Library String - -Test Setup Create Session mapper_session ${PMMAPPER_BASE_URL} -Test Teardown CleanSessionsAndLogs - -*** Variables *** -${CLI_EXEC_CLI_CONFIG} { head -n 100 | tail -50;} < /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 -${HEALTHCHECK_ENDPOINT} /healthcheck -${RECONFIGURE_ENDPOINT} /reconfigure -${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 -${NON_XML_FILE} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json -${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 - - -*** Test Cases *** -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 from ConfigBinding Service - -Verify Health Check returns 200 when a REST GET request to healthcheck url - [Tags] PM_MAPPER_02 - [Documentation] Verify Health Check returns 200 when a REST GET request to healthcheck url - [Timeout] 1 minute - ${resp}= Get Request mapper_session ${HEALTHCHECK_ENDPOINT} - VerifyResponse ${resp.status_code} 200 - -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=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=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=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=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=5 - CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty - 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=6 - CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed - 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=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 - [Tags] PM_MAPPER_08 - [Documentation] Verify 3GPP PM Mapper maps 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 ${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. - [Tags] PM_MAPPER_09 - [Documentation] Verify that PM Mapper correctly identifies a file that should not be mapped based on metadata filtering. - [Timeout] 1 minute - ${cli_cmd_output}= Run Process ${CLI_EXEC_VENDOR_FILTER} shell=yes - 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=9 - CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=9 - CheckLog ${CLI_EXEC_CLI_PM_LOG} Metadata does not match any filters - -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=10 - CheckLog ${CLI_EXEC_CLI_PM_LOG} PM measurement file must have an extension of .xml - 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 - [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 - -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 - [Arguments] ${filepath} ${metadatapath} ${request_id} - ${pmdata}= Get File ${filepath} - ${metatdata} Get File ${metadatapath} - ${filename} Fetch From Right ${filepath} / - ${resp}= PutCall ${PUBLISH_NODE_URL}/${filename} ${request_id} ${pmdata} ${metatdata.replace("\n","")} pmmapper - VerifyResponse ${resp.status_code} 204 - Sleep 10s - -PutCall - [Arguments] ${url} ${request_id} ${data} ${meta} ${user} - ${headers}= Create Dictionary X-ONAP-RequestID=${request_id} X-DMAAP-DR-META=${meta} Content-Type=application/octet-stream X-DMAAP-DR-ON-BEHALF-OF=${user} Authorization=Basic cG1tYXBwZXI6cG1tYXBwZXI= - ${resp}= Evaluate requests.put('${url}', data="""${data}""", headers=${headers}, verify=False, allow_redirects=False) requests - [Return] ${resp} - -CheckLog - [Arguments] ${cli_exec_log_Path} ${string_to_check_in_log} - ${cli_cmd_output}= Run Process ${cli_exec_log_Path} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} ${string_to_check_in_log} - -VerifyResponse - [Arguments] ${actual_response_value} ${expected_response_value} - 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 -- cgit 1.2.3-korg