]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/orchestrator: add --refresh to `ceph orchestrator service ls`
authorTim Serong <tserong@suse.com>
Thu, 25 Jul 2019 06:30:04 +0000 (16:30 +1000)
committerTim Serong <tserong@suse.com>
Thu, 25 Jul 2019 10:32:50 +0000 (20:32 +1000)
`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 <tserong@suse.com>
src/pybind/mgr/orchestrator_cli/module.py

index e9982e3019026bd6539b0d2705c8804451351614..7e3d1ed843d4ca0a9d71caa078562041e83b44cc 100644 (file)
@@ -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