]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orchestrator: streamline 'orch ps' PORTS formatting
authorSage Weil <sage@newdream.net>
Tue, 23 Mar 2021 21:18:56 +0000 (17:18 -0400)
committerSage Weil <sage@newdream.net>
Fri, 23 Apr 2021 12:24:13 +0000 (07:24 -0500)
"*:8000 *:8100" -> "*:8000,8100"

FWIW this matches the internal rendering used by DaemonPlacement

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f93c555c24336003770c182a4e3ccaae392c2d47)

src/pybind/mgr/orchestrator/_interface.py

index 04e19027ee4f1ae891be49c450cc53884bbf4b21..adb2eb12671c5fff95363868e26a0e8439484557 100644 (file)
@@ -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)