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

Method list

src/pybind/ceph_daemon.py:415–431  ·  view source on GitHub ↗

Show all selected stats with section, full name, nick, and prio

(self, ostr: TextIO = sys.stdout)

Source from the content-addressed store, hash-verified

413 return
414
415 def list(self, ostr: TextIO = sys.stdout) -> None:
416 """
417 Show all selected stats with section, full name, nick, and prio
418 """
419 table = PrettyTable(('section', 'name', 'nick', 'prio'))
420 table.align['section'] = 'l'
421 table.align['name'] = 'l'
422 table.align['nick'] = 'l'
423 table.align['prio'] = 'r'
424 self._load_schema()
425 assert self._stats is not None
426 assert self._schema is not None
427 for section_name, section_stats in self._stats.items():
428 for name, nick in section_stats.items():
429 prio = self._schema[section_name][name].get('priority') or 0
430 table.add_row((section_name, name, nick, prio))
431 ostr.write(table.get_string(hrules=HEADER) + '\n')

Callers

nothing calls this directly

Calls 5

_load_schemaMethod · 0.95
itemsMethod · 0.45
getMethod · 0.45
writeMethod · 0.45
get_stringMethod · 0.45

Tested by

no test coverage detected