mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 03:19:48 +00:00
Sort collective members
Improve consistency of output by sorting the output.
This commit is contained in:
parent
433a22e6e7
commit
872a13589c
@ -6,6 +6,7 @@ import os
|
||||
import pwd
|
||||
import socket
|
||||
import subprocess
|
||||
import sortutil
|
||||
import sys
|
||||
|
||||
path = os.path.dirname(os.path.realpath(__file__))
|
||||
@ -107,11 +108,11 @@ def show_collective():
|
||||
if 'active' in res['collective']:
|
||||
if res['collective']['active']:
|
||||
print('Active collective members:')
|
||||
for member in res['collective']['active']:
|
||||
for member in sortutil.natural_sort(res['collective']['active']):
|
||||
print(' {0}'.format(member))
|
||||
if res['collective']['offline']:
|
||||
print('Offline collective members:')
|
||||
for member in res['collective']['offline']:
|
||||
for member in sortutil.natural_sort(res['collective']['offline']):
|
||||
print(' {0}'.format(member))
|
||||
else:
|
||||
print('Run collective show on leader for more data')
|
||||
|
Loading…
Reference in New Issue
Block a user