From 9d1fe3b046787d35a7030c2dbb1391b7ac398d49 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 31 Oct 2023 16:30:19 +0100 Subject: Minor changes --- clusterman/commands/node.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clusterman/commands') diff --git a/clusterman/commands/node.py b/clusterman/commands/node.py index 1b5a2ed..fba42ec 100644 --- a/clusterman/commands/node.py +++ b/clusterman/commands/node.py @@ -4,7 +4,6 @@ import clusterman.utils as utils def ls(group=None): - nodes_path=CONF.NODE_FILE nodes=utils.get_node_list() if len(nodes)<=0: print("Please perform a scan before") @@ -21,7 +20,7 @@ def scan(timeout): from_split=[int(n) for n in CONF["cluster"]["ip4_from"].split(".")] to_split=[int(n) for n in CONF["cluster"]["ip4_to"].split(".")] ignore_list=[ip.strip(" ") for ip in CONF["cluster"]["ip4_ignore"]] - nodes=list() + nodes=dict() print("----- Starting node scan (timeout={}s) -----".format(timeout)) for W in range(from_split[0],to_split[0]+1): for X in range(from_split[1],to_split[1]+1): @@ -33,7 +32,7 @@ def scan(timeout): continue print("Contacting {}...".format(ip),end='') if not utils.ping_test(ip): - nodes.append(ip) + nodes[ip]={"hostname":""} print("=> Found!!") else: print() -- cgit v1.2.3