Skip to content

Commit 310abe4

Browse files
committed
bugfix
1 parent d6f9bba commit 310abe4

File tree

1 file changed

+6
-5
lines changed
  • simulation-system/libs/csle-cli/src/csle_cli

1 file changed

+6
-5
lines changed

simulation-system/libs/csle-cli/src/csle_cli/cli.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1829,17 +1829,18 @@ def list_host_managers(ip: str, emulation: str, ip_first_octet: int) -> None:
18291829
host_manager_info = ClusterController.get_host_managers_info(
18301830
ip=ip, port=constants.GRPC_SERVERS.CLUSTER_MANAGER_PORT, emulation=emulation,
18311831
ip_first_octet=ip_first_octet)
1832-
host_managers = host_manager_info.hostManagersStatuses
1832+
host_managers_running = host_manager_info.hostManagersRunning
1833+
host_managers_ips = host_manager_info.ips
18331834

18341835
click.secho('+' + '-' * 50 + '+', fg='white')
18351836
click.secho(f'|{"Host IP":^30}|{"Running Status":^19}|', fg='white')
18361837
click.secho('+' + '-' * 50 + '+', fg='white')
1837-
for hosts in host_managers:
1838-
status = "Running" if hosts.monitor_running else "Stopped"
1839-
status_color = 'green' if hosts.monitor_running else 'red'
1838+
for i in range(len(host_managers_ips)):
1839+
status = "Running" if host_managers_running[i] else "Stopped"
1840+
status_color = 'green' if host_managers_running[i] else 'red'
18401841

18411842
click.secho('|', nl=False, fg='white')
1842-
click.secho(f'{hosts.ip:<30}', nl=False, fg='white')
1843+
click.secho(f'{host_managers_ips[i]:<30}', nl=False, fg='white')
18431844
click.secho('|', nl=False, fg='white')
18441845
click.secho(f'{status:<19}', nl=False, fg=status_color)
18451846
click.secho('|', fg='white')

0 commit comments

Comments
 (0)