Merge "Remove csit related to components which are not in Guilin Release"
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 d826157..8d42d62 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 @@
         </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 439d576..9c1b985 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/valid_metadata.json b/tests/dcaegen2-pmmapper/pmmapper/assets/new_radio/valid_metadata.json
index 4c5c84f..f75adb8 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 0000000..5cd7146
--- /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 96d33a8..0b18320 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -31,6 +31,7 @@
 ${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
 
@@ -39,7 +40,7 @@
 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}           Response code: 200, Server Response Received
 
 Verify Health Check returns 200 when a REST GET request to healthcheck url
     [Tags]                          PM_MAPPER_02
@@ -138,6 +139,22 @@
     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
+
+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": *****
+
 *** Keywords ***
 
 SendToDatarouter
@@ -164,4 +181,4 @@
 
 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}