diff options
Diffstat (limited to 'module/remote/thriftbackend/thriftgen/pyload/Pyload.py')
-rw-r--r-- | module/remote/thriftbackend/thriftgen/pyload/Pyload.py | 976 |
1 files changed, 543 insertions, 433 deletions
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index 187b7fa74..ec850b70c 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -109,16 +109,14 @@ class Iface(object): def statusDownloads(self, ): pass - def addPackage(self, name, links, dest): + def getPackageData(self, pid): """ Parameters: - - name - - links - - dest + - pid """ pass - def getPackageData(self, pid): + def getPackageInfo(self, pid): """ Parameters: - pid @@ -132,37 +130,68 @@ class Iface(object): """ pass - def deleteFiles(self, fids): + def getQueue(self, ): + pass + + def getCollector(self, ): + pass + + def getQueueData(self, ): + pass + + def getCollectorData(self, ): + pass + + def getPackageOrder(self, destination): """ Parameters: - - fids + - destination """ pass - def deletePackages(self, pids): + def getFileOrder(self, pid): """ Parameters: - - pids + - pid """ pass - def getQueue(self, ): + def addPackage(self, name, links, dest): + """ + Parameters: + - name + - links + - dest + """ pass - def getCollector(self, ): + def addFiles(self, pid, links): + """ + Parameters: + - pid + - links + """ pass - def getQueueData(self, ): + def uploadContainer(self, filename, data): + """ + Parameters: + - filename + - data + """ pass - def getCollectorData(self, ): + def deleteFiles(self, fids): + """ + Parameters: + - fids + """ pass - def addFiles(self, pid, links): + def deletePackages(self, pids): """ Parameters: - - pid - - links + - pids """ pass @@ -227,14 +256,6 @@ class Iface(object): """ pass - def uploadContainer(self, filename, data): - """ - Parameters: - - filename - - data - """ - pass - def setPriority(self, pid, priority): """ Parameters: @@ -273,20 +294,6 @@ class Iface(object): def restartFailed(self, ): pass - def getPackageOrder(self, destination): - """ - Parameters: - - destination - """ - pass - - def getFileOrder(self, pid): - """ - Parameters: - - pid - """ - pass - def isCaptchaWaiting(self, ): pass @@ -956,71 +963,69 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "statusDownloads failed: unknown result"); - def addPackage(self, name, links, dest): + def getPackageData(self, pid): """ Parameters: - - name - - links - - dest + - pid """ - self.send_addPackage(name, links, dest) - return self.recv_addPackage() + self.send_getPackageData(pid) + return self.recv_getPackageData() - def send_addPackage(self, name, links, dest): - self._oprot.writeMessageBegin('addPackage', TMessageType.CALL, self._seqid) - args = addPackage_args() - args.name = name - args.links = links - args.dest = dest + def send_getPackageData(self, pid): + self._oprot.writeMessageBegin('getPackageData', TMessageType.CALL, self._seqid) + args = getPackageData_args() + args.pid = pid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_addPackage(self, ): + def recv_getPackageData(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = addPackage_result() + result = getPackageData_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "addPackage failed: unknown result"); + if result.e is not None: + raise result.e + raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageData failed: unknown result"); - def getPackageData(self, pid): + def getPackageInfo(self, pid): """ Parameters: - pid """ - self.send_getPackageData(pid) - return self.recv_getPackageData() + self.send_getPackageInfo(pid) + return self.recv_getPackageInfo() - def send_getPackageData(self, pid): - self._oprot.writeMessageBegin('getPackageData', TMessageType.CALL, self._seqid) - args = getPackageData_args() + def send_getPackageInfo(self, pid): + self._oprot.writeMessageBegin('getPackageInfo', TMessageType.CALL, self._seqid) + args = getPackageInfo_args() args.pid = pid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getPackageData(self, ): + def recv_getPackageInfo(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getPackageData_result() + result = getPackageInfo_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageData failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageInfo failed: unknown result"); def getFileData(self, fid): """ @@ -1054,62 +1059,6 @@ class Client(Iface): raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getFileData failed: unknown result"); - def deleteFiles(self, fids): - """ - Parameters: - - fids - """ - self.send_deleteFiles(fids) - self.recv_deleteFiles() - - def send_deleteFiles(self, fids): - self._oprot.writeMessageBegin('deleteFiles', TMessageType.CALL, self._seqid) - args = deleteFiles_args() - args.fids = fids - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_deleteFiles(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = deleteFiles_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - return - - def deletePackages(self, pids): - """ - Parameters: - - pids - """ - self.send_deletePackages(pids) - self.recv_deletePackages() - - def send_deletePackages(self, pids): - self._oprot.writeMessageBegin('deletePackages', TMessageType.CALL, self._seqid) - args = deletePackages_args() - args.pids = pids - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_deletePackages(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = deletePackages_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - return - def getQueue(self, ): self.send_getQueue() return self.recv_getQueue() @@ -1210,6 +1159,100 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getCollectorData failed: unknown result"); + def getPackageOrder(self, destination): + """ + Parameters: + - destination + """ + self.send_getPackageOrder(destination) + return self.recv_getPackageOrder() + + def send_getPackageOrder(self, destination): + self._oprot.writeMessageBegin('getPackageOrder', TMessageType.CALL, self._seqid) + args = getPackageOrder_args() + args.destination = destination + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getPackageOrder(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getPackageOrder_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageOrder failed: unknown result"); + + def getFileOrder(self, pid): + """ + Parameters: + - pid + """ + self.send_getFileOrder(pid) + return self.recv_getFileOrder() + + def send_getFileOrder(self, pid): + self._oprot.writeMessageBegin('getFileOrder', TMessageType.CALL, self._seqid) + args = getFileOrder_args() + args.pid = pid + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getFileOrder(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getFileOrder_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getFileOrder failed: unknown result"); + + def addPackage(self, name, links, dest): + """ + Parameters: + - name + - links + - dest + """ + self.send_addPackage(name, links, dest) + return self.recv_addPackage() + + def send_addPackage(self, name, links, dest): + self._oprot.writeMessageBegin('addPackage', TMessageType.CALL, self._seqid) + args = addPackage_args() + args.name = name + args.links = links + args.dest = dest + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_addPackage(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = addPackage_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "addPackage failed: unknown result"); + def addFiles(self, pid, links): """ Parameters: @@ -1240,6 +1283,92 @@ class Client(Iface): self._iprot.readMessageEnd() return + def uploadContainer(self, filename, data): + """ + Parameters: + - filename + - data + """ + self.send_uploadContainer(filename, data) + self.recv_uploadContainer() + + def send_uploadContainer(self, filename, data): + self._oprot.writeMessageBegin('uploadContainer', TMessageType.CALL, self._seqid) + args = uploadContainer_args() + args.filename = filename + args.data = data + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_uploadContainer(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = uploadContainer_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + + def deleteFiles(self, fids): + """ + Parameters: + - fids + """ + self.send_deleteFiles(fids) + self.recv_deleteFiles() + + def send_deleteFiles(self, fids): + self._oprot.writeMessageBegin('deleteFiles', TMessageType.CALL, self._seqid) + args = deleteFiles_args() + args.fids = fids + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteFiles(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = deleteFiles_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + + def deletePackages(self, pids): + """ + Parameters: + - pids + """ + self.send_deletePackages(pids) + self.recv_deletePackages() + + def send_deletePackages(self, pids): + self._oprot.writeMessageBegin('deletePackages', TMessageType.CALL, self._seqid) + args = deletePackages_args() + args.pids = pids + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deletePackages(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = deletePackages_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + def pushToQueue(self, pid): """ Parameters: @@ -1491,36 +1620,6 @@ class Client(Iface): self._iprot.readMessageEnd() return - def uploadContainer(self, filename, data): - """ - Parameters: - - filename - - data - """ - self.send_uploadContainer(filename, data) - self.recv_uploadContainer() - - def send_uploadContainer(self, filename, data): - self._oprot.writeMessageBegin('uploadContainer', TMessageType.CALL, self._seqid) - args = uploadContainer_args() - args.filename = filename - args.data = data - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_uploadContainer(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = uploadContainer_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - return - def setPriority(self, pid, priority): """ Parameters: @@ -1639,6 +1738,8 @@ class Client(Iface): result = setPackageData_result() result.read(self._iprot) self._iprot.readMessageEnd() + if result.e is not None: + raise result.e return def deleteFinished(self, ): @@ -1687,66 +1788,6 @@ class Client(Iface): self._iprot.readMessageEnd() return - def getPackageOrder(self, destination): - """ - Parameters: - - destination - """ - self.send_getPackageOrder(destination) - return self.recv_getPackageOrder() - - def send_getPackageOrder(self, destination): - self._oprot.writeMessageBegin('getPackageOrder', TMessageType.CALL, self._seqid) - args = getPackageOrder_args() - args.destination = destination - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getPackageOrder(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getPackageOrder_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageOrder failed: unknown result"); - - def getFileOrder(self, pid): - """ - Parameters: - - pid - """ - self.send_getFileOrder(pid) - return self.recv_getFileOrder() - - def send_getFileOrder(self, pid): - self._oprot.writeMessageBegin('getFileOrder', TMessageType.CALL, self._seqid) - args = getFileOrder_args() - args.pid = pid - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getFileOrder(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getFileOrder_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getFileOrder failed: unknown result"); - def isCaptchaWaiting(self, ): self.send_isCaptchaWaiting() return self.recv_isCaptchaWaiting() @@ -2241,16 +2282,20 @@ class Processor(Iface, TProcessor): self._processMap["checkOnlineStatus"] = Processor.process_checkOnlineStatus self._processMap["pollResults"] = Processor.process_pollResults self._processMap["statusDownloads"] = Processor.process_statusDownloads - self._processMap["addPackage"] = Processor.process_addPackage self._processMap["getPackageData"] = Processor.process_getPackageData + self._processMap["getPackageInfo"] = Processor.process_getPackageInfo self._processMap["getFileData"] = Processor.process_getFileData - self._processMap["deleteFiles"] = Processor.process_deleteFiles - self._processMap["deletePackages"] = Processor.process_deletePackages self._processMap["getQueue"] = Processor.process_getQueue self._processMap["getCollector"] = Processor.process_getCollector self._processMap["getQueueData"] = Processor.process_getQueueData self._processMap["getCollectorData"] = Processor.process_getCollectorData + self._processMap["getPackageOrder"] = Processor.process_getPackageOrder + self._processMap["getFileOrder"] = Processor.process_getFileOrder + self._processMap["addPackage"] = Processor.process_addPackage self._processMap["addFiles"] = Processor.process_addFiles + self._processMap["uploadContainer"] = Processor.process_uploadContainer + self._processMap["deleteFiles"] = Processor.process_deleteFiles + self._processMap["deletePackages"] = Processor.process_deletePackages self._processMap["pushToQueue"] = Processor.process_pushToQueue self._processMap["pullFromQueue"] = Processor.process_pullFromQueue self._processMap["restartPackage"] = Processor.process_restartPackage @@ -2260,15 +2305,12 @@ class Processor(Iface, TProcessor): self._processMap["stopDownloads"] = Processor.process_stopDownloads self._processMap["setPackageName"] = Processor.process_setPackageName self._processMap["movePackage"] = Processor.process_movePackage - self._processMap["uploadContainer"] = Processor.process_uploadContainer self._processMap["setPriority"] = Processor.process_setPriority self._processMap["orderPackage"] = Processor.process_orderPackage self._processMap["orderFile"] = Processor.process_orderFile self._processMap["setPackageData"] = Processor.process_setPackageData self._processMap["deleteFinished"] = Processor.process_deleteFinished self._processMap["restartFailed"] = Processor.process_restartFailed - self._processMap["getPackageOrder"] = Processor.process_getPackageOrder - self._processMap["getFileOrder"] = Processor.process_getFileOrder self._processMap["isCaptchaWaiting"] = Processor.process_isCaptchaWaiting self._processMap["getCaptchaTask"] = Processor.process_getCaptchaTask self._processMap["getCaptchaTaskStatus"] = Processor.process_getCaptchaTaskStatus @@ -2532,27 +2574,30 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_addPackage(self, seqid, iprot, oprot): - args = addPackage_args() + def process_getPackageData(self, seqid, iprot, oprot): + args = getPackageData_args() args.read(iprot) iprot.readMessageEnd() - result = addPackage_result() - result.success = self._handler.addPackage(args.name, args.links, args.dest) - oprot.writeMessageBegin("addPackage", TMessageType.REPLY, seqid) + result = getPackageData_result() + try: + result.success = self._handler.getPackageData(args.pid) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("getPackageData", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_getPackageData(self, seqid, iprot, oprot): - args = getPackageData_args() + def process_getPackageInfo(self, seqid, iprot, oprot): + args = getPackageInfo_args() args.read(iprot) iprot.readMessageEnd() - result = getPackageData_result() + result = getPackageInfo_result() try: - result.success = self._handler.getPackageData(args.pid) + result.success = self._handler.getPackageInfo(args.pid) except PackageDoesNotExists, e: result.e = e - oprot.writeMessageBegin("getPackageData", TMessageType.REPLY, seqid) + oprot.writeMessageBegin("getPackageInfo", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -2571,28 +2616,6 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_deleteFiles(self, seqid, iprot, oprot): - args = deleteFiles_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteFiles_result() - self._handler.deleteFiles(args.fids) - oprot.writeMessageBegin("deleteFiles", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_deletePackages(self, seqid, iprot, oprot): - args = deletePackages_args() - args.read(iprot) - iprot.readMessageEnd() - result = deletePackages_result() - self._handler.deletePackages(args.pids) - oprot.writeMessageBegin("deletePackages", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_getQueue(self, seqid, iprot, oprot): args = getQueue_args() args.read(iprot) @@ -2637,6 +2660,39 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_getPackageOrder(self, seqid, iprot, oprot): + args = getPackageOrder_args() + args.read(iprot) + iprot.readMessageEnd() + result = getPackageOrder_result() + result.success = self._handler.getPackageOrder(args.destination) + oprot.writeMessageBegin("getPackageOrder", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getFileOrder(self, seqid, iprot, oprot): + args = getFileOrder_args() + args.read(iprot) + iprot.readMessageEnd() + result = getFileOrder_result() + result.success = self._handler.getFileOrder(args.pid) + oprot.writeMessageBegin("getFileOrder", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_addPackage(self, seqid, iprot, oprot): + args = addPackage_args() + args.read(iprot) + iprot.readMessageEnd() + result = addPackage_result() + result.success = self._handler.addPackage(args.name, args.links, args.dest) + oprot.writeMessageBegin("addPackage", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_addFiles(self, seqid, iprot, oprot): args = addFiles_args() args.read(iprot) @@ -2648,6 +2704,39 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_uploadContainer(self, seqid, iprot, oprot): + args = uploadContainer_args() + args.read(iprot) + iprot.readMessageEnd() + result = uploadContainer_result() + self._handler.uploadContainer(args.filename, args.data) + oprot.writeMessageBegin("uploadContainer", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteFiles(self, seqid, iprot, oprot): + args = deleteFiles_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteFiles_result() + self._handler.deleteFiles(args.fids) + oprot.writeMessageBegin("deleteFiles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deletePackages(self, seqid, iprot, oprot): + args = deletePackages_args() + args.read(iprot) + iprot.readMessageEnd() + result = deletePackages_result() + self._handler.deletePackages(args.pids) + oprot.writeMessageBegin("deletePackages", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_pushToQueue(self, seqid, iprot, oprot): args = pushToQueue_args() args.read(iprot) @@ -2747,17 +2836,6 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_uploadContainer(self, seqid, iprot, oprot): - args = uploadContainer_args() - args.read(iprot) - iprot.readMessageEnd() - result = uploadContainer_result() - self._handler.uploadContainer(args.filename, args.data) - oprot.writeMessageBegin("uploadContainer", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_setPriority(self, seqid, iprot, oprot): args = setPriority_args() args.read(iprot) @@ -2796,7 +2874,10 @@ class Processor(Iface, TProcessor): args.read(iprot) iprot.readMessageEnd() result = setPackageData_result() - self._handler.setPackageData(args.pid, args.data) + try: + self._handler.setPackageData(args.pid, args.data) + except PackageDoesNotExists, e: + result.e = e oprot.writeMessageBegin("setPackageData", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -2824,28 +2905,6 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_getPackageOrder(self, seqid, iprot, oprot): - args = getPackageOrder_args() - args.read(iprot) - iprot.readMessageEnd() - result = getPackageOrder_result() - result.success = self._handler.getPackageOrder(args.destination) - oprot.writeMessageBegin("getPackageOrder", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getFileOrder(self, seqid, iprot, oprot): - args = getFileOrder_args() - args.read(iprot) - iprot.readMessageEnd() - result = getFileOrder_result() - result.success = self._handler.getFileOrder(args.pid) - oprot.writeMessageBegin("getFileOrder", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_isCaptchaWaiting(self, seqid, iprot, oprot): args = isCaptchaWaiting_args() args.read(iprot) @@ -3642,52 +3701,48 @@ class statusDownloads_result(TBase): self.success = success -class addPackage_args(TBase): +class getPackageData_args(TBase): """ Attributes: - - name - - links - - dest + - pid """ __slots__ = [ - 'name', - 'links', - 'dest', + 'pid', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 - (3, TType.I32, 'dest', None, None, ), # 3 + (1, TType.I32, 'pid', None, None, ), # 1 ) - def __init__(self, name=None, links=None, dest=None,): - self.name = name - self.links = links - self.dest = dest + def __init__(self, pid=None,): + self.pid = pid -class addPackage_result(TBase): +class getPackageData_result(TBase): """ Attributes: - success + - e """ __slots__ = [ 'success', + 'e', ] thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 + (0, TType.STRUCT, 'success', (PackageData, PackageData.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None,): + def __init__(self, success=None, e=None,): self.success = success + self.e = e -class getPackageData_args(TBase): +class getPackageInfo_args(TBase): """ Attributes: - pid @@ -3706,7 +3761,7 @@ class getPackageData_args(TBase): self.pid = pid -class getPackageData_result(TBase): +class getPackageInfo_result(TBase): """ Attributes: - success @@ -3769,26 +3824,34 @@ class getFileData_result(TBase): self.e = e -class deleteFiles_args(TBase): +class getQueue_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getQueue_result(TBase): """ Attributes: - - fids + - success """ __slots__ = [ - 'fids', + 'success', ] thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 ) - def __init__(self, fids=None,): - self.fids = fids + def __init__(self, success=None,): + self.success = success -class deleteFiles_result(TBase): +class getCollector_args(TBase): __slots__ = [ ] @@ -3797,26 +3860,25 @@ class deleteFiles_result(TBase): ) -class deletePackages_args(TBase): +class getCollector_result(TBase): """ Attributes: - - pids + - success """ __slots__ = [ - 'pids', + 'success', ] thrift_spec = ( - None, # 0 - (1, TType.LIST, 'pids', (TType.I32,None), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 ) - def __init__(self, pids=None,): - self.pids = pids + def __init__(self, success=None,): + self.success = success -class deletePackages_result(TBase): +class getQueueData_args(TBase): __slots__ = [ ] @@ -3825,16 +3887,34 @@ class deletePackages_result(TBase): ) -class getQueue_args(TBase): +class getQueueData_result(TBase): + """ + Attributes: + - success + """ __slots__ = [ + 'success', ] thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 ) + def __init__(self, success=None,): + self.success = success -class getQueue_result(TBase): + +class getCollectorData_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getCollectorData_result(TBase): """ Attributes: - success @@ -3845,23 +3925,33 @@ class getQueue_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PackageInfo, PackageInfo.thrift_spec)), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getCollector_args(TBase): +class getPackageOrder_args(TBase): + """ + Attributes: + - destination + """ __slots__ = [ + 'destination', ] thrift_spec = ( + None, # 0 + (1, TType.I32, 'destination', None, None, ), # 1 ) + def __init__(self, destination=None,): + self.destination = destination -class getCollector_result(TBase): + +class getPackageOrder_result(TBase): """ Attributes: - success @@ -3872,23 +3962,33 @@ class getCollector_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PackageInfo, PackageInfo.thrift_spec)), None, ), # 0 + (0, TType.MAP, 'success', (TType.I16,None,TType.I32,None), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getQueueData_args(TBase): +class getFileOrder_args(TBase): + """ + Attributes: + - pid + """ __slots__ = [ + 'pid', ] thrift_spec = ( + None, # 0 + (1, TType.I32, 'pid', None, None, ), # 1 ) + def __init__(self, pid=None,): + self.pid = pid -class getQueueData_result(TBase): + +class getFileOrder_result(TBase): """ Attributes: - success @@ -3899,23 +3999,41 @@ class getQueueData_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 + (0, TType.MAP, 'success', (TType.I16,None,TType.I32,None), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getCollectorData_args(TBase): +class addPackage_args(TBase): + """ + Attributes: + - name + - links + - dest + """ __slots__ = [ + 'name', + 'links', + 'dest', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 + (3, TType.I32, 'dest', None, None, ), # 3 ) + def __init__(self, name=None, links=None, dest=None,): + self.name = name + self.links = links + self.dest = dest + -class getCollectorData_result(TBase): +class addPackage_result(TBase): """ Attributes: - success @@ -3926,7 +4044,7 @@ class getCollectorData_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 + (0, TType.I32, 'success', None, None, ), # 0 ) def __init__(self, success=None,): @@ -3965,6 +4083,94 @@ class addFiles_result(TBase): ) +class uploadContainer_args(TBase): + """ + Attributes: + - filename + - data + """ + + __slots__ = [ + 'filename', + 'data', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'filename', None, None, ), # 1 + (2, TType.STRING, 'data', None, None, ), # 2 + ) + + def __init__(self, filename=None, data=None,): + self.filename = filename + self.data = data + + +class uploadContainer_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class deleteFiles_args(TBase): + """ + Attributes: + - fids + """ + + __slots__ = [ + 'fids', + ] + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 + ) + + def __init__(self, fids=None,): + self.fids = fids + + +class deleteFiles_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class deletePackages_args(TBase): + """ + Attributes: + - pids + """ + + __slots__ = [ + 'pids', + ] + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'pids', (TType.I32,None), None, ), # 1 + ) + + def __init__(self, pids=None,): + self.pids = pids + + +class deletePackages_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + class pushToQueue_args(TBase): """ Attributes: @@ -4215,38 +4421,6 @@ class movePackage_result(TBase): ) -class uploadContainer_args(TBase): - """ - Attributes: - - filename - - data - """ - - __slots__ = [ - 'filename', - 'data', - ] - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'filename', None, None, ), # 1 - (2, TType.STRING, 'data', None, None, ), # 2 - ) - - def __init__(self, filename=None, data=None,): - self.filename = filename - self.data = data - - -class uploadContainer_result(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - class setPriority_args(TBase): """ Attributes: @@ -4367,13 +4541,23 @@ class setPackageData_args(TBase): class setPackageData_result(TBase): + """ + Attributes: + - e + """ __slots__ = [ + 'e', ] thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) + def __init__(self, e=None,): + self.e = e + class deleteFinished_args(TBase): @@ -4411,80 +4595,6 @@ class restartFailed_result(TBase): ) -class getPackageOrder_args(TBase): - """ - Attributes: - - destination - """ - - __slots__ = [ - 'destination', - ] - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'destination', None, None, ), # 1 - ) - - def __init__(self, destination=None,): - self.destination = destination - - -class getPackageOrder_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.I16,None,TType.I32,None), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - -class getFileOrder_args(TBase): - """ - Attributes: - - pid - """ - - __slots__ = [ - 'pid', - ] - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 - ) - - def __init__(self, pid=None,): - self.pid = pid - - -class getFileOrder_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.I16,None,TType.I32,None), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - class isCaptchaWaiting_args(TBase): __slots__ = [ |