diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-25 15:46:27 +0200 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-25 15:46:27 +0200 |
| commit | caa032a09de387d44e814e73d345c1955f80d8b1 (patch) | |
| tree | 8b5361d474e90c0ea3840292db2d50a078092c1f /clusterman | |
| parent | fc6bcbd09503be757cd0549a105a0b505c5cd746 (diff) | |
Minor changes
Diffstat (limited to 'clusterman')
| -rw-r--r-- | clusterman/__main__.py | 11 | ||||
| -rw-r--r-- | clusterman/commands/__init__.py | 0 | ||||
| -rw-r--r-- | clusterman/commands/node.py | 6 |
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..") |
