mirror of
https://gitlab.com/manzerbredes/clusterman.git
synced 2025-04-07 04:26:25 +02:00
30 lines
672 B
Python
30 lines
672 B
Python
import argparse,sys
|
|
from clusterman.config import *
|
|
from clusterman.commands import node
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser()
|
|
subparsers = parser.add_subparsers(dest="command", help='Target')
|
|
cmd_node = subparsers.add_parser("node")
|
|
cmd_frontend = subparsers.add_parser("frontend")
|
|
|
|
# Check if command specified:
|
|
if len(sys.argv)==1:
|
|
parser.print_help(sys.stderr)
|
|
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")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|