File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -745,6 +745,22 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT):
745745 if not res ["success" ]:
746746 logger .error ("Failed to execute command %s" % command )
747747 dataToStdout ("%s\n " % raw )
748+
749+ if command .startswith ("option" ):
750+ if not taskid :
751+ logger .error ("No task ID in use" )
752+ continue
753+ try :
754+ command , option = command .split (" " )
755+ except ValueError :
756+ raw = _client ("%s/option/%s/list" % (addr , taskid ))
757+ else :
758+ options = {"option" : option }
759+ raw = _client ("%s/option/%s/get" % (addr , taskid ), options )
760+ res = dejsonize (raw )
761+ if not res ["success" ]:
762+ logger .error ("Failed to execute command %s" % command )
763+ dataToStdout ("%s\n " % raw )
748764
749765 elif command .startswith ("new" ):
750766 if ' ' not in command :
@@ -809,6 +825,7 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT):
809825 msg += "data Retrieve and show data for current task\n "
810826 msg += "log Retrieve and show log for current task\n "
811827 msg += "status Retrieve and show status for current task\n "
828+ msg += "option Retrieve and show options for current task\n "
812829 msg += "stop Stop current task\n "
813830 msg += "kill Kill current task\n "
814831 msg += "list Display all tasks\n "
You can’t perform that action at this time.
0 commit comments