MCPcopy Create free account
hub / github.com/ceph/ceph / _should_include

Method _should_include

src/pybind/ceph_daemon.py:324–345  ·  view source on GitHub ↗

boolean: should we output this stat? 1) If self._statpats exists and the name filename-glob-matches anything in the list, and prio is high enough, or 2) If self._statpats doesn't exist and prio is high enough then yes.

(self, sect: str, name: str, prio: int)

Source from the content-addressed store, hash-verified

322 ostr.write("{0}\n".format(val_row))
323
324 def _should_include(self, sect: str, name: str, prio: int) -> bool:
325 '''
326 boolean: should we output this stat?
327
328 1) If self._statpats exists and the name filename-glob-matches
329 anything in the list, and prio is high enough, or
330 2) If self._statpats doesn't exist and prio is high enough
331
332 then yes.
333 '''
334 if self._statpats:
335 sectname = '.'.join((sect, name))
336 if not any([
337 p for p in self._statpats
338 if fnmatch(name, p) or fnmatch(sectname, p)
339 ]):
340 return False
341
342 if self._min_prio is not None and prio is not None:
343 return (prio >= self._min_prio)
344
345 return True
346
347 def _load_schema(self) -> None:
348 """

Callers 1

_load_schemaMethod · 0.95

Calls 2

anyClass · 0.85
joinMethod · 0.45

Tested by

no test coverage detected