From: Sage Weil Date: Fri, 13 Mar 2020 18:52:50 +0000 (-0500) Subject: mgr/orch: orch ls: show or as appropriate X-Git-Tag: v15.2.0~38^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=01ffd253450defa945db6e18ffe2328810172bd8;p=ceph-ci.git mgr/orch: orch ls: show or as appropriate Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 71fa6d4fd81..f188b49d846 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -356,12 +356,18 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule): table.left_padding_width = 0 table.right_padding_width = 2 for s in sorted(services, key=lambda s: s.service_name): + if not s.spec: + pl = '' + elif s.spec.unmanaged: + pl = '' + else: + pl = s.spec.placement.pretty_str() table.add_row(( s.service_name, '%d/%d' % (s.running, s.size), nice_delta(now, s.last_refresh, ' ago'), nice_delta(now, s.created), - s.spec.placement.pretty_str() if s.spec else '-', + pl, ukn(s.container_image_name), ukn(s.container_image_id)[0:12], ))