def __init__( self, token, username, remoteIp, clientType, creationTime, timeout, idle, userIdle, ): typecheck.is_string(token, AssertionError) typecheck.is_string(username, AssertionError) typecheck.is_string(remoteIp, AssertionError) typecheck.is_string(clientType, AssertionError) typecheck.is_time(creationTime, AssertionError) typecheck.is_int(timeout, AssertionError) typecheck.is_int(idle, AssertionError) typecheck.is_int(userIdle, AssertionError) self.token = token self.username = username self.remoteIp = remoteIp self.clientType = clientType self.creationTime = creationTime self.timeout = timeout self.idle = idle self.userIdle = userIdle
def __init__( self, reachable, lastRequest, lastResponse, requests, responses, failures, resumes, ): typecheck.is_enum( reachable, raritan.rpc.servermon.ServerMonitor.ServerReachability, AssertionError, ) typecheck.is_time(lastRequest, AssertionError) typecheck.is_time(lastResponse, AssertionError) typecheck.is_int(requests, AssertionError) typecheck.is_int(responses, AssertionError) typecheck.is_int(failures, AssertionError) typecheck.is_int(resumes, AssertionError) self.reachable = reachable self.lastRequest = lastRequest self.lastResponse = lastResponse self.requests = requests self.responses = responses self.failures = failures self.resumes = resumes
def getSensorSetTimestamp(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getSensorSetTimestamp', args) _ret_ = raritan.rpc.Time.decode(rsp['_ret_']) typecheck.is_time(_ret_, DecodeException) return _ret_
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, timestamp, status, value): typecheck.is_time(timestamp, AssertionError) typecheck.is_struct(status, raritan.rpc.lhxmodel.Parameter.Status, AssertionError) typecheck.is_double(value, AssertionError) self.timestamp = timestamp self.status = status self.value = value
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 getStatus(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getStatus', args) status = raritan.rpc.bulkcfg.BulkConfiguration.Status.decode(rsp['status']) timeStamp = raritan.rpc.Time.decode(rsp['timeStamp']) typecheck.is_enum(status, raritan.rpc.bulkcfg.BulkConfiguration.Status, DecodeException) typecheck.is_time(timeStamp, DecodeException) return (status, timeStamp)
def decode(rsp, agent): status = raritan.rpc.bulkcfg.BulkConfiguration.Status.decode( rsp['status']) timeStamp = raritan.rpc.Time.decode(rsp['timeStamp']) typecheck.is_enum(status, raritan.rpc.bulkcfg.BulkConfiguration.Status, DecodeException) typecheck.is_time(timeStamp, DecodeException) return (status, timeStamp)
def __init__(self, timestamp, state, value, isValid): typecheck.is_time(timestamp, AssertionError) typecheck.is_int(state, AssertionError) typecheck.is_double(value, AssertionError) typecheck.is_bool(isValid, AssertionError) self.timestamp = timestamp self.state = state self.value = value self.isValid = isValid
def decode(rsp, agent): zone = raritan.rpc.datetime.DateTime.ZoneInfo.decode(rsp['zone'], agent) dstEnabled = rsp['dstEnabled'] utcOffset = rsp['utcOffset'] currentTime = raritan.rpc.Time.decode(rsp['currentTime']) typecheck.is_struct(zone, raritan.rpc.datetime.DateTime.ZoneInfo, DecodeException) typecheck.is_bool(dstEnabled, DecodeException) typecheck.is_int(utcOffset, DecodeException) typecheck.is_time(currentTime, DecodeException) return (zone, dstEnabled, utcOffset, currentTime)
def __init__(self, zoneCfg, protocol, deviceTime, ntpCfg): typecheck.is_struct(zoneCfg, raritan.rpc.datetime.DateTime.ZoneCfg, AssertionError) typecheck.is_enum(protocol, raritan.rpc.datetime.DateTime.Protocol, AssertionError) typecheck.is_time(deviceTime, AssertionError) typecheck.is_struct(ntpCfg, raritan.rpc.datetime.DateTime.NtpCfg, AssertionError) self.zoneCfg = zoneCfg self.protocol = protocol self.deviceTime = deviceTime self.ntpCfg = ntpCfg
def __init__(self, id, timestamp, eventClass, message): typecheck.is_int(id, AssertionError) typecheck.is_time(timestamp, AssertionError) typecheck.is_string(eventClass, AssertionError) typecheck.is_string(message, AssertionError) self.id = id self.timestamp = timestamp self.eventClass = eventClass self.message = message
def getStatus(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, "getStatus", args) status = raritan.rpc.bulkcfg.BulkConfiguration.Status.decode( rsp["status"]) timeStamp = raritan.rpc.Time.decode(rsp["timeStamp"]) typecheck.is_enum(status, raritan.rpc.bulkcfg.BulkConfiguration.Status, DecodeException) typecheck.is_time(timeStamp, DecodeException) return (status, timeStamp)
def __init__(self, timestamp, oldVersion, imageVersion, imageMD5, status): typecheck.is_time(timestamp, AssertionError) typecheck.is_string(oldVersion, AssertionError) typecheck.is_string(imageVersion, AssertionError) typecheck.is_string(imageMD5, AssertionError) typecheck.is_enum(status, raritan.rpc.firmware.UpdateHistoryStatus, AssertionError) self.timestamp = timestamp self.oldVersion = oldVersion self.imageVersion = imageVersion self.imageMD5 = imageMD5 self.status = status
def __init__(self, timestamp, available, status, valid, value): typecheck.is_time(timestamp, AssertionError) typecheck.is_bool(available, AssertionError) typecheck.is_struct(status, raritan.rpc.sensors.NumericSensor.Reading.Status, AssertionError) typecheck.is_bool(valid, AssertionError) typecheck.is_double(value, AssertionError) self.timestamp = timestamp self.available = available self.status = status self.valid = valid self.value = value
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 __init__(self, sensorSetTimestamp, timestamp, sensorRecords, peripheralDeviceRecords): typecheck.is_time(sensorSetTimestamp, AssertionError) typecheck.is_time(timestamp, AssertionError) for x0 in sensorRecords: typecheck.is_struct(x0, raritan.rpc.sensors.Logger.Record, AssertionError) for x0 in peripheralDeviceRecords: typecheck.is_struct(x0, raritan.rpc.sensors.Logger.Record, AssertionError) self.sensorSetTimestamp = sensorSetTimestamp self.timestamp = timestamp self.sensorRecords = sensorRecords self.peripheralDeviceRecords = peripheralDeviceRecords
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, id, value, thresholdValue, rawValue, powerOnHours, timeStampUTC): typecheck.is_string(id, AssertionError) typecheck.is_int(value, AssertionError) typecheck.is_int(thresholdValue, AssertionError) typecheck.is_long(rawValue, AssertionError) typecheck.is_int(powerOnHours, AssertionError) typecheck.is_time(timeStampUTC, AssertionError) self.id = id self.value = value self.thresholdValue = thresholdValue self.rawValue = rawValue self.powerOnHours = powerOnHours self.timeStampUTC = timeStampUTC
def getTimeStamps(self, recid, count): agent = self.agent typecheck.is_int(recid, AssertionError) typecheck.is_int(count, AssertionError) args = {} args['recid'] = recid args['count'] = count rsp = agent.json_rpc(self.target, 'getTimeStamps', args) _ret_ = rsp['_ret_'] timestamps = [raritan.rpc.Time.decode(x0) for x0 in rsp['timestamps']] typecheck.is_int(_ret_, DecodeException) for x0 in timestamps: typecheck.is_time(x0, DecodeException) return (_ret_, timestamps)
def __init__(self, type, id, asserted, timeStamp, context): typecheck.is_enum(type, raritan.rpc.event.Event.Type, AssertionError) for x0 in id: typecheck.is_string(x0, AssertionError) typecheck.is_bool(asserted, AssertionError) typecheck.is_time(timeStamp, AssertionError) for x0 in context: typecheck.is_struct(x0, raritan.rpc.event.KeyValue, AssertionError) self.type = type self.id = id self.asserted = asserted self.timeStamp = timeStamp self.context = context
def updateAvailable(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, "updateAvailable", args) _ret_ = rsp["_ret_"] failedCheck = rsp["failedCheck"] lastChecked = raritan.rpc.Time.decode(rsp["lastChecked"]) version = rsp["version"] url = rsp["url"] typecheck.is_bool(_ret_, DecodeException) typecheck.is_bool(failedCheck, DecodeException) typecheck.is_time(lastChecked, DecodeException) typecheck.is_string(version, DecodeException) typecheck.is_string(url, DecodeException) return (_ret_, failedCheck, lastChecked, version, url)
def updateAvailable(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'updateAvailable', args) _ret_ = rsp['_ret_'] failedCheck = rsp['failedCheck'] lastChecked = raritan.rpc.Time.decode(rsp['lastChecked']) version = rsp['version'] url = rsp['url'] typecheck.is_bool(_ret_, DecodeException) typecheck.is_bool(failedCheck, DecodeException) typecheck.is_time(lastChecked, DecodeException) typecheck.is_string(version, DecodeException) typecheck.is_string(url, DecodeException) return (_ret_, failedCheck, lastChecked, version, url)
def __init__(self, reachable, lastRequest, lastResponse, requests, responses, failures, resumes): typecheck.is_enum(reachable, raritan.rpc.servermon.ServerMonitor.ServerReachability, AssertionError) typecheck.is_time(lastRequest, AssertionError) typecheck.is_time(lastResponse, AssertionError) typecheck.is_int(requests, AssertionError) typecheck.is_int(responses, AssertionError) typecheck.is_int(failures, AssertionError) typecheck.is_int(resumes, AssertionError) self.reachable = reachable self.lastRequest = lastRequest self.lastResponse = lastResponse self.requests = requests self.responses = responses self.failures = failures self.resumes = resumes
def getTime(self, useOlson): agent = self.agent typecheck.is_bool(useOlson, AssertionError) args = {} args['useOlson'] = useOlson rsp = agent.json_rpc(self.target, 'getTime', args) zone = raritan.rpc.datetime.DateTime.ZoneInfo.decode( rsp['zone'], agent) dstEnabled = rsp['dstEnabled'] utcOffset = rsp['utcOffset'] currentTime = raritan.rpc.Time.decode(rsp['currentTime']) typecheck.is_struct(zone, raritan.rpc.datetime.DateTime.ZoneInfo, DecodeException) typecheck.is_bool(dstEnabled, DecodeException) typecheck.is_int(utcOffset, DecodeException) typecheck.is_time(currentTime, DecodeException) return (zone, dstEnabled, utcOffset, currentTime)
def __init__(self, sessionId, username, remoteIp, clientType, creationTime, timeout, idle, userIdle): typecheck.is_int(sessionId, AssertionError) typecheck.is_string(username, AssertionError) typecheck.is_string(remoteIp, AssertionError) typecheck.is_string(clientType, AssertionError) typecheck.is_time(creationTime, AssertionError) typecheck.is_int(timeout, AssertionError) typecheck.is_int(idle, AssertionError) typecheck.is_int(userIdle, AssertionError) self.sessionId = sessionId self.username = username self.remoteIp = remoteIp self.clientType = clientType self.creationTime = creationTime self.timeout = timeout self.idle = idle self.userIdle = userIdle
def decode(rsp, agent): status = raritan.rpc.bulkcfg.BulkConfiguration.Status.decode(rsp['status']) timeStamp = raritan.rpc.Time.decode(rsp['timeStamp']) typecheck.is_enum(status, raritan.rpc.bulkcfg.BulkConfiguration.Status, DecodeException) typecheck.is_time(timeStamp, DecodeException) return (status, timeStamp)
def __init__(self, timestamp, record): typecheck.is_time(timestamp, AssertionError) typecheck.is_struct(record, raritan.rpc.sensors.Logger.Record, AssertionError) self.timestamp = timestamp self.record = record