Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- from optparse import OptionParser
- import libmanage
- def main():
- parser = OptionParser("usage: %prog [options] command args")
- """parser.add_option("-f", "--file", dest="filename",
- help="read data from FILENAME")
- parser.add_option("-v", "--verbose",
- action="store_true", dest="verbose")
- parser.add_option("-q", "--quiet",
- action="store_false", dest="verbose")"""
- (options, args) = parser.parse_args()
- if args[0] == 'addon':
- addon = libmanage.Addon()
- if args[1] == 'get':
- addon.get(args[2], args[3])
- elif args[1] == 'scan':
- addon.generateInstallData(args[2])
- elif args[0] == 'server':
- server = libmanage.Server()
- if args[1] == 'deploy':
- server.deploy(args[2], args[3], args[4], args[5])
- elif args[1] == 'start':
- server.start(args[2])
- elif args[2] == 'stop':
- server.stop(args[2])
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement