-
Notifications
You must be signed in to change notification settings - Fork 0
/
args.py
65 lines (64 loc) · 1.29 KB
/
args.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import argparse
import sys
argparser = argparse.ArgumentParser(add_help=False)
argparser.add_argument(
"--help", dest="help", action="store_true", help="Displays this message."
)
argparser.add_argument(
"-U",
"--username",
dest="username",
metavar="<USERNAME>",
help="Username to connect to database.",
)
argparser.add_argument(
"-P",
"--password",
dest="password",
metavar="<PASSWORD>",
help="Password to connect to database.",
)
argparser.add_argument(
"-h",
"--host",
dest="host",
default="127.0.0.1",
metavar="<ADDRESS>",
help="Address of Aerospike server.",
)
argparser.add_argument(
"-p",
"--port",
dest="port",
type=int,
default=3000,
metavar="<PORT>",
help="Port of the Aerospike server.",
)
argparser.add_argument(
"-n",
"--namespace",
dest="namespace",
default="test",
metavar="<NS>",
help="Namespace name to use",
)
argparser.add_argument(
"-s",
"--set",
dest="set",
default="summit",
metavar="<SET>",
help="Set name to use.",
)
argparser.add_argument(
"--services-alternate",
dest="alternate",
action="store_true",
help="Use services alternate",
)
options = argparser.parse_args()
if options.help:
argparser.print_help()
print()
sys.exit()