From f93c555c24336003770c182a4e3ccaae392c2d47 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 23 Mar 2021 17:18:56 -0400 Subject: [PATCH] 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 --- src/pybind/mgr/orchestrator/_interface.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index 04e19027ee4..adb2eb12671 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) -- 2.39.5