summaryrefslogtreecommitdiff
path: root/clusterman/commands/node.py
diff options
context:
space:
mode:
authorLoic Guegan <loic.guegan@mailbox.org>2023-10-31 16:30:19 +0100
committerLoic Guegan <loic.guegan@mailbox.org>2023-10-31 16:30:19 +0100
commit9d1fe3b046787d35a7030c2dbb1391b7ac398d49 (patch)
tree56a3c0de9a2e9414c2152ec28f1c574edacade63 /clusterman/commands/node.py
parented8337414c35771fabb8334a7c95decfa6bd762c (diff)
Minor changes
Diffstat (limited to 'clusterman/commands/node.py')
-rw-r--r--clusterman/commands/node.py5
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()