summaryrefslogtreecommitdiff
path: root/clusterman
diff options
context:
space:
mode:
Diffstat (limited to 'clusterman')
-rw-r--r--clusterman/__main__.py11
-rw-r--r--clusterman/commands/__init__.py0
-rw-r--r--clusterman/commands/node.py6
3 files changed, 16 insertions, 1 deletions
diff --git a/clusterman/__main__.py b/clusterman/__main__.py
index 1705df1..ee05623 100644
--- a/clusterman/__main__.py
+++ b/clusterman/__main__.py
@@ -1,8 +1,9 @@
import argparse,sys
+from clusterman.commands import node
def main():
parser = argparse.ArgumentParser()
- subparsers = parser.add_subparsers(help='Target')
+ subparsers = parser.add_subparsers(dest="command", help='Target')
cmd_node = subparsers.add_parser("node")
cmd_frontend = subparsers.add_parser("frontend")
@@ -12,6 +13,14 @@ def main():
sys.exit(1)
# Parse arguments:
args = parser.parse_args()
+
+ # Run the proper handler
+ if args.command == "node":
+ print("Do node related stuff")
+
+ if args.command == "frontend":
+ print("Do frontend related stuff")
+
diff --git a/clusterman/commands/__init__.py b/clusterman/commands/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/clusterman/commands/__init__.py
diff --git a/clusterman/commands/node.py b/clusterman/commands/node.py
new file mode 100644
index 0000000..7844301
--- /dev/null
+++ b/clusterman/commands/node.py
@@ -0,0 +1,6 @@
+
+
+
+
+def ls():
+ print("List nodes..")