-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathzztest.py
More file actions
executable file
·54 lines (33 loc) · 1.15 KB
/
zztest.py
File metadata and controls
executable file
·54 lines (33 loc) · 1.15 KB
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
#!/usr/bin/env python
__authors__ = 'Mike Fitzpatrick <fitz@noao.edu>'
__version__ = 'v1.0.0'
import optparse
import redis
import specClient as spec
SERVICE_URL = "http://127.0.0.1:6999"
DEBUG = True
#####################################
# Local User Utility procedures
#####################################
# Application MAIN
#
if __name__ == '__main__':
# Parse the arguments
parser = optparse.OptionParser()
parser.add_option ('--cmd', '-c', action="store", dest="cmd",
help="Test command", default="init")
parser.add_option ('--user', '-u', action="store", dest="user",
help="User name", default="demo")
parser.add_option ('--password', '-p', action="store", dest="passwd",
help="User password", default="dldemo")
options, args = parser.parse_args()
if DEBUG:
print ("test opts: cmd = " + options.cmd)
for a in args:
print ("arg: " + a)
if options.cmd == 'init': # INIT
pass
elif options.cmd == 'ping': # PING
pass
else:
print ("Error: Unknown command '" + options.cmd + "'")