summaryrefslogtreecommitdiffstats
path: root/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py
diff options
context:
space:
mode:
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>2022-01-31 13:03:27 +0100
committerJoanna Jeremicz <joanna.jeremicz@nokia.com>2022-02-11 08:57:40 +0100
commit4ec32437bf1a19bcd55e0dc24c97614a764c8aae (patch)
tree3eb530ed8b6cfc2dc4c23cebdc52197397396134 /csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py
parent25f7419b16e1fc090d65465f2fa1c72662c872bf (diff)
Remove Consul from CSITs
Issue-ID: DCAEGEN2-2964 Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com> Change-Id: I0f21178e938b4e6ad13b9601fdd9cca93e06621c
Diffstat (limited to 'csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py')
-rw-r--r--csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py b/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py
index 01718e3..cc4bf22 100644
--- a/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py
+++ b/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.py
@@ -1,3 +1,22 @@
+# ============LICENSE_START=======================================================
+# org.onap.dcae
+# ================================================================================
+# Copyright (c) 2021-2022 Nokia. 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=========================================================
+#
+
import re
class LogReader:
@@ -14,8 +33,8 @@ class LogReader:
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_number_of_element_occurrences_in_logs(self, logs_output, element):
+ return len(list(filter(lambda line: element in line, logs_output)))
def get_log_files_list(self, fileNames):
files = fileNames.split()