def decode(rsp, agent): _ret_ = rsp['_ret_'] image = [raritan.rpc.webcam.StorageManager.StorageImage.decode(x0, agent) for x0 in rsp['image']] typecheck.is_int(_ret_, DecodeException) for x0 in image: typecheck.is_struct(x0, raritan.rpc.webcam.StorageManager.StorageImage, DecodeException) return (_ret_, image)
def decode(rsp, agent): _ret_ = rsp['_ret_'] meta = [raritan.rpc.webcam.StorageManager.ImageStorageMetaData.decode(x0, agent) for x0 in rsp['meta']] typecheck.is_int(_ret_, DecodeException) for x0 in meta: typecheck.is_struct(x0, raritan.rpc.webcam.StorageManager.ImageStorageMetaData, DecodeException) return (_ret_, meta)
def encode(reqInfo, days): typecheck.is_struct(reqInfo, raritan.rpc.cert.ServerSSLCert.ReqInfo, AssertionError) typecheck.is_int(days, AssertionError) args = {} args['reqInfo'] = raritan.rpc.cert.ServerSSLCert.ReqInfo.encode(reqInfo) args['days'] = days return args
def decode(rsp, agent): _ret_ = rsp['_ret_'] results = [x0 for x0 in rsp['results']] typecheck.is_int(_ret_, DecodeException) for x0 in results: typecheck.is_string(x0, DecodeException) return (_ret_, results)
def encode(hostName, count): typecheck.is_string(hostName, AssertionError) typecheck.is_int(count, AssertionError) args = {} args['hostName'] = hostName args['count'] = count return args
def getRawValue(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getRawValue', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def encode(portNum, hasPower): typecheck.is_int(portNum, AssertionError) typecheck.is_bool(hasPower, AssertionError) args = {} args['portNum'] = portNum args['hasPower'] = hasPower return args
def encode(blockTimeout, maxFailedLogins): typecheck.is_int(blockTimeout, AssertionError) typecheck.is_int(maxFailedLogins, AssertionError) args = {} args['blockTimeout'] = blockTimeout args['maxFailedLogins'] = maxFailedLogins return args
def getBridgeSlaveCount(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getBridgeSlaveCount', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def encode(id, settings): typecheck.is_int(id, AssertionError) typecheck.is_struct(settings, raritan.rpc.servermon.ServerMonitor.ServerSettings, AssertionError) args = {} args['id'] = id args['settings'] = raritan.rpc.servermon.ServerMonitor.ServerSettings.encode(settings) return args
def encode(sessionId, reason): typecheck.is_int(sessionId, AssertionError) typecheck.is_enum(reason, raritan.rpc.session.SessionManager.CloseReason, AssertionError) args = {} args['sessionId'] = sessionId args['reason'] = raritan.rpc.session.SessionManager.CloseReason.encode(reason) return args
def installPendingKeyPair(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'installPendingKeyPair', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def decode(rsp, agent): _ret_ = rsp['_ret_'] values = [x0 for x0 in rsp['values']] typecheck.is_int(_ret_, DecodeException) for x0 in values: typecheck.is_string(x0, DecodeException) return (_ret_, values)
def encode(startIndex, count): typecheck.is_int(startIndex, AssertionError) typecheck.is_int(count, AssertionError) args = {} args['startIndex'] = startIndex args['count'] = count return args
def acknowledgeAlertStatus(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'acknowledgeAlertStatus', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def getIdleTimeoutSettings(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getIdleTimeoutSettings', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def getIndex(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getIndex', args) idx = rsp['idx'] typecheck.is_int(idx, DecodeException) return idx
def __init__(self, tcp, serial, primaryUnitId): typecheck.is_struct(tcp, raritan.rpc.devsettings.Modbus.TcpSettings, AssertionError) typecheck.is_struct(serial, raritan.rpc.devsettings.Modbus.SerialSettings, AssertionError) typecheck.is_int(primaryUnitId, AssertionError) self.tcp = tcp self.serial = serial self.primaryUnitId = primaryUnitId
def __init__(self, id, name, enableAutoDST): typecheck.is_int(id, AssertionError) typecheck.is_string(name, AssertionError) typecheck.is_bool(enableAutoDST, AssertionError) self.id = id self.name = name self.enableAutoDST = enableAutoDST
def __init__(self, width, height, pixelFormat): typecheck.is_int(width, AssertionError) typecheck.is_int(height, AssertionError) typecheck.is_enum(pixelFormat, raritan.rpc.webcam.PixelFormat, AssertionError) self.width = width self.height = height self.pixelFormat = pixelFormat
def encode(requests, timeoutMs): for x0 in requests: typecheck.is_struct(x0, raritan.rpc.bulkrpc.BulkRequest.Request, AssertionError) typecheck.is_int(timeoutMs, AssertionError) args = {} args['requests'] = [raritan.rpc.bulkrpc.BulkRequest.Request.encode(x0) for x0 in requests] args['timeoutMs'] = timeoutMs return args
def __init__(self, imageMeta, fileSize, storageMeta): typecheck.is_struct(imageMeta, raritan.rpc.webcam.ImageMetaData, AssertionError) typecheck.is_int(fileSize, AssertionError) typecheck.is_struct(storageMeta, raritan.rpc.webcam.StorageManager.StorageMetaData, AssertionError) self.imageMeta = imageMeta self.fileSize = fileSize self.storageMeta = storageMeta
def __init__(self, id, name, info): typecheck.is_int(id, AssertionError) typecheck.is_string(name, AssertionError) typecheck.is_struct(info, raritan.rpc.usermgmt.Role.Info, AssertionError) self.id = id self.name = name self.info = info
def __init__(self, appProtoId, appProtoName, transportProtoName): typecheck.is_int(appProtoId, AssertionError) typecheck.is_string(appProtoName, AssertionError) typecheck.is_string(transportProtoName, AssertionError) self.appProtoId = appProtoId self.appProtoName = appProtoName self.transportProtoName = transportProtoName
def __init__(self, value, rawValue, metadata): typecheck.is_double(value, AssertionError) typecheck.is_int(rawValue, AssertionError) typecheck.is_struct(metadata, raritan.rpc.lhxmodel.Parameter.MetaData, AssertionError) self.value = value self.rawValue = rawValue self.metadata = metadata
def __init__(self, min, max, decdigits): typecheck.is_double(min, AssertionError) typecheck.is_double(max, AssertionError) typecheck.is_int(decdigits, AssertionError) self.min = min self.max = max self.decdigits = decdigits
def __init__(self, timestamp, available, value): typecheck.is_time(timestamp, AssertionError) typecheck.is_bool(available, AssertionError) typecheck.is_int(value, AssertionError) self.timestamp = timestamp self.available = available self.value = value
def __init__(self, creationTime, idFirst, idNext): typecheck.is_long(creationTime, AssertionError) typecheck.is_int(idFirst, AssertionError) typecheck.is_int(idNext, AssertionError) self.creationTime = creationTime self.idFirst = idFirst self.idNext = idNext
def decode(rsp, agent): _ret_ = rsp['_ret_'] session = raritan.rpc.session.Session.decode(rsp['session'], agent) token = rsp['token'] typecheck.is_int(_ret_, DecodeException) typecheck.is_struct(session, raritan.rpc.session.Session, DecodeException) typecheck.is_string(token, DecodeException) return (_ret_, session, token)
def __init__(self, id, name, hasDSTInfo): typecheck.is_int(id, AssertionError) typecheck.is_string(name, AssertionError) typecheck.is_bool(hasDSTInfo, AssertionError) self.id = id self.name = name self.hasDSTInfo = hasDSTInfo
def encode(id): typecheck.is_int(id, AssertionError) args = {} args['id'] = id return args
def decode(rsp, agent): _ret_ = rsp['_ret_'] numPorts = rsp['numPorts'] typecheck.is_int(_ret_, DecodeException) typecheck.is_int(numPorts, DecodeException) return (_ret_, numPorts)
def __init__(self, systemType, displayMode): typecheck.is_int(systemType, AssertionError) typecheck.is_int(displayMode, AssertionError) self.systemType = systemType self.displayMode = displayMode
def __init__(self, subject, keyLength): typecheck.is_struct(subject, raritan.rpc.cert.ServerSSLCert.CommonAttributes, AssertionError) typecheck.is_int(keyLength, AssertionError) self.subject = subject self.keyLength = keyLength
def decode(rsp, agent): _ret_ = rsp['_ret_'] captureToken = rsp['captureToken'] typecheck.is_int(_ret_, DecodeException) typecheck.is_string(captureToken, DecodeException) return (_ret_, captureToken)
def encode(cycleTime_ms): typecheck.is_int(cycleTime_ms, AssertionError) args = {} args['cycleTime_ms'] = cycleTime_ms return args
def __init__(self, status, message): typecheck.is_int(status, AssertionError) typecheck.is_string(message, AssertionError) self.status = status self.message = message
def __init__(self, code, errtext): typecheck.is_int(code, AssertionError) typecheck.is_string(errtext, AssertionError) self.code = code self.errtext = errtext
def encode(portNum): typecheck.is_int(portNum, AssertionError) args = {} args['portNum'] = portNum return args
def decode(rsp, agent): _ret_ = rsp['_ret_'] id = rsp['id'] typecheck.is_int(_ret_, DecodeException) typecheck.is_int(id, DecodeException) return (_ret_, id)
def decode(rsp, agent): _ret_ = rsp['_ret_'] errstr = rsp['errstr'] typecheck.is_int(_ret_, DecodeException) typecheck.is_string(errstr, DecodeException) return (_ret_, errstr)
def decode(rsp, agent): _ret_ = rsp['_ret_'] cardInfo = raritan.rpc.smartcard.CardReader.CardInformation.decode(rsp['cardInfo'], agent) typecheck.is_int(_ret_, DecodeException) typecheck.is_struct(cardInfo, raritan.rpc.smartcard.CardReader.CardInformation, DecodeException) return (_ret_, cardInfo)
def setScanInterval(self, interval): agent = self.agent typecheck.is_int(interval, AssertionError) args = {} args['interval'] = interval rsp = agent.json_rpc(self.target, 'setScanInterval', args)
def encode(interval): typecheck.is_int(interval, AssertionError) args = {} args['interval'] = interval return args
def decode(rsp, agent): _ret_ = rsp['_ret_'] state = raritan.rpc.luaservice.ScriptState.decode(rsp['state'], agent) typecheck.is_int(_ret_, DecodeException) typecheck.is_struct(state, raritan.rpc.luaservice.ScriptState, DecodeException) return (_ret_, state)
def decode(rsp, agent): _ret_ = rsp['_ret_'] server = raritan.rpc.servermon.ServerMonitor.Server.decode(rsp['server'], agent) typecheck.is_int(_ret_, DecodeException) typecheck.is_struct(server, raritan.rpc.servermon.ServerMonitor.Server, DecodeException) return (_ret_, server)
def encode(rs485Addr): typecheck.is_int(rs485Addr, AssertionError) args = {} args['rs485Addr'] = rs485Addr return args
def decode(rsp, agent): _ret_ = rsp['_ret_'] script = rsp['script'] typecheck.is_int(_ret_, DecodeException) typecheck.is_string(script, DecodeException) return (_ret_, script)
def encode(idleTimeout): typecheck.is_int(idleTimeout, AssertionError) args = {} args['idleTimeout'] = idleTimeout return args
def decode(rsp, agent): _ret_ = rsp['_ret_'] options = raritan.rpc.luaservice.ScriptOptions.decode(rsp['options'], agent) typecheck.is_int(_ret_, DecodeException) typecheck.is_struct(options, raritan.rpc.luaservice.ScriptOptions, DecodeException) return (_ret_, options)
def decode(rsp, agent): _ret_ = rsp['_ret_'] index = long(rsp['index']) typecheck.is_int(_ret_, DecodeException) typecheck.is_long(index, DecodeException) return (_ret_, index)
def __init__(self, host, enabled, pingInterval, retryInterval, activationCount, failureCount, resumeDelay, resumeCount): typecheck.is_string(host, AssertionError) typecheck.is_bool(enabled, AssertionError) typecheck.is_int(pingInterval, AssertionError) typecheck.is_int(retryInterval, AssertionError) typecheck.is_int(activationCount, AssertionError) typecheck.is_int(failureCount, AssertionError) typecheck.is_int(resumeDelay, AssertionError) typecheck.is_int(resumeCount, AssertionError) self.host = host self.enabled = enabled self.pingInterval = pingInterval self.retryInterval = retryInterval self.activationCount = activationCount self.failureCount = failureCount self.resumeDelay = resumeDelay self.resumeCount = resumeCount
def decode(rsp, agent): blockTimeout = rsp['blockTimeout'] maxFailedLogins = rsp['maxFailedLogins'] typecheck.is_int(blockTimeout, DecodeException) typecheck.is_int(maxFailedLogins, DecodeException) return (blockTimeout, maxFailedLogins)
def __init__(self, dialInEnabled, ringsUntilAnswer): typecheck.is_bool(dialInEnabled, AssertionError) typecheck.is_int(ringsUntilAnswer, AssertionError) self.dialInEnabled = dialInEnabled self.ringsUntilAnswer = ringsUntilAnswer
def __init__(self, json, statcode): typecheck.is_string(json, AssertionError) typecheck.is_int(statcode, AssertionError) self.json = json self.statcode = statcode
def __init__(self, maxScriptMemoryGrowth, maxAmountOfScripts, amountOfScripts, maxScriptSize, maxAllScriptSize, allScriptSize, outputBufferSize, restartInterval, autoStartDelay): typecheck.is_int(maxScriptMemoryGrowth, AssertionError) typecheck.is_int(maxAmountOfScripts, AssertionError) typecheck.is_int(amountOfScripts, AssertionError) typecheck.is_int(maxScriptSize, AssertionError) typecheck.is_int(maxAllScriptSize, AssertionError) typecheck.is_int(allScriptSize, AssertionError) typecheck.is_int(outputBufferSize, AssertionError) typecheck.is_int(restartInterval, AssertionError) typecheck.is_int(autoStartDelay, AssertionError) self.maxScriptMemoryGrowth = maxScriptMemoryGrowth self.maxAmountOfScripts = maxAmountOfScripts self.amountOfScripts = amountOfScripts self.maxScriptSize = maxScriptSize self.maxAllScriptSize = maxAllScriptSize self.allScriptSize = allScriptSize self.outputBufferSize = outputBufferSize self.restartInterval = restartInterval self.autoStartDelay = autoStartDelay
def decode(rsp, agent): _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def decode(rsp, agent): firstIndex = rsp['firstIndex'] entryCount = rsp['entryCount'] typecheck.is_int(firstIndex, DecodeException) typecheck.is_int(entryCount, DecodeException) return (firstIndex, entryCount)
def decode(rsp, agent): _ret_ = rsp['_ret_'] diagMsg = rsp['diagMsg'] typecheck.is_int(_ret_, DecodeException) typecheck.is_string(diagMsg, DecodeException) return (_ret_, diagMsg)