blob: 8f3c416d081b4d60f83b767856f913b1fa25f94e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
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")
#node.scan("10.0.0.1","10.0.0.10")
node.check()
if args.command == "frontend":
print("Do frontend related stuff")
|