Example #1
0
    def __init__(self, enabled, autocfg, ipaddr, netmask, gateway, hostname, dns_suffixes, override_dns, dns_ip_1, dns_ip_2, domain_name):
        typecheck.is_bool(enabled, AssertionError)
        typecheck.is_enum(autocfg, raritan.rpc.net.AutoConfigs, AssertionError)
        typecheck.is_string(ipaddr, AssertionError)
        typecheck.is_string(netmask, AssertionError)
        typecheck.is_string(gateway, AssertionError)
        typecheck.is_string(hostname, AssertionError)
        for x0 in dns_suffixes:
            typecheck.is_string(x0, AssertionError)
        typecheck.is_bool(override_dns, AssertionError)
        typecheck.is_string(dns_ip_1, AssertionError)
        typecheck.is_string(dns_ip_2, AssertionError)
        typecheck.is_string(domain_name, AssertionError)

        self.enabled = enabled
        self.autocfg = autocfg
        self.ipaddr = ipaddr
        self.netmask = netmask
        self.gateway = gateway
        self.hostname = hostname
        self.dns_suffixes = dns_suffixes
        self.override_dns = override_dns
        self.dns_ip_1 = dns_ip_1
        self.dns_ip_2 = dns_ip_2
        self.domain_name = domain_name
Example #2
0
 def isTestMode(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'isTestMode', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
 def isFactoryConfigModeEnabled(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'isFactoryConfigModeEnabled', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #4
0
 def getHttpRedirSettings(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getHttpRedirSettings', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #5
0
    def __init__(self, defaultArgs, autoStart, autoRestart):
        typecheck.is_bool(autoStart, AssertionError)
        typecheck.is_bool(autoRestart, AssertionError)

        self.defaultArgs = defaultArgs
        self.autoStart = autoStart
        self.autoRestart = autoRestart
Example #6
0
    def __init__(self, enabled, autocfg, ipaddr, netmask, gateway, hostname,
                 dns_suffixes, override_dns, dns_ip_1, dns_ip_2, domain_name):
        typecheck.is_bool(enabled, AssertionError)
        typecheck.is_enum(autocfg, raritan.rpc.net.AutoConfigs, AssertionError)
        typecheck.is_string(ipaddr, AssertionError)
        typecheck.is_string(netmask, AssertionError)
        typecheck.is_string(gateway, AssertionError)
        typecheck.is_string(hostname, AssertionError)
        for x0 in dns_suffixes:
            typecheck.is_string(x0, AssertionError)
        typecheck.is_bool(override_dns, AssertionError)
        typecheck.is_string(dns_ip_1, AssertionError)
        typecheck.is_string(dns_ip_2, AssertionError)
        typecheck.is_string(domain_name, AssertionError)

        self.enabled = enabled
        self.autocfg = autocfg
        self.ipaddr = ipaddr
        self.netmask = netmask
        self.gateway = gateway
        self.hostname = hostname
        self.dns_suffixes = dns_suffixes
        self.override_dns = override_dns
        self.dns_ip_1 = dns_ip_1
        self.dns_ip_2 = dns_ip_2
        self.domain_name = domain_name
Example #7
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     info = raritan.rpc.firmware.ImageInfo.decode(rsp['info'], agent)
     typecheck.is_bool(_ret_, DecodeException)
     typecheck.is_struct(info, raritan.rpc.firmware.ImageInfo,
                         DecodeException)
     return (_ret_, info)
Example #8
0
        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
Example #9
0
        def __init__(self, enabled, minute, hour, dayOfMonth, month,
                     dayOfWeek):
            typecheck.is_bool(enabled, AssertionError)
            for x0 in minute:
                typecheck.is_struct(x0,
                                    raritan.rpc.event.TimerEventManager.Range,
                                    AssertionError)
            for x0 in hour:
                typecheck.is_struct(x0,
                                    raritan.rpc.event.TimerEventManager.Range,
                                    AssertionError)
            for x0 in dayOfMonth:
                typecheck.is_struct(x0,
                                    raritan.rpc.event.TimerEventManager.Range,
                                    AssertionError)
            for x0 in month:
                typecheck.is_struct(x0,
                                    raritan.rpc.event.TimerEventManager.Range,
                                    AssertionError)
            for x0 in dayOfWeek:
                typecheck.is_struct(x0,
                                    raritan.rpc.event.TimerEventManager.Range,
                                    AssertionError)

            self.enabled = enabled
            self.minute = minute
            self.hour = hour
            self.dayOfMonth = dayOfMonth
            self.month = month
            self.dayOfWeek = dayOfWeek
 def isAvailable(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'isAvailable', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #11
0
 def isFactoryConfigModeEnabled(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'isFactoryConfigModeEnabled', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #12
0
    def __init__(self, defaultArgs, autoStart, autoRestart):
        typecheck.is_bool(autoStart, AssertionError)
        typecheck.is_bool(autoRestart, AssertionError)

        self.defaultArgs = defaultArgs
        self.autoStart = autoStart
        self.autoRestart = autoRestart
Example #13
0
        def __init__(
            self,
            host,
            port,
            sender,
            useAuth,
            username,
            password,
            retryCount,
            retryInterval,
        ):
            typecheck.is_string(host, AssertionError)
            typecheck.is_int(port, AssertionError)
            typecheck.is_string(sender, AssertionError)
            typecheck.is_bool(useAuth, AssertionError)
            typecheck.is_string(username, AssertionError)
            typecheck.is_string(password, AssertionError)
            typecheck.is_int(retryCount, AssertionError)
            typecheck.is_int(retryInterval, AssertionError)

            self.host = host
            self.port = port
            self.sender = sender
            self.useAuth = useAuth
            self.username = username
            self.password = password
            self.retryCount = retryCount
            self.retryInterval = retryInterval
Example #14
0
    def __init__(self, enabled, secLevel, authProtocol,
                 usePasswordAsAuthPassphrase, haveAuthPassphrase,
                 authPassphrase, privProtocol,
                 useAuthPassphraseAsPrivPassphrase, havePrivPassphrase,
                 privPassphrase):
        typecheck.is_bool(enabled, AssertionError)
        typecheck.is_enum(secLevel, raritan.rpc.um.SnmpV3.SecurityLevel,
                          AssertionError)
        typecheck.is_enum(authProtocol, raritan.rpc.um.SnmpV3.AuthProtocol,
                          AssertionError)
        typecheck.is_bool(usePasswordAsAuthPassphrase, AssertionError)
        typecheck.is_bool(haveAuthPassphrase, AssertionError)
        typecheck.is_string(authPassphrase, AssertionError)
        typecheck.is_enum(privProtocol, raritan.rpc.um.SnmpV3.PrivProtocol,
                          AssertionError)
        typecheck.is_bool(useAuthPassphraseAsPrivPassphrase, AssertionError)
        typecheck.is_bool(havePrivPassphrase, AssertionError)
        typecheck.is_string(privPassphrase, AssertionError)

        self.enabled = enabled
        self.secLevel = secLevel
        self.authProtocol = authProtocol
        self.usePasswordAsAuthPassphrase = usePasswordAsAuthPassphrase
        self.haveAuthPassphrase = haveAuthPassphrase
        self.authPassphrase = authPassphrase
        self.privProtocol = privProtocol
        self.useAuthPassphraseAsPrivPassphrase = useAuthPassphraseAsPrivPassphrase
        self.havePrivPassphrase = havePrivPassphrase
        self.privPassphrase = privPassphrase
 def getHttpRedirSettings(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getHttpRedirSettings', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #16
0
 def isAvailable(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, "isAvailable", args)
     _ret_ = rsp["_ret_"]
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #17
0
 def encode(portNum, hasPower):
     typecheck.is_int(portNum, AssertionError)
     typecheck.is_bool(hasPower, AssertionError)
     args = {}
     args['portNum'] = portNum
     args['hasPower'] = hasPower
     return args
Example #18
0
 def onlineCheckEnabled(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, "onlineCheckEnabled", args)
     _ret_ = rsp["_ret_"]
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #19
0
 def encode(portNum, hasPower):
     typecheck.is_int(portNum, AssertionError)
     typecheck.is_bool(hasPower, AssertionError)
     args = {}
     args['portNum'] = portNum
     args['hasPower'] = hasPower
     return args
Example #20
0
        def __init__(
            self,
            havePendingReq,
            havePendingCert,
            pendingReqInfo,
            pendingCertInfo,
            activeCertInfo,
            maxSignDays,
        ):
            typecheck.is_bool(havePendingReq, AssertionError)
            typecheck.is_bool(havePendingCert, AssertionError)
            typecheck.is_struct(pendingReqInfo,
                                raritan.rpc.cert.ServerSSLCert.ReqInfo,
                                AssertionError)
            typecheck.is_struct(pendingCertInfo,
                                raritan.rpc.cert.ServerSSLCert.CertInfo,
                                AssertionError)
            typecheck.is_struct(activeCertInfo,
                                raritan.rpc.cert.ServerSSLCert.CertInfo,
                                AssertionError)
            typecheck.is_int(maxSignDays, AssertionError)

            self.havePendingReq = havePendingReq
            self.havePendingCert = havePendingCert
            self.pendingReqInfo = pendingReqInfo
            self.pendingCertInfo = pendingCertInfo
            self.activeCertInfo = activeCertInfo
            self.maxSignDays = maxSignDays
Example #21
0
        def __init__(
            self,
            v2enable,
            v3enable,
            readComm,
            writeComm,
            sysContact,
            sysName,
            sysLocation,
        ):
            typecheck.is_bool(v2enable, AssertionError)
            typecheck.is_bool(v3enable, AssertionError)
            typecheck.is_string(readComm, AssertionError)
            typecheck.is_string(writeComm, AssertionError)
            typecheck.is_string(sysContact, AssertionError)
            typecheck.is_string(sysName, AssertionError)
            typecheck.is_string(sysLocation, AssertionError)

            self.v2enable = v2enable
            self.v3enable = v3enable
            self.readComm = readComm
            self.writeComm = writeComm
            self.sysContact = sysContact
            self.sysName = sysName
            self.sysLocation = sysLocation
Example #22
0
    def __init__(self, mode, activeMode, wirelessSupported):
        typecheck.is_enum(mode, raritan.rpc.net.InterfaceMode, AssertionError)
        typecheck.is_enum(activeMode, raritan.rpc.net.InterfaceMode, AssertionError)
        typecheck.is_bool(wirelessSupported, AssertionError)

        self.mode = mode
        self.activeMode = activeMode
        self.wirelessSupported = wirelessSupported
Example #23
0
    def __init__(self, service, enable, port):
        typecheck.is_string(service, AssertionError)
        typecheck.is_bool(enable, AssertionError)
        typecheck.is_int(port, AssertionError)

        self.service = service
        self.enable = enable
        self.port = port
Example #24
0
    def __init__(self, mode, activeMode, wirelessSupported):
        typecheck.is_enum(mode, raritan.rpc.net.InterfaceMode, AssertionError)
        typecheck.is_enum(activeMode, raritan.rpc.net.InterfaceMode, AssertionError)
        typecheck.is_bool(wirelessSupported, AssertionError)

        self.mode = mode
        self.activeMode = activeMode
        self.wirelessSupported = wirelessSupported
Example #25
0
        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
Example #26
0
        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
Example #27
0
        def __init__(self, forceStatic, server1, server2):
            typecheck.is_bool(forceStatic, AssertionError)
            typecheck.is_string(server1, AssertionError)
            typecheck.is_string(server2, AssertionError)

            self.forceStatic = forceStatic
            self.server1 = server1
            self.server2 = server2
Example #28
0
        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
Example #29
0
 def getButtonStates(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getButtonStates', args)
     _ret_ = [x0 for x0 in rsp['_ret_']]
     for x0 in _ret_:
         typecheck.is_bool(x0, 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
Example #31
0
    def __init__(self, service, enable, port):
        typecheck.is_string(service, AssertionError)
        typecheck.is_bool(enable, AssertionError)
        typecheck.is_int(port, AssertionError)

        self.service = service
        self.enable = enable
        self.port = port
Example #32
0
        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
Example #33
0
        def __init__(self, forceStatic, server1, server2):
            typecheck.is_bool(forceStatic, AssertionError)
            typecheck.is_string(server1, AssertionError)
            typecheck.is_string(server2, AssertionError)

            self.forceStatic = forceStatic
            self.server1 = server1
            self.server2 = server2
Example #34
0
    def __init__(self, enabled, defaultPolicy, rules):
        typecheck.is_bool(enabled, AssertionError)
        typecheck.is_enum(defaultPolicy, raritan.rpc.security.RoleAccessPolicy, AssertionError)
        for x0 in rules:
            typecheck.is_struct(x0, raritan.rpc.security.RoleAccessRule, AssertionError)

        self.enabled = enabled
        self.defaultPolicy = defaultPolicy
        self.rules = rules
Example #35
0
 def getImageInfo(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getImageInfo', args)
     _ret_ = rsp['_ret_']
     info = raritan.rpc.firmware.ImageInfo.decode(rsp['info'], agent)
     typecheck.is_bool(_ret_, DecodeException)
     typecheck.is_struct(info, raritan.rpc.firmware.ImageInfo, DecodeException)
     return (_ret_, info)
 def setMaximumCoolingRequest(self, requested):
     agent = self.agent
     typecheck.is_bool(requested, AssertionError)
     args = {}
     args['requested'] = requested
     rsp = agent.json_rpc(self.target, 'setMaximumCoolingRequest', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Example #37
0
 def setMaximumCoolingRequest(self, requested):
     agent = self.agent
     typecheck.is_bool(requested, AssertionError)
     args = {}
     args['requested'] = requested
     rsp = agent.json_rpc(self.target, 'setMaximumCoolingRequest', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
 def isDaemonRunning(self, name):
     agent = self.agent
     typecheck.is_string(name, AssertionError)
     args = {}
     args['name'] = name
     rsp = agent.json_rpc(self.target, 'isDaemonRunning', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #39
0
 def checkNtpServer(self, ntpServer):
     agent = self.agent
     typecheck.is_string(ntpServer, AssertionError)
     args = {}
     args['ntpServer'] = ntpServer
     rsp = agent.json_rpc(self.target, 'checkNtpServer', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #40
0
 def encode(hostName, timeout, useIcmp):
     typecheck.is_string(hostName, AssertionError)
     typecheck.is_int(timeout, AssertionError)
     typecheck.is_bool(useIcmp, AssertionError)
     args = {}
     args['hostName'] = hostName
     args['timeout'] = timeout
     args['useIcmp'] = useIcmp
     return args
Example #41
0
 def encode(hostName, timeout, useIcmp):
     typecheck.is_string(hostName, AssertionError)
     typecheck.is_int(timeout, AssertionError)
     typecheck.is_bool(useIcmp, AssertionError)
     args = {}
     args['hostName'] = hostName
     args['timeout'] = timeout
     args['useIcmp'] = useIcmp
     return args
Example #42
0
 def encode(on, reason, timeout):
     typecheck.is_bool(on, AssertionError)
     typecheck.is_string(reason, AssertionError)
     typecheck.is_int(timeout, AssertionError)
     args = {}
     args['on'] = on
     args['reason'] = reason
     args['timeout'] = timeout
     return args
 def isDaemonRunning(self, name):
     agent = self.agent
     typecheck.is_string(name, AssertionError)
     args = {}
     args['name'] = name
     rsp = agent.json_rpc(self.target, 'isDaemonRunning', args)
     _ret_ = rsp['_ret_']
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
Example #44
0
        def __init__(self, description, locked, privileges):
            typecheck.is_string(description, AssertionError)
            typecheck.is_bool(locked, AssertionError)
            for x0 in privileges:
                typecheck.is_struct(x0, raritan.rpc.usermgmt.Role.Privilege, AssertionError)

            self.description = description
            self.locked = locked
            self.privileges = privileges
Example #45
0
        def __init__(self, description, locked, privileges):
            typecheck.is_string(description, AssertionError)
            typecheck.is_bool(locked, AssertionError)
            for x0 in privileges:
                typecheck.is_struct(x0, raritan.rpc.usermgmt.Role.Privilege, AssertionError)

            self.description = description
            self.locked = locked
            self.privileges = privileges
Example #46
0
 def downloadImage(self, url):
     agent = self.agent
     typecheck.is_string(url, AssertionError)
     args = {}
     args["url"] = url
     rsp = agent.json_rpc(self.target, "downloadImage", args)
     _ret_ = rsp["_ret_"]
     typecheck.is_bool(_ret_, DecodeException)
     return _ret_
 def activate(self, on, reason, timeout):
     agent = self.agent
     typecheck.is_bool(on, AssertionError)
     typecheck.is_string(reason, AssertionError)
     typecheck.is_int(timeout, AssertionError)
     args = {}
     args['on'] = on
     args['reason'] = reason
     args['timeout'] = timeout
     rsp = agent.json_rpc(self.target, 'activate', args)
        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
Example #49
0
 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)
Example #50
0
 def activate(self, on, reason, timeout):
     agent = self.agent
     typecheck.is_bool(on, AssertionError)
     typecheck.is_string(reason, AssertionError)
     typecheck.is_int(timeout, AssertionError)
     args = {}
     args['on'] = on
     args['reason'] = reason
     args['timeout'] = timeout
     rsp = agent.json_rpc(self.target, 'activate', args)
 def setSettings(self, isEnabled, samplesPerRecord):
     agent = self.agent
     typecheck.is_bool(isEnabled, AssertionError)
     typecheck.is_int(samplesPerRecord, AssertionError)
     args = {}
     args['isEnabled'] = isEnabled
     args['samplesPerRecord'] = samplesPerRecord
     rsp = agent.json_rpc(self.target, 'setSettings', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Example #52
0
 def encode(device, speed, duplex, isAutoNeg):
     typecheck.is_string(device, AssertionError)
     typecheck.is_enum(speed, raritan.rpc.test.Ethernet.Speed, AssertionError)
     typecheck.is_enum(duplex, raritan.rpc.test.Ethernet.Duplex, AssertionError)
     typecheck.is_bool(isAutoNeg, AssertionError)
     args = {}
     args['device'] = device
     args['speed'] = raritan.rpc.test.Ethernet.Speed.encode(speed)
     args['duplex'] = raritan.rpc.test.Ethernet.Duplex.encode(duplex)
     args['isAutoNeg'] = isAutoNeg
     return args
        def __init__(self, on, alertStatus, operatingHoursLhx, operatingHoursFan):
            typecheck.is_bool(on, AssertionError)
            typecheck.is_struct(alertStatus, raritan.rpc.lhxmodel.Lhx.AlertStatus, AssertionError)
            typecheck.is_int(operatingHoursLhx, AssertionError)
            for x0 in operatingHoursFan:
                typecheck.is_int(x0, AssertionError)

            self.on = on
            self.alertStatus = alertStatus
            self.operatingHoursLhx = operatingHoursLhx
            self.operatingHoursFan = operatingHoursFan
 def setRawValue(self, rawValue, validateRange):
     agent = self.agent
     typecheck.is_int(rawValue, AssertionError)
     typecheck.is_bool(validateRange, AssertionError)
     args = {}
     args['rawValue'] = rawValue
     args['validateRange'] = validateRange
     rsp = agent.json_rpc(self.target, 'setRawValue', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
        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, 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, switchedOn, active, overflow, underflow, valid):
            typecheck.is_bool(switchedOn, AssertionError)
            typecheck.is_bool(active, AssertionError)
            typecheck.is_bool(overflow, AssertionError)
            typecheck.is_bool(underflow, AssertionError)
            typecheck.is_bool(valid, AssertionError)

            self.switchedOn = switchedOn
            self.active = active
            self.overflow = overflow
            self.underflow = underflow
            self.valid = valid
Example #58
0
        def __init__(self, enabled, baudrate, parity, stopbits, readonly):
            typecheck.is_bool(enabled, AssertionError)
            typecheck.is_int(baudrate, AssertionError)
            typecheck.is_enum(parity, raritan.rpc.devsettings.Modbus.Parity, AssertionError)
            typecheck.is_int(stopbits, AssertionError)
            typecheck.is_bool(readonly, AssertionError)

            self.enabled = enabled
            self.baudrate = baudrate
            self.parity = parity
            self.stopbits = stopbits
            self.readonly = readonly