diff options
Diffstat (limited to 'clusterman/commands/node.py')
| -rw-r--r-- | clusterman/commands/node.py | 5 |
1 files changed, 2 insertions, 3 deletions
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() |
