Skip to content

Commit

Permalink
SDK-385: SDK support for Quest (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerHarshit authored Feb 13, 2020
1 parent 7188713 commit 75129d8
Show file tree
Hide file tree
Showing 3 changed files with 900 additions and 2 deletions.
13 changes: 11 additions & 2 deletions bin/qds.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from qds_sdk.template import TemplateCmdLine
from qds_sdk.clusterv2 import ClusterCmdLine
from qds_sdk.sensors import *
from qds_sdk.quest import QuestCmdLine
import os
import sys
import traceback
Expand Down Expand Up @@ -88,6 +89,8 @@
" action --help\n"
"\nScheduler subcommand:\n"
" scheduler --help\n"
"\nQuest subcommand:\n"
" quest --help\n"
"\nTemplate subcommand:\n"
" template --help\n"
"\nAccount subcommand:\n"
Expand Down Expand Up @@ -554,6 +557,10 @@ def templatemain(args):
result = TemplateCmdLine.run(args)
print(result)

def questmain(args):
result = QuestCmdLine.run(args)
print(result)


def main():
optparser = OptionParser(usage=usage_str)
Expand Down Expand Up @@ -604,7 +611,7 @@ def main():

optparser.disable_interspersed_args()
(options, args) = optparser.parse_args()

if options.chatty:
logging.basicConfig(level=logging.DEBUG)
elif options.verbose:
Expand Down Expand Up @@ -698,11 +705,13 @@ def main():
return usermain(args)
if a0 == "template":
return templatemain(args)
if a0 == "quest":
return questmain(args)

cmdset = set(CommandClasses.keys())
sys.stderr.write("First command must be one of <%s>\n" %
"|".join(cmdset.union(["cluster", "action", "scheduler", "report",
"dbtap", "role", "group", "app", "account", "nezha", "user", "template"])))
"dbtap", "role", "group", "app", "account", "nezha", "user", "template", "quest"])))
usage(optparser)


Expand Down
Loading

0 comments on commit 75129d8

Please sign in to comment.