From edd9bf38c3f07f5fdb6714e7f66515820c736d2e Mon Sep 17 00:00:00 2001 From: Adam King Date: Thu, 18 Nov 2021 19:43:35 -0500 Subject: [PATCH] mgr/orchestrator: add filtering and count option for orch host ls Filter orch host ls output for only hosts whose name contains a certain substring or who have a certain label Add a count flag that causes the command to return the number of hosts found (either overall or matching the substring and/or label) instead of a list of all the matching hosts Fixes: https://tracker.ceph.com/issues/47774 Fixes: https://tracker.ceph.com/issues/53452 Signed-off-by: Adam King --- doc/cephadm/host-management.rst | 8 +++++++- src/pybind/mgr/orchestrator/module.py | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/cephadm/host-management.rst b/doc/cephadm/host-management.rst index c10e372f7be..f342558fafc 100644 --- a/doc/cephadm/host-management.rst +++ b/doc/cephadm/host-management.rst @@ -8,7 +8,13 @@ To list hosts associated with the cluster: .. prompt:: bash # - ceph orch host ls [--format yaml] + ceph orch host ls [--format yaml] [--host-pattern ] [--label