]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/stats: Fixing DeprecationWarning for RegEx.
authorNeeraj Pratap Singh <neesingh@redhat.com>
Mon, 27 Jun 2022 10:46:39 +0000 (16:16 +0530)
committerNeeraj Pratap Singh <neesingh@redhat.com>
Mon, 22 Aug 2022 06:02:01 +0000 (11:32 +0530)
Declaring the RegEx pattern as a raw string by prepending `r`.

Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
src/pybind/mgr/stats/fs/perf_stats.py

index 1e071787e0c15b3be6694c2429e92ab780a27e53..db4bd9ed87bfc186769ac9e3fc1a3b20069f1065 100644 (file)
@@ -23,13 +23,13 @@ QUERY_RAW_COUNTERS = "query_raw_counters"
 QUERY_RAW_COUNTERS_GLOBAL = "query_raw_counters_global"
 
 MDS_RANK_ALL = (-1,)
-CLIENT_ID_ALL = "\d*"
+CLIENT_ID_ALL = r"\d*"
 CLIENT_IP_ALL = ".*"
 
 fs_list = [] # type: List[str]
 
 MDS_PERF_QUERY_REGEX_MATCH_ALL_RANKS = '^(.*)$'
-MDS_PERF_QUERY_REGEX_MATCH_CLIENTS = '^(client.{0}\s+{1}):.*'
+MDS_PERF_QUERY_REGEX_MATCH_CLIENTS = r'^(client.{0}\s+{1}):.*'
 MDS_PERF_QUERY_COUNTERS_MAP = OrderedDict({'cap_hit': 0,
                                            'read_latency': 1,
                                            'write_latency': 2,