class MsParam(Message): _name = 'MsParam_PI' label = StringProperty() type = StringProperty() # for packing inOutStruct = SubmessageProperty() BinBytesBuf_PI = SubmessageProperty(BinBytesBuf) # override Message.unpack() to unpack inOutStruct # depending on the received <type> element def unpack(self, root): for (name, prop) in self._ordered_properties: if name == 'inOutStruct': continue unpacked_value = prop.unpack(root.findall(name)) self._values[name] = unpacked_value # type tells us what type of data structure we are unpacking # e.g: <type>ExecCmdOut_PI</type> if name == 'type': # unpack struct accordingly message_class = globals()[unpacked_value] self._values['inOutStruct'] = SubmessageProperty( message_class).unpack(root.findall(unpacked_value))
class ModAclRequest(Message): _name = 'modAccessControlInp_PI' recursiveFlag = IntegerProperty() accessLevel = StringProperty() userName = StringProperty() zone = StringProperty() path = StringProperty()
class RuleExecutionRequest(Message): _name = 'ExecMyRuleInp_PI' myRule = StringProperty() addr = SubmessageProperty(RodsHostAddress) condInput = SubmessageProperty(StringStringMap) outParamDesc = StringProperty() inpParamArray = SubmessageProperty(MsParamArray)
class VersionResponse(Message): _name = 'Version_PI' status = IntegerProperty() relVersion = StringProperty() apiVersion = StringProperty() reconnPort = IntegerProperty() reconnAddr = StringProperty() cookie = IntegerProperty()
class StringStringMap(Message): _name = 'KeyValPair_PI' def __init__(self, data=None): super(StringStringMap, self).__init__() self.ssLen = 0 if data: self.ssLen = len(data) self.keyWord = data.keys() self.svalue = data.values() ssLen = IntegerProperty() keyWord = ArrayProperty(StringProperty()) svalue = ArrayProperty(StringProperty())
class PamAuthRequestOut(Message): _name = 'pamAuthRequestOut_PI' irodsPamPassword = StringProperty() @builtins.property def result_(self): return self.irodsPamPassword
class StartupPack(Message): _name = 'StartupPack_PI' def __init__(self, proxy_user, client_user): super(StartupPack, self).__init__() if proxy_user and client_user: self.irodsProt = 1 self.connectCnt = 0 self.proxyUser, self.proxyRcatZone = proxy_user self.clientUser, self.clientRcatZone = client_user self.relVersion = "rods{major}.{minor}.{patchlevel}".format( **IRODS_VERSION) self.apiVersion = "{api}".format(**IRODS_VERSION) self.option = "" irodsProt = IntegerProperty() reconnFlag = IntegerProperty() connectCnt = IntegerProperty() proxyUser = StringProperty() proxyRcatZone = StringProperty() clientUser = StringProperty() clientRcatZone = StringProperty() relVersion = StringProperty() apiVersion = StringProperty() option = StringProperty()
class MetadataRequest(Message): _name = 'ModAVUMetadataInp_PI' def __init__(self, *args): super(MetadataRequest, self).__init__() for i in range(len(args)): if args[i]: setattr(self, 'arg%d' % i, args[i]) arg0 = StringProperty() arg1 = StringProperty() arg2 = StringProperty() arg3 = StringProperty() arg4 = StringProperty() arg5 = StringProperty() arg6 = StringProperty() arg7 = StringProperty() arg8 = StringProperty() arg9 = StringProperty()
class FileOpenRequest(Message): _name = 'DataObjInp_PI' objPath = StringProperty() createMode = IntegerProperty() openFlags = IntegerProperty() offset = LongProperty() dataSize = LongProperty() numThreads = IntegerProperty() oprType = IntegerProperty() KeyValPair_PI = SubmessageProperty(StringStringMap)
class BytesBuf(Message): """A generic structure carrying text content""" _name = 'BytesBuf_PI' buflen = IntegerProperty() buf = StringProperty() def __init__(self, string, *v, **kw): super(BytesBuf, self).__init__(*v, **kw) self.buf = string self.buflen = len(self.buf)
class GeneralAdminRequest(Message): _name = 'generalAdminInp_PI' def __init__(self, *args): super(GeneralAdminRequest, self).__init__() for i in range(10): if i < len(args) and args[i]: setattr(self, 'arg{0}'.format(i), args[i]) else: setattr(self, 'arg{0}'.format(i), '') arg0 = StringProperty() arg1 = StringProperty() arg2 = StringProperty() arg3 = StringProperty() arg4 = StringProperty() arg5 = StringProperty() arg6 = StringProperty() arg7 = StringProperty() arg8 = StringProperty() arg9 = StringProperty()
class IntegerStringMap(Message): _name = 'InxValPair_PI' def __init__(self, data=None): super(IntegerStringMap, self).__init__() self.isLen = 0 if data: self.isLen = len(data) self.inx = data.keys() self.svalue = data.values() isLen = IntegerProperty() inx = ArrayProperty(IntegerProperty()) svalue = ArrayProperty(StringProperty())
class _admin_request_base(Message): _name = None def __init__(self, *args): if self.__class__._name is None: raise NotImplementedError super(_admin_request_base, self).__init__() for i in range(10): if i < len(args) and args[i]: setattr(self, 'arg{0}'.format(i), args[i]) else: setattr(self, 'arg{0}'.format(i), '') arg0 = StringProperty() arg1 = StringProperty() arg2 = StringProperty() arg3 = StringProperty() arg4 = StringProperty() arg5 = StringProperty() arg6 = StringProperty() arg7 = StringProperty() arg8 = StringProperty() arg9 = StringProperty()
class MetadataRequest_(Message): _name = 'ModAVUMetadataInp_PI' def __init__(self, *args, **metadata_opts): super(MetadataRequest_, self).__init__() for i in range(len(args)): if args[i]: setattr(self, 'arg%d' % i, args[i]) if SERVER_REQUIRES_KEYVAL_PAIRS: self.KeyValPair_PI = StringStringMap(metadata_opts) arg0 = StringProperty() arg1 = StringProperty() arg2 = StringProperty() arg3 = StringProperty() arg4 = StringProperty() arg5 = StringProperty() arg6 = StringProperty() arg7 = StringProperty() arg8 = StringProperty() arg9 = StringProperty() if SERVER_REQUIRES_KEYVAL_PAIRS: KeyValPair_PI = SubmessageProperty(StringStringMap)
class TicketAdminRequest(Message): _name = 'ticketAdminInp_PI' def __init__(self, *args): super(TicketAdminRequest, self).__init__() for i in range(6): if i < len(args) and args[i]: setattr(self, 'arg{0}'.format(i + 1), str(args[i])) else: setattr(self, 'arg{0}'.format(i + 1), "") arg1 = StringProperty() arg2 = StringProperty() arg3 = StringProperty() arg4 = StringProperty() arg5 = StringProperty() arg6 = StringProperty()
class StartupPack(Message): _name = 'StartupPack_PI' def __init__(self, proxy_user, client_user): super(StartupPack, self).__init__() if proxy_user and client_user: self.irodsProt = 1 self.connectCnt = 0 self.proxyUser, self.proxyRcatZone = proxy_user self.clientUser, self.clientRcatZone = client_user self.relVersion = "rods3.2" self.apiVersion = "d" self.option = "" irodsProt = IntegerProperty() reconnFlag = IntegerProperty() connectCnt = IntegerProperty() proxyUser = StringProperty() proxyRcatZone = StringProperty() clientUser = StringProperty() clientRcatZone = StringProperty() relVersion = StringProperty() apiVersion = StringProperty() option = StringProperty()
class TicketAdminRequest_(Message): _name = 'ticketAdminInp_PI' def __init__(self, *args, **ticketOpts): super(TicketAdminRequest_, self).__init__() for i in range(6): if i < len(args) and args[i]: setattr(self, 'arg{0}'.format(i + 1), str(args[i])) else: setattr(self, 'arg{0}'.format(i + 1), "") if SERVER_REQUIRES_KEYVAL_PAIRS: self.KeyValPair_PI = StringStringMap(ticketOpts) arg1 = StringProperty() arg2 = StringProperty() arg3 = StringProperty() arg4 = StringProperty() arg5 = StringProperty() arg6 = StringProperty() if SERVER_REQUIRES_KEYVAL_PAIRS: KeyValPair_PI = SubmessageProperty(StringStringMap)
class STR_PI(Message): ''' Another "returnable" MsParam type ''' _name = 'STR_PI' myStr = StringProperty()
class RodsHostAddress(Message): _name = 'RHostAddr_PI' hostAddr = StringProperty() rodsZone = StringProperty() port = IntegerProperty() dummyInt = IntegerProperty()
class SpecificQueryRequest(Message): _name = 'specificQueryInp_PI' sql = StringProperty() arg1 = StringProperty() arg2 = StringProperty() arg3 = StringProperty() arg4 = StringProperty() arg5 = StringProperty() arg6 = StringProperty() arg7 = StringProperty() arg8 = StringProperty() arg9 = StringProperty() arg10 = StringProperty() maxRows = IntegerProperty() continueInx = IntegerProperty() rowOffset = IntegerProperty() options = IntegerProperty() KeyValPair_PI = SubmessageProperty(StringStringMap)
class GetTempPasswordOut(Message): _name = 'getTempPasswordOut_PI' stringToHashWith = StringProperty()
class AuthResponse(Message): _name = 'authResponseInp_PI' response = BinaryProperty(16) username = StringProperty()
class GetTempPasswordForOtherRequest(Message): _name = 'getTempPasswordForOtherInp_PI' targetUser = StringProperty() unused = StringProperty()
class AuthPluginOut(Message): _name = 'authPlugReqOut_PI' result_ = StringProperty()
class CollectionRequest(Message): _name = 'CollInpNew_PI' collName = StringProperty() flags = IntegerProperty() oprType = IntegerProperty() KeyValPair_PI = SubmessageProperty(StringStringMap)
class PluginAuthMessage(Message): _name = 'authPlugReqInp_PI' auth_scheme_ = StringProperty() context_ = StringProperty()
class GenQueryResponseColumn(Message): _name = 'SqlResult_PI' attriInx = IntegerProperty() reslen = IntegerProperty() value = ArrayProperty(StringProperty())
class DataObjInfo(Message): _name = 'DataObjInfo_PI' objPath = StringProperty() rescName = StringProperty() rescHier = StringProperty() dataType = StringProperty() dataSize = LongProperty() chksum = StringProperty() version = StringProperty() filePath = StringProperty() dataOwnerName = StringProperty() dataOwnerZone = StringProperty() replNum = IntegerProperty() replStatus = IntegerProperty() statusString = StringProperty() dataId = LongProperty() collId = LongProperty() dataMapId = IntegerProperty() dataComments = StringProperty() dataMode = StringProperty() dataExpiry = StringProperty() dataCreate = StringProperty() dataModify = StringProperty() dataAccess = StringProperty() dataAccessInx = IntegerProperty() writeFlag = IntegerProperty() destRescName = StringProperty() backupRescName = StringProperty() subPath = StringProperty() specColl = IntegerProperty() regUid = IntegerProperty() otherFlags = IntegerProperty() KeyValPair_PI = SubmessageProperty(StringStringMap) in_pdmo = StringProperty() next = IntegerProperty() rescId = LongProperty()
class ErrorMessage(Message): _name = 'RErrMsg_PI' status = IntegerProperty() msg = StringProperty()
class DataObjChksumResponse(Message): name = 'Str_PI' myStr = StringProperty()