From: Sage Weil Date: Tue, 23 Mar 2021 21:18:56 +0000 (-0400) Subject: mgr/orchestrator: streamline 'orch ps' PORTS formatting X-Git-Tag: v16.2.2~1^2~56 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3f759484ffc1d73aa296e9b89b992dec62167d07;p=ceph.git mgr/orchestrator: streamline 'orch ps' PORTS formatting "*:8000 *:8100" -> "*:8000,8100" FWIW this matches the internal rendering used by DaemonPlacement Signed-off-by: Sage Weil (cherry picked from commit f93c555c24336003770c182a4e3ccaae392c2d47) --- diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index 04e19027ee4f..adb2eb12671c 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -856,9 +856,7 @@ class DaemonDescription(object): def get_port_summary(self) -> str: if not self.ports: return '' - return ' '.join([ - f"{self.ip or '*'}:{p}" for p in self.ports - ]) + return f"{self.ip or '*'}:{','.join(map(str, self.ports or []))}" def name(self) -> str: return '%s.%s' % (self.daemon_type, self.daemon_id)