Skip to content

Commit

Permalink
mgr/orchestrator: add --refresh to ceph orchestrator service ls
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
tserong committed Jul 25, 2019
1 parent e2bebee commit d5e320a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pybind/mgr/orchestrator_cli/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,14 @@ def _list_devices(self, host=None, format='plain', refresh=False):
"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
Expand Down

0 comments on commit d5e320a

Please sign in to comment.