summaryrefslogtreecommitdiff
path: root/clusterman/commands
diff options
context:
space:
mode:
authorLoic Guegan <loic.guegan@mailbox.org>2023-10-26 14:28:11 +0200
committerLoic Guegan <loic.guegan@mailbox.org>2023-10-26 14:28:11 +0200
commit20d4f6f28fcaafe8b10bf82e5302180d6d3bc115 (patch)
tree97061aaee95124cf6541451f758a2aca97f15d8d /clusterman/commands
parentd79342a340c7025f675df45a180866b47e43fec7 (diff)
Minor changes
Diffstat (limited to 'clusterman/commands')
-rw-r--r--clusterman/commands/node.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/clusterman/commands/node.py b/clusterman/commands/node.py
index 54de67c..eb32d50 100644
--- a/clusterman/commands/node.py
+++ b/clusterman/commands/node.py
@@ -3,7 +3,16 @@ from clusterman.config import CONF
def ls():
- print("List nodes..")
+ nodes_path=CONF["paths"]["nodes"]
+ nodes=None
+ if os.path.exists(nodes_path):
+ with open(nodes_path) as f:
+ nodes=json.load(f)
+ else:
+ print("Please perform a scan before")
+ exit(0)
+ for node in nodes:
+ print(node)
def scan(timeout):