From 7324a430a01cb3a9bd60e22665966fdab3ce6453 Mon Sep 17 00:00:00 2001 From: Ilyas Niyazov Date: Mon, 16 Dec 2024 22:06:00 +0300 Subject: [PATCH] [#338] Added parameter word_count to method get_logs Signed-off-by: Ilyas Niyazov --- src/frostfs_testlib/hosting/docker_host.py | 1 + src/frostfs_testlib/hosting/interfaces.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/frostfs_testlib/hosting/docker_host.py b/src/frostfs_testlib/hosting/docker_host.py index 01dc6b5..d458b0a 100644 --- a/src/frostfs_testlib/hosting/docker_host.py +++ b/src/frostfs_testlib/hosting/docker_host.py @@ -250,6 +250,7 @@ class DockerHost(Host): unit: Optional[str] = None, exclude_filter: Optional[str] = None, priority: Optional[str] = None, + word_count: bool = None, ) -> str: client = self._get_docker_client() filtered_logs = "" diff --git a/src/frostfs_testlib/hosting/interfaces.py b/src/frostfs_testlib/hosting/interfaces.py index 6d1e5da..f58d856 100644 --- a/src/frostfs_testlib/hosting/interfaces.py +++ b/src/frostfs_testlib/hosting/interfaces.py @@ -324,6 +324,7 @@ class Host(ABC): unit: Optional[str] = None, exclude_filter: Optional[str] = None, priority: Optional[str] = None, + word_count: bool = None, ) -> str: """Get logs from host filtered by regex. @@ -334,6 +335,7 @@ class Host(ABC): unit: required unit. priority: logs level, 0 - emergency, 7 - debug. All messages with that code and higher. For example, if we specify the -p 2 option, journalctl will show all messages with levels 2, 1 and 0. + word_count: output type, expected values: lines, bytes, json Returns: Found entries as str if any found. -- 2.45.2