def getVersion(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getVersion', args) _ret_ = rsp['_ret_'] typecheck.is_string(_ret_, DecodeException) return _ret_
def __init__(self, oldName, newName, actUserName, actIpAddr, source): super(raritan.rpc.lhxmodel.Config.PortNameChangedEvent, self).__init__(actUserName, actIpAddr, source) typecheck.is_string(oldName, AssertionError) typecheck.is_string(newName, AssertionError) self.oldName = oldName self.newName = newName
def encode(webcam, clientType): typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError) typecheck.is_string(clientType, AssertionError) args = {} args['webcam'] = Interface.encode(webcam) args['clientType'] = clientType return args
def __init__(self, id, supportedFormats): typecheck.is_string(id, AssertionError) for x0 in supportedFormats: typecheck.is_struct(x0, raritan.rpc.webcam.Format, AssertionError) self.id = id self.supportedFormats = supportedFormats
def encode(recipient, text): typecheck.is_string(recipient, AssertionError) typecheck.is_string(text, AssertionError) args = {} args['recipient'] = recipient args['text'] = text return args
def getMasterIpV6Address(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getMasterIpV6Address', args) masterIpV6Address = rsp['masterIpV6Address'] typecheck.is_string(masterIpV6Address, DecodeException) return masterIpV6Address
def encode(password, info): typecheck.is_string(password, AssertionError) typecheck.is_struct(info, raritan.rpc.usermgmt.UserInfo, AssertionError) args = {} args['password'] = password args['info'] = raritan.rpc.usermgmt.UserInfo.encode(info) return args
def encode(puk, newPin): typecheck.is_string(puk, AssertionError) typecheck.is_string(newPin, AssertionError) args = {} args['puk'] = puk args['newPin'] = newPin return args
def encode(name, iAddr): typecheck.is_string(name, AssertionError) typecheck.is_long(iAddr, AssertionError) args = {} args['name'] = name args['iAddr'] = iAddr return args
def encode(reqInfo, challenge): typecheck.is_struct(reqInfo, raritan.rpc.cert.ServerSSLCert.ReqInfo, AssertionError) typecheck.is_string(challenge, AssertionError) args = {} args['reqInfo'] = raritan.rpc.cert.ServerSSLCert.ReqInfo.encode(reqInfo) args['challenge'] = challenge return args
def encode(name, options): typecheck.is_string(name, AssertionError) typecheck.is_struct(options, raritan.rpc.luaservice.ScriptOptions, AssertionError) args = {} args['name'] = name args['options'] = raritan.rpc.luaservice.ScriptOptions.encode(options) return args
def __init__(self, state, reason, source): super(raritan.rpc.hmi.InternalBeeper.StateChangedEvent, self).__init__(source) typecheck.is_enum(state, raritan.rpc.hmi.InternalBeeper.State, AssertionError) typecheck.is_string(reason, AssertionError) self.state = state self.reason = reason
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(ctxName, logLevel): typecheck.is_string(ctxName, AssertionError) typecheck.is_enum(logLevel, raritan.rpc.diag.DiagLogSettings.LogLevel, AssertionError) args = {} args['ctxName'] = ctxName args['logLevel'] = raritan.rpc.diag.DiagLogSettings.LogLevel.encode(logLevel) return args
def encode(name, info): typecheck.is_string(name, AssertionError) typecheck.is_struct(info, raritan.rpc.usermgmt.Role.Info, AssertionError) args = {} args['name'] = name args['info'] = raritan.rpc.usermgmt.Role.Info.encode(info) return args
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 __init__(self, name, args): typecheck.is_string(name, AssertionError) for x0 in args: typecheck.is_string(x0, AssertionError) self.name = name self.args = args
def encode(hostName, count): typecheck.is_string(hostName, AssertionError) typecheck.is_int(count, AssertionError) args = {} args['hostName'] = hostName args['count'] = count return args
def encode(username, password): typecheck.is_string(username, AssertionError) typecheck.is_string(password, AssertionError) args = {} args['username'] = username args['password'] = password return args
def encode(service, password): typecheck.is_string(service, AssertionError) typecheck.is_string(password, AssertionError) args = {} args['service'] = service args['password'] = password return args
def encode(recipient, testSettings): typecheck.is_string(recipient, AssertionError) typecheck.is_struct(testSettings, raritan.rpc.serial.GsmModem.Settings, AssertionError) args = {} args['recipient'] = recipient args['testSettings'] = raritan.rpc.serial.GsmModem.Settings.encode(testSettings) return args
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, creationTime, remoteIp, clientType): typecheck.is_time(creationTime, AssertionError) typecheck.is_string(remoteIp, AssertionError) typecheck.is_string(clientType, AssertionError) self.creationTime = creationTime self.remoteIp = remoteIp self.clientType = clientType
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 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, type, name, value): typecheck.is_enum(type, raritan.rpc.res_mon.Entry.Type, AssertionError) typecheck.is_string(name, AssertionError) typecheck.is_long(value, AssertionError) self.type = type self.name = name self.value = value
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 closeSession(self, token, reason): agent = self.agent typecheck.is_string(token, AssertionError) typecheck.is_enum(reason, raritan.rpc.session.SessionManager.CloseReason, AssertionError) args = {} args['token'] = token args['reason'] = raritan.rpc.session.SessionManager.CloseReason.encode(reason) rsp = agent.json_rpc(self.target, 'closeSession', args)
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 getDetectableDevices(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getDetectableDevices', args) _ret_ = [x0 for x0 in rsp['_ret_']] for x0 in _ret_: typecheck.is_string(x0, DecodeException) return _ret_
def addAction(self, action): agent = self.agent typecheck.is_struct(action, raritan.rpc.event.Engine.Action, AssertionError) args = {} args["action"] = raritan.rpc.event.Engine.Action.encode(action) rsp = agent.json_rpc(self.target, "addAction", args) _ret_ = rsp["_ret_"] actionId = rsp["actionId"] typecheck.is_int(_ret_, DecodeException) typecheck.is_string(actionId, DecodeException) return (_ret_, actionId)
def __init__(self, eventId, executionTime): for x0 in eventId: typecheck.is_string(x0, AssertionError) typecheck.is_struct( executionTime, raritan.rpc.event.TimerEventManager.Schedule, AssertionError, ) self.eventId = eventId self.executionTime = executionTime
def addRule(self, rule): agent = self.agent typecheck.is_struct(rule, raritan.rpc.event.Engine.Rule, AssertionError) args = {} args["rule"] = raritan.rpc.event.Engine.Rule.encode(rule) rsp = agent.json_rpc(self.target, "addRule", args) _ret_ = rsp["_ret_"] ruleId = rsp["ruleId"] typecheck.is_int(_ret_, DecodeException) typecheck.is_string(ruleId, DecodeException) return (_ret_, ruleId)
def unlockSimCard(self, puk, newPin): agent = self.agent typecheck.is_string(puk, AssertionError) typecheck.is_string(newPin, AssertionError) args = {} args['puk'] = puk args['newPin'] = newPin rsp = agent.json_rpc(self.target, 'unlockSimCard', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def encode(username, password, settings): typecheck.is_string(username, AssertionError) typecheck.is_string(password, AssertionError) typecheck.is_struct(settings, raritan.rpc.radius.ServerSettings, AssertionError) args = {} args['username'] = username args['password'] = password args['settings'] = raritan.rpc.radius.ServerSettings.encode( settings) return args
def generateUnsignedKeyPair(self, reqInfo, challenge): agent = self.agent typecheck.is_struct(reqInfo, raritan.rpc.cert.ServerSSLCert.ReqInfo, AssertionError) typecheck.is_string(challenge, AssertionError) args = {} args['reqInfo'] = raritan.rpc.cert.ServerSSLCert.ReqInfo.encode(reqInfo) args['challenge'] = challenge rsp = agent.json_rpc(self.target, 'generateUnsignedKeyPair', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def encode(ctxName, logLevel): typecheck.is_string(ctxName, AssertionError) typecheck.is_enum(logLevel, raritan.rpc.diag.DiagLogSettings.LogLevel, AssertionError) args = {} args['ctxName'] = ctxName args[ 'logLevel'] = raritan.rpc.diag.DiagLogSettings.LogLevel.encode( logLevel) return args
def sendSms(self, recipient, text): agent = self.agent typecheck.is_string(recipient, AssertionError) typecheck.is_string(text, AssertionError) args = {} args['recipient'] = recipient args['text'] = text rsp = agent.json_rpc(self.target, 'sendSms', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def __init__(self, type, address, options, orientation): typecheck.is_string(type, AssertionError) typecheck.is_string(address, AssertionError) typecheck.is_enum(orientation, raritan.rpc.test.Display.Orientation, AssertionError) self.type = type self.address = address self.options = options self.orientation = orientation
def __init__(self, subject, names, keyLength): typecheck.is_struct( subject, raritan.rpc.cert.ServerSSLCert.CommonAttributes, AssertionError) for x0 in names: typecheck.is_string(x0, AssertionError) typecheck.is_int(keyLength, AssertionError) self.subject = subject self.names = names self.keyLength = keyLength
def __init__(self, startIp, endIp, roleId, policy): typecheck.is_string(startIp, AssertionError) typecheck.is_string(endIp, AssertionError) typecheck.is_int(roleId, AssertionError) typecheck.is_enum(policy, raritan.rpc.security.RoleAccessPolicy, AssertionError) self.startIp = startIp self.endIp = endIp self.roleId = roleId self.policy = policy
def __init__(self, userName, ipAddr, oldConfig, newConfig, source): super(raritan.rpc.devsettings.Snmp.ConfigurationChangedEvent, self).__init__(source) typecheck.is_string(userName, AssertionError) typecheck.is_string(ipAddr, AssertionError) typecheck.is_struct(oldConfig, raritan.rpc.devsettings.Snmp.Configuration, AssertionError) typecheck.is_struct(newConfig, raritan.rpc.devsettings.Snmp.Configuration, AssertionError) self.userName = userName self.ipAddr = ipAddr self.oldConfig = oldConfig self.newConfig = newConfig
def createRoleFull(self, name, info): agent = self.agent typecheck.is_string(name, AssertionError) typecheck.is_struct(info, raritan.rpc.usermgmt.Role.Info, AssertionError) args = {} args['name'] = name args['info'] = raritan.rpc.usermgmt.Role.Info.encode(info) rsp = agent.json_rpc(self.target, 'createRoleFull', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def getMACs(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, "getMACs", args) state = raritan.rpc.net.InterfaceState.decode(rsp["state"], agent) ethmac = rsp["ethmac"] wlanmac = rsp["wlanmac"] typecheck.is_struct(state, raritan.rpc.net.InterfaceState, DecodeException) typecheck.is_string(ethmac, DecodeException) typecheck.is_string(wlanmac, DecodeException) return (state, ethmac, wlanmac)
def setPassword(self, service, password): agent = self.agent typecheck.is_string(service, AssertionError) typecheck.is_string(password, AssertionError) args = {} args["service"] = service args["password"] = password rsp = agent.json_rpc(self.target, "setPassword", args) _ret_ = rsp["_ret_"] typecheck.is_int(_ret_, DecodeException) return _ret_
def sendSms(self, recipient, text): agent = self.agent typecheck.is_string(recipient, AssertionError) typecheck.is_string(text, AssertionError) args = {} args["recipient"] = recipient args["text"] = text rsp = agent.json_rpc(self.target, "sendSms", args) _ret_ = rsp["_ret_"] typecheck.is_int(_ret_, DecodeException) return _ret_
def unlockSimCard(self, puk, newPin): agent = self.agent typecheck.is_string(puk, AssertionError) typecheck.is_string(newPin, AssertionError) args = {} args["puk"] = puk args["newPin"] = newPin rsp = agent.json_rpc(self.target, "unlockSimCard", args) _ret_ = rsp["_ret_"] typecheck.is_int(_ret_, DecodeException) return _ret_
def updateAccountFull(self, password, info): agent = self.agent typecheck.is_string(password, AssertionError) typecheck.is_struct(info, raritan.rpc.usermgmt.UserInfo, AssertionError) args = {} args['password'] = password args['info'] = raritan.rpc.usermgmt.UserInfo.encode(info) rsp = agent.json_rpc(self.target, 'updateAccountFull', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def __init__(self, name, desc, args): typecheck.is_string(name, AssertionError) typecheck.is_string(desc, AssertionError) for x0 in args: typecheck.is_struct( x0, raritan.rpc.usermgmt.RoleManager.ArgumentDesc, AssertionError) self.name = name self.desc = desc self.args = args
def closeSession(self, token, reason): agent = self.agent typecheck.is_string(token, AssertionError) typecheck.is_enum(reason, raritan.rpc.session.SessionManager.CloseReason, AssertionError) args = {} args["token"] = token args["reason"] = raritan.rpc.session.SessionManager.CloseReason.encode( reason) rsp = agent.json_rpc(self.target, "closeSession", args)
def createAccount(self, username, password): agent = self.agent typecheck.is_string(username, AssertionError) typecheck.is_string(password, AssertionError) args = {} args['username'] = username args['password'] = password rsp = agent.json_rpc(self.target, 'createAccount', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_
def decode(rsp, agent): _ret_ = rsp['_ret_'] oAddr = int(rsp['oAddr']) nAddr = int(rsp['nAddr']) oString = rsp['oString'] more = rsp['more'] typecheck.is_int(_ret_, DecodeException) typecheck.is_long(oAddr, DecodeException) typecheck.is_long(nAddr, DecodeException) typecheck.is_string(oString, DecodeException) typecheck.is_bool(more, DecodeException) return (_ret_, oAddr, nAddr, oString, more)
def __init__(self, enabled, domainName, secret, port, pollingInterval): typecheck.is_bool(enabled, AssertionError) typecheck.is_string(domainName, AssertionError) typecheck.is_string(secret, AssertionError) typecheck.is_int(port, AssertionError) typecheck.is_int(pollingInterval, AssertionError) self.enabled = enabled self.domainName = domainName self.secret = secret self.port = port self.pollingInterval = pollingInterval
def __init__(self, model, version, setpointWaterValveCfg, setpointVentilatorsCfg, defaultFanSpeedCfg): typecheck.is_string(model, AssertionError) typecheck.is_string(version, AssertionError) typecheck.is_struct(setpointWaterValveCfg, raritan.rpc.lhxmodel.Lhx.ParamCfg, AssertionError) typecheck.is_struct(setpointVentilatorsCfg, raritan.rpc.lhxmodel.Lhx.ParamCfg, AssertionError) typecheck.is_struct(defaultFanSpeedCfg, raritan.rpc.lhxmodel.Lhx.ParamCfg, AssertionError) self.model = model self.version = version self.setpointWaterValveCfg = setpointWaterValveCfg self.setpointVentilatorsCfg = setpointVentilatorsCfg self.defaultFanSpeedCfg = defaultFanSpeedCfg
def __init__(self, eventCondition, message, firstAppearance, lastAppearance, numberAlerts): typecheck.is_string(eventCondition, AssertionError) typecheck.is_string(message, AssertionError) typecheck.is_time(firstAppearance, AssertionError) typecheck.is_time(lastAppearance, AssertionError) typecheck.is_int(numberAlerts, AssertionError) self.eventCondition = eventCondition self.message = message self.firstAppearance = firstAppearance self.lastAppearance = lastAppearance self.numberAlerts = numberAlerts
def __init__(self, format, controls, name, location, refreshInterval): typecheck.is_struct(format, raritan.rpc.webcam.Format, AssertionError) typecheck.is_struct(controls, raritan.rpc.webcam.Controls, AssertionError) typecheck.is_string(name, AssertionError) typecheck.is_struct(location, raritan.rpc.webcam.Location, AssertionError) typecheck.is_int(refreshInterval, AssertionError) self.format = format self.controls = controls self.name = name self.location = location self.refreshInterval = refreshInterval
def __init__(self, username, oldSettings, newSettings, webcam, source): super(raritan.rpc.webcam.WebcamSettingsChangedEvent, self).__init__(webcam, source) typecheck.is_string(username, AssertionError) typecheck.is_struct(oldSettings, raritan.rpc.webcam.Settings, AssertionError) typecheck.is_struct(newSettings, raritan.rpc.webcam.Settings, AssertionError) self.username = username self.oldSettings = oldSettings self.newSettings = newSettings
def __init__(self, state, error_message, time_started, size_total, size_done): typecheck.is_enum(state, raritan.rpc.firmware.ImageState, AssertionError) typecheck.is_string(error_message, AssertionError) typecheck.is_time(time_started, AssertionError) typecheck.is_int(size_total, AssertionError) typecheck.is_int(size_done, AssertionError) self.state = state self.error_message = error_message self.time_started = time_started self.size_total = size_total self.size_done = size_done
def encode(refId, count, direction, categories): typecheck.is_int(refId, AssertionError) typecheck.is_int(count, AssertionError) typecheck.is_enum(direction, raritan.rpc.logging.RangeDirection, AssertionError) for x0 in categories: typecheck.is_string(x0, AssertionError) args = {} args['refId'] = refId args['count'] = count args['direction'] = raritan.rpc.logging.RangeDirection.encode(direction) args['categories'] = [x0 for x0 in categories] return args
def modifyTimerEvent(self, eventId, schedule): agent = self.agent for x0 in eventId: typecheck.is_string(x0, AssertionError) typecheck.is_struct(schedule, raritan.rpc.event.TimerEventManager.Schedule, AssertionError) args = {} args['eventId'] = [x0 for x0 in eventId] args['schedule'] = raritan.rpc.event.TimerEventManager.Schedule.encode(schedule) rsp = agent.json_rpc(self.target, 'modifyTimerEvent', args) _ret_ = rsp['_ret_'] typecheck.is_int(_ret_, DecodeException) return _ret_