From 50e40ff5b7529f7900eabdb7c70a11c526690730 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Thu, 25 Jul 2019 16:30:04 +1000 Subject: [PATCH] mgr/orchestrator: add --refresh to `ceph orchestrator service ls` `ceph orchestrator device ls` already supports --refresh to force a reload, we should support this for `ceph orchestrator service ls` as well. Signed-off-by: Tim Serong (cherry picked from commit d5e320ae541cabb2bfdfe20e68fa88233999b63c) --- src/pybind/mgr/orchestrator_cli/module.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/orchestrator_cli/module.py b/src/pybind/mgr/orchestrator_cli/module.py index 22604f0ee8c..458d53a0452 100644 --- a/src/pybind/mgr/orchestrator_cli/module.py +++ b/src/pybind/mgr/orchestrator_cli/module.py @@ -118,13 +118,14 @@ class OrchestratorCli(orchestrator.OrchestratorClientMixin, MgrModule): "name=host,type=CephString,req=false " "name=svc_type,type=CephChoices,strings=mon|mgr|osd|mds|iscsi|nfs|rgw|rbd-mirror,req=false " "name=svc_id,type=CephString,req=false " - "name=format,type=CephChoices,strings=json|plain,req=false", + "name=format,type=CephChoices,strings=json|plain,req=false " + "name=refresh,type=CephBool,req=false", 'List services known to orchestrator') - def _list_services(self, host=None, svc_type=None, svc_id=None, format='plain'): + def _list_services(self, host=None, svc_type=None, svc_id=None, format='plain', refresh=False): # XXX this is kind of confusing for people because in the orchestrator # context the service ID for MDS is the filesystem ID, not the daemon ID - completion = self.describe_service(svc_type, svc_id, host) + completion = self.describe_service(svc_type, svc_id, host, refresh=refresh) self._orchestrator_wait([completion]) orchestrator.raise_if_exception(completion) services = completion.result -- 2.47.3