summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/remote/thriftbackend/thriftgen/pyload/Pyload.py')
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/Pyload.py186
1 files changed, 137 insertions, 49 deletions
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
index 78a42f16a..3e0fe3bbc 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
@@ -9,26 +9,24 @@
from thrift.Thrift import TType, TMessageType, TException
from ttypes import *
from thrift.Thrift import TProcessor
-from thrift.protocol.TBase import TBase, TExceptionBase
+from thrift.protocol.TBase import TBase, TExceptionBase, TApplicationException
class Iface(object):
- def getConfigValue(self, category, option, section):
+ def getConfigValue(self, section, option):
"""
Parameters:
- - category
- - option
- section
+ - option
"""
pass
- def setConfigValue(self, category, option, value, section):
+ def setConfigValue(self, section, option, value):
"""
Parameters:
- - category
+ - section
- option
- value
- - section
"""
pass
@@ -38,6 +36,13 @@ class Iface(object):
def getPluginConfig(self, ):
pass
+ def configureSection(self, section):
+ """
+ Parameters:
+ - section
+ """
+ pass
+
def pauseServer(self, ):
pass
@@ -181,12 +186,13 @@ class Iface(object):
"""
pass
- def addPackage(self, name, links, dest):
+ def addPackage(self, name, links, dest, password):
"""
Parameters:
- name
- links
- dest
+ - password
"""
pass
@@ -434,22 +440,20 @@ class Client(Iface):
self._oprot = oprot
self._seqid = 0
- def getConfigValue(self, category, option, section):
+ def getConfigValue(self, section, option):
"""
Parameters:
- - category
- - option
- section
+ - option
"""
- self.send_getConfigValue(category, option, section)
+ self.send_getConfigValue(section, option)
return self.recv_getConfigValue()
- def send_getConfigValue(self, category, option, section):
+ def send_getConfigValue(self, section, option):
self._oprot.writeMessageBegin('getConfigValue', TMessageType.CALL, self._seqid)
args = getConfigValue_args()
- args.category = category
- args.option = option
args.section = section
+ args.option = option
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -468,24 +472,22 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfigValue failed: unknown result");
- def setConfigValue(self, category, option, value, section):
+ def setConfigValue(self, section, option, value):
"""
Parameters:
- - category
+ - section
- option
- value
- - section
"""
- self.send_setConfigValue(category, option, value, section)
+ self.send_setConfigValue(section, option, value)
self.recv_setConfigValue()
- def send_setConfigValue(self, category, option, value, section):
+ def send_setConfigValue(self, section, option, value):
self._oprot.writeMessageBegin('setConfigValue', TMessageType.CALL, self._seqid)
args = setConfigValue_args()
- args.category = category
+ args.section = section
args.option = option
args.value = value
- args.section = section
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -552,6 +554,36 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "getPluginConfig failed: unknown result");
+ def configureSection(self, section):
+ """
+ Parameters:
+ - section
+ """
+ self.send_configureSection(section)
+ return self.recv_configureSection()
+
+ def send_configureSection(self, section):
+ self._oprot.writeMessageBegin('configureSection', TMessageType.CALL, self._seqid)
+ args = configureSection_args()
+ args.section = section
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_configureSection(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = configureSection_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "configureSection failed: unknown result");
+
def pauseServer(self, ):
self.send_pauseServer()
self.recv_pauseServer()
@@ -1348,22 +1380,24 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "generateAndAddPackages failed: unknown result");
- def addPackage(self, name, links, dest):
+ def addPackage(self, name, links, dest, password):
"""
Parameters:
- name
- links
- dest
+ - password
"""
- self.send_addPackage(name, links, dest)
+ self.send_addPackage(name, links, dest, password)
return self.recv_addPackage()
- def send_addPackage(self, name, links, dest):
+ def send_addPackage(self, name, links, dest, password):
self._oprot.writeMessageBegin('addPackage', TMessageType.CALL, self._seqid)
args = addPackage_args()
args.name = name
args.links = links
args.dest = dest
+ args.password = password
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -2130,6 +2164,8 @@ class Client(Iface):
self._iprot.readMessageEnd()
if result.success is not None:
return result.success
+ if result.ex is not None:
+ raise result.ex
raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserData failed: unknown result");
def getAllUserData(self, ):
@@ -2427,6 +2463,7 @@ class Processor(Iface, TProcessor):
self._processMap["setConfigValue"] = Processor.process_setConfigValue
self._processMap["getConfig"] = Processor.process_getConfig
self._processMap["getPluginConfig"] = Processor.process_getPluginConfig
+ self._processMap["configureSection"] = Processor.process_configureSection
self._processMap["pauseServer"] = Processor.process_pauseServer
self._processMap["unpauseServer"] = Processor.process_unpauseServer
self._processMap["togglePause"] = Processor.process_togglePause
@@ -2514,7 +2551,7 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = getConfigValue_result()
- result.success = self._handler.getConfigValue(args.category, args.option, args.section)
+ result.success = self._handler.getConfigValue(args.section, args.option)
oprot.writeMessageBegin("getConfigValue", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -2525,7 +2562,7 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = setConfigValue_result()
- self._handler.setConfigValue(args.category, args.option, args.value, args.section)
+ self._handler.setConfigValue(args.section, args.option, args.value)
oprot.writeMessageBegin("setConfigValue", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -2553,6 +2590,17 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_configureSection(self, seqid, iprot, oprot):
+ args = configureSection_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = configureSection_result()
+ result.success = self._handler.configureSection(args.section)
+ oprot.writeMessageBegin("configureSection", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_pauseServer(self, seqid, iprot, oprot):
args = pauseServer_args()
args.read(iprot)
@@ -2886,7 +2934,7 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = addPackage_result()
- result.success = self._handler.addPackage(args.name, args.links, args.dest)
+ result.success = self._handler.addPackage(args.name, args.links, args.dest, args.password)
oprot.writeMessageBegin("addPackage", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -3175,7 +3223,10 @@ class Processor(Iface, TProcessor):
args.read(iprot)
iprot.readMessageEnd()
result = getUserData_result()
- result.success = self._handler.getUserData(args.username, args.password)
+ try:
+ result.success = self._handler.getUserData(args.username, args.password)
+ except UserDoesNotExists, ex:
+ result.ex = ex
oprot.writeMessageBegin("getUserData", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -3302,28 +3353,24 @@ class Processor(Iface, TProcessor):
class getConfigValue_args(TBase):
"""
Attributes:
- - category
- - option
- section
+ - option
"""
__slots__ = [
- 'category',
- 'option',
'section',
+ 'option',
]
thrift_spec = (
None, # 0
- (1, TType.STRING, 'category', None, None, ), # 1
+ (1, TType.STRING, 'section', None, None, ), # 1
(2, TType.STRING, 'option', None, None, ), # 2
- (3, TType.STRING, 'section', None, None, ), # 3
)
- def __init__(self, category=None, option=None, section=None,):
- self.category = category
- self.option = option
+ def __init__(self, section=None, option=None,):
self.section = section
+ self.option = option
class getConfigValue_result(TBase):
@@ -3347,32 +3394,28 @@ class getConfigValue_result(TBase):
class setConfigValue_args(TBase):
"""
Attributes:
- - category
+ - section
- option
- value
- - section
"""
__slots__ = [
- 'category',
+ 'section',
'option',
'value',
- 'section',
]
thrift_spec = (
None, # 0
- (1, TType.STRING, 'category', None, None, ), # 1
+ (1, TType.STRING, 'section', None, None, ), # 1
(2, TType.STRING, 'option', None, None, ), # 2
(3, TType.STRING, 'value', None, None, ), # 3
- (4, TType.STRING, 'section', None, None, ), # 4
)
- def __init__(self, category=None, option=None, value=None, section=None,):
- self.category = category
+ def __init__(self, section=None, option=None, value=None,):
+ self.section = section
self.option = option
self.value = value
- self.section = section
class setConfigValue_result(TBase):
@@ -3438,6 +3481,43 @@ class getPluginConfig_result(TBase):
self.success = success
+class configureSection_args(TBase):
+ """
+ Attributes:
+ - section
+ """
+
+ __slots__ = [
+ 'section',
+ ]
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'section', None, None, ), # 1
+ )
+
+ def __init__(self, section=None,):
+ self.section = section
+
+
+class configureSection_result(TBase):
+ """
+ Attributes:
+ - success
+ """
+
+ __slots__ = [
+ 'success',
+ ]
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (ConfigSection, ConfigSection.thrift_spec), None, ), # 0
+ )
+
+ def __init__(self, success=None,):
+ self.success = success
+
+
class pauseServer_args(TBase):
__slots__ = [
@@ -4349,12 +4429,14 @@ class addPackage_args(TBase):
- name
- links
- dest
+ - password
"""
__slots__ = [
'name',
'links',
'dest',
+ 'password',
]
thrift_spec = (
@@ -4362,12 +4444,14 @@ class addPackage_args(TBase):
(1, TType.STRING, 'name', None, None, ), # 1
(2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2
(3, TType.I32, 'dest', None, None, ), # 3
+ (4, TType.STRING, 'password', None, None, ), # 4
)
- def __init__(self, name=None, links=None, dest=None,):
+ def __init__(self, name=None, links=None, dest=None, password=None,):
self.name = name
self.links = links
self.dest = dest
+ self.password = password
class addPackage_result(TBase):
@@ -5182,18 +5266,22 @@ class getUserData_result(TBase):
"""
Attributes:
- success
+ - ex
"""
__slots__ = [
'success',
+ 'ex',
]
thrift_spec = (
(0, TType.STRUCT, 'success', (UserData, UserData.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ex', (UserDoesNotExists, UserDoesNotExists.thrift_spec), None, ), # 1
)
- def __init__(self, success=None,):
+ def __init__(self, success=None, ex=None,):
self.success = success
+ self.ex = ex
class getAllUserData_args(TBase):