summaryrefslogtreecommitdiff
path: root/clusterman/commands
diff options
context:
space:
mode:
authorLoic Guegan <loic.guegan@mailbox.org>2023-11-20 18:57:52 +0100
committerLoic Guegan <loic.guegan@mailbox.org>2023-11-20 18:57:52 +0100
commita4d3e7134230b02387a8840660eb3de17ff0b88f (patch)
tree57b282d5273d5bd075d5b5b5220492cf42a3e960 /clusterman/commands
parent9d1fe3b046787d35a7030c2dbb1391b7ac398d49 (diff)
Minor changes
Diffstat (limited to 'clusterman/commands')
-rw-r--r--clusterman/commands/frontend.py6
-rw-r--r--clusterman/commands/node.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/clusterman/commands/frontend.py b/clusterman/commands/frontend.py
index 4d7ecc4..6dee9bc 100644
--- a/clusterman/commands/frontend.py
+++ b/clusterman/commands/frontend.py
@@ -1,10 +1,10 @@
import os, json, re
from datetime import datetime
from clusterman.config import CONF
-import clusterman.commands.node as node
+import clusterman.utils as utils
def info():
- nodes=node.get_node_list()
+ nodes=utils.get_node_list()
cache=None
if os.path.exists(CONF.CACHE_FILE):
with open(CONF.CACHE_FILE) as f:
@@ -18,7 +18,7 @@ def info():
if len(CONF["cluster"]["groups"]) > 0:
content=list()
for group in CONF["cluster"]["groups"].keys():
- content.append("{}({})".format(group,len(node.get_node_in_group(group))))
+ content.append("{}({})".format(group,len(utils.get_node_in_group(group))))
print(", ".join(content))
else:
print("NA")
diff --git a/clusterman/commands/node.py b/clusterman/commands/node.py
index fba42ec..057c4d5 100644
--- a/clusterman/commands/node.py
+++ b/clusterman/commands/node.py
@@ -1,6 +1,6 @@
import os, json, time, re, sys, subprocess
from clusterman.config import CONF
-import clusterman.utils as utils
+import clusterman.utils as utils
def ls(group=None):
@@ -61,7 +61,7 @@ def check(timeout):
print("Error: Some of your nodes are not reachable")
def exec(command, group=None):
- nodes=utils.get_node_list() if group is None else get_node_in_group(group)
+ nodes=utils.get_node_list() if group is None else utils.get_node_in_group(group)
for ip in nodes:
print("----- Node {} -----".format(ip))
print(utils.ssh_exec(ip," ".join(command)))