Exemple #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
Exemple #2
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
Exemple #3
0
 def getState(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getState', args)
     _ret_ = raritan.rpc.hmi.ExternalBeeper.State.decode(rsp['_ret_'])
     typecheck.is_enum(_ret_, raritan.rpc.hmi.ExternalBeeper.State, DecodeException)
     return _ret_
 def getImages(self, webcam, start, count, direction):
     agent = self.agent
     typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam,
                            AssertionError)
     typecheck.is_long(start, AssertionError)
     typecheck.is_int(count, AssertionError)
     typecheck.is_enum(direction,
                       raritan.rpc.webcam.StorageManager.Direction,
                       AssertionError)
     args = {}
     args["webcam"] = Interface.encode(webcam)
     args["start"] = start
     args["count"] = count
     args["direction"] = raritan.rpc.webcam.StorageManager.Direction.encode(
         direction)
     rsp = agent.json_rpc(self.target, "getImages", args)
     _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)
Exemple #5
0
        def __init__(self, state, deviceName):
            typecheck.is_enum(state, raritan.rpc.serial.SerialPort.PortState,
                              AssertionError)
            typecheck.is_string(deviceName, AssertionError)

            self.state = state
            self.deviceName = deviceName
Exemple #6
0
 def decode(rsp, agent):
     _ret_ = raritan.rpc.hmi.InternalBeeper.State.decode(rsp['_ret_'])
     reason = rsp['reason']
     typecheck.is_enum(_ret_, raritan.rpc.hmi.InternalBeeper.State,
                       DecodeException)
     typecheck.is_string(reason, DecodeException)
     return (_ret_, reason)
Exemple #7
0
        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
Exemple #8
0
        def __init__(self, oldState, newState, source):
            super(raritan.rpc.hmi.ExternalBeeper.StateChangedEvent, self).__init__(source)
            typecheck.is_enum(oldState, raritan.rpc.hmi.ExternalBeeper.State, AssertionError)
            typecheck.is_enum(newState, raritan.rpc.hmi.ExternalBeeper.State, AssertionError)

            self.oldState = oldState
            self.newState = newState
Exemple #9
0
        def __init__(self, type, pinnedDeviceType):
            typecheck.is_enum(type, raritan.rpc.portsmodel.Port.DetectionType,
                              AssertionError)
            typecheck.is_string(pinnedDeviceType, AssertionError)

            self.type = type
            self.pinnedDeviceType = pinnedDeviceType
Exemple #10
0
    def __init__(self, ipMask, policy):
        typecheck.is_string(ipMask, AssertionError)
        typecheck.is_enum(policy, raritan.rpc.security.IpfwPolicy,
                          AssertionError)

        self.ipMask = ipMask
        self.policy = policy
 def getState(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getState', args)
     _ret_ = raritan.rpc.hmi.ExternalBeeper.State.decode(rsp['_ret_'])
     typecheck.is_enum(_ret_, raritan.rpc.hmi.ExternalBeeper.State, DecodeException)
     return _ret_
Exemple #12
0
 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 getMetaData(self, webcam, start, count, direction):
     agent = self.agent
     typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam,
                            AssertionError)
     typecheck.is_long(start, AssertionError)
     typecheck.is_int(count, AssertionError)
     typecheck.is_enum(direction,
                       raritan.rpc.webcam.StorageManager.Direction,
                       AssertionError)
     args = {}
     args['webcam'] = Interface.encode(webcam)
     args['start'] = start
     args['count'] = count
     args['direction'] = raritan.rpc.webcam.StorageManager.Direction.encode(
         direction)
     rsp = agent.json_rpc(self.target, 'getMetaData', args)
     _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)
Exemple #14
0
    def __init__(self, enabled, autocfg, ipaddrs, routes, ra_managed,
                 ra_otherconf, dns_suffixes, dns_ip_1, dns_ip_2):
        typecheck.is_bool(enabled, AssertionError)
        typecheck.is_enum(autocfg, raritan.rpc.net.AutoConfigs, AssertionError)
        for x0 in ipaddrs:
            typecheck.is_string(x0, AssertionError)
        for x0 in routes:
            typecheck.is_struct(x0, raritan.rpc.net.IPv6RoutingEntry,
                                AssertionError)
        typecheck.is_bool(ra_managed, AssertionError)
        typecheck.is_bool(ra_otherconf, AssertionError)
        for x0 in dns_suffixes:
            typecheck.is_string(x0, AssertionError)
        typecheck.is_string(dns_ip_1, AssertionError)
        typecheck.is_string(dns_ip_2, AssertionError)

        self.enabled = enabled
        self.autocfg = autocfg
        self.ipaddrs = ipaddrs
        self.routes = routes
        self.ra_managed = ra_managed
        self.ra_otherconf = ra_otherconf
        self.dns_suffixes = dns_suffixes
        self.dns_ip_1 = dns_ip_1
        self.dns_ip_2 = dns_ip_2
Exemple #15
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     type = raritan.rpc.cascading.Cascading.Type.decode(rsp['type'])
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_enum(type, raritan.rpc.cascading.Cascading.Type,
                       DecodeException)
     return (_ret_, type)
Exemple #16
0
 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
Exemple #17
0
 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 startUpdate(self, flags):
     agent = self.agent
     for x0 in flags:
         typecheck.is_enum(x0, raritan.rpc.firmware.UpdateFlags, AssertionError)
     args = {}
     args['flags'] = [raritan.rpc.firmware.UpdateFlags.encode(x0) for x0 in flags]
     rsp = agent.json_rpc(self.target, 'startUpdate', args)
Exemple #19
0
        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
Exemple #20
0
 def getTestStatus(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, "getTestStatus", args)
     _ret_ = raritan.rpc.test.Display.TestStatus.decode(rsp["_ret_"])
     typecheck.is_enum(_ret_, raritan.rpc.test.Display.TestStatus, DecodeException)
     return _ret_
Exemple #21
0
    def __init__(
        self,
        id,
        primaryServer,
        secondaryServer,
        adoptSettingsId,
        type,
        port,
        sslPort,
        useSSL,
        forceTrustedCert,
        certificate,
        adsDomain,
        useAnonymousBind,
        bindDN,
        bindPwd,
        searchBaseDN,
        loginNameAttr,
        userEntryObjClass,
        userSearchFilter,
    ):
        typecheck.is_string(id, AssertionError)
        typecheck.is_string(primaryServer, AssertionError)
        typecheck.is_string(secondaryServer, AssertionError)
        typecheck.is_string(adoptSettingsId, AssertionError)
        typecheck.is_enum(type, raritan.rpc.auth.ldapsrv.ServerType,
                          AssertionError)
        typecheck.is_int(port, AssertionError)
        typecheck.is_int(sslPort, AssertionError)
        typecheck.is_bool(useSSL, AssertionError)
        typecheck.is_bool(forceTrustedCert, AssertionError)
        typecheck.is_string(certificate, AssertionError)
        typecheck.is_string(adsDomain, AssertionError)
        typecheck.is_bool(useAnonymousBind, AssertionError)
        typecheck.is_string(bindDN, AssertionError)
        typecheck.is_string(bindPwd, AssertionError)
        typecheck.is_string(searchBaseDN, AssertionError)
        typecheck.is_string(loginNameAttr, AssertionError)
        typecheck.is_string(userEntryObjClass, AssertionError)
        typecheck.is_string(userSearchFilter, AssertionError)

        self.id = id
        self.primaryServer = primaryServer
        self.secondaryServer = secondaryServer
        self.adoptSettingsId = adoptSettingsId
        self.type = type
        self.port = port
        self.sslPort = sslPort
        self.useSSL = useSSL
        self.forceTrustedCert = forceTrustedCert
        self.certificate = certificate
        self.adsDomain = adsDomain
        self.useAnonymousBind = useAnonymousBind
        self.bindDN = bindDN
        self.bindPwd = bindPwd
        self.searchBaseDN = searchBaseDN
        self.loginNameAttr = loginNameAttr
        self.userEntryObjClass = userEntryObjClass
        self.userSearchFilter = userSearchFilter
 def getSupportedStorageTypes(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getSupportedStorageTypes', args)
     _ret_ = [raritan.rpc.webcam.StorageManager.StorageType.decode(x0) for x0 in rsp['_ret_']]
     for x0 in _ret_:
         typecheck.is_enum(x0, raritan.rpc.webcam.StorageManager.StorageType, DecodeException)
     return _ret_
 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)
Exemple #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
Exemple #25
0
        def __init__(self, ctxName, logLevel):
            typecheck.is_string(ctxName, AssertionError)
            typecheck.is_enum(logLevel,
                              raritan.rpc.diag.DiagLogSettings.LogLevel,
                              AssertionError)

            self.ctxName = ctxName
            self.logLevel = logLevel
Exemple #26
0
    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
Exemple #27
0
    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
Exemple #28
0
    def __init__(self, execState, exitType, exitStatus):
        typecheck.is_enum(execState, raritan.rpc.luaservice.ScriptState.ExecState, AssertionError)
        typecheck.is_enum(exitType, raritan.rpc.luaservice.ScriptState.ExitType, AssertionError)
        typecheck.is_int(exitStatus, AssertionError)

        self.execState = execState
        self.exitType = exitType
        self.exitStatus = exitStatus
Exemple #29
0
        def __init__(self, newSimStatus, source):
            super(raritan.rpc.serial.GsmModem.SimSecurityStatusChangedEvent,
                  self).__init__(source)
            typecheck.is_enum(newSimStatus,
                              raritan.rpc.serial.GsmModem.SimSecurityStatus,
                              AssertionError)

            self.newSimStatus = newSimStatus
Exemple #30
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
Exemple #31
0
    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 setType(self, type):
     agent = self.agent
     typecheck.is_enum(type, raritan.rpc.cascading.Cascading.Type, AssertionError)
     args = {}
     args['type'] = raritan.rpc.cascading.Cascading.Type.encode(type)
     rsp = agent.json_rpc(self.target, 'setType', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
 def getType(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getType', args)
     _ret_ = rsp['_ret_']
     type = raritan.rpc.cascading.Cascading.Type.decode(rsp['type'])
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_enum(type, raritan.rpc.cascading.Cascading.Type, DecodeException)
     return (_ret_, type)
Exemple #34
0
        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
Exemple #35
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     simStatus = raritan.rpc.serial.GsmModem.SimSecurityStatus.decode(
         rsp['simStatus'])
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_enum(simStatus,
                       raritan.rpc.serial.GsmModem.SimSecurityStatus,
                       DecodeException)
     return (_ret_, simStatus)
 def setPowerState(self, state):
     agent = self.agent
     typecheck.is_enum(state, raritan.rpc.sensors.Sensor.OnOffState, AssertionError)
     args = {}
     args['state'] = raritan.rpc.sensors.Sensor.OnOffState.encode(state)
     rsp = agent.json_rpc(self.target, 'setPowerState', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemple #37
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
 def closeCurrentSession(self, reason):
     agent = self.agent
     typecheck.is_enum(reason,
                       raritan.rpc.session.SessionManager.CloseReason,
                       AssertionError)
     args = {}
     args['reason'] = raritan.rpc.session.SessionManager.CloseReason.encode(
         reason)
     rsp = agent.json_rpc(self.target, 'closeCurrentSession', args)
 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)
Exemple #40
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     logLevel = raritan.rpc.diag.DiagLogSettings.LogLevel.decode(
         rsp['logLevel'])
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_enum(logLevel,
                       raritan.rpc.diag.DiagLogSettings.LogLevel,
                       DecodeException)
     return (_ret_, logLevel)
Exemple #41
0
 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)
Exemple #42
0
 def encode(logLevel):
     typecheck.is_enum(logLevel,
                       raritan.rpc.diag.DiagLogSettings.LogLevel,
                       AssertionError)
     args = {}
     args[
         'logLevel'] = raritan.rpc.diag.DiagLogSettings.LogLevel.encode(
             logLevel)
     return args
Exemple #43
0
 def encode(refId, count, direction):
     typecheck.is_int(refId, AssertionError)
     typecheck.is_int(count, AssertionError)
     typecheck.is_enum(direction, raritan.rpc.logging.RangeDirection, AssertionError)
     args = {}
     args['refId'] = refId
     args['count'] = count
     args['direction'] = raritan.rpc.logging.RangeDirection.encode(direction)
     return args
 def setLogLevelForAllCtxNames(self, logLevel):
     agent = self.agent
     typecheck.is_enum(logLevel, raritan.rpc.diag.DiagLogSettings.LogLevel, AssertionError)
     args = {}
     args['logLevel'] = raritan.rpc.diag.DiagLogSettings.LogLevel.encode(logLevel)
     rsp = agent.json_rpc(self.target, 'setLogLevelForAllCtxNames', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemple #45
0
    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
Exemple #46
0
        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
Exemple #47
0
        def __init__(self, status, capacity, used, webcamStorageInfo):
            typecheck.is_enum(status, raritan.rpc.webcam.StorageManager.StorageStatus, AssertionError)
            typecheck.is_int(capacity, AssertionError)
            typecheck.is_int(used, AssertionError)
            for x0 in webcamStorageInfo:
                typecheck.is_struct(x0, raritan.rpc.webcam.StorageManager.WebcamStorageInfo, AssertionError)

            self.status = status
            self.capacity = capacity
            self.used = used
            self.webcamStorageInfo = webcamStorageInfo
Exemple #48
0
 def encode(webcam, start, count, direction):
     typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
     typecheck.is_long(start, AssertionError)
     typecheck.is_int(count, AssertionError)
     typecheck.is_enum(direction, raritan.rpc.webcam.StorageManager.Direction, AssertionError)
     args = {}
     args['webcam'] = Interface.encode(webcam)
     args['start'] = start
     args['count'] = count
     args['direction'] = raritan.rpc.webcam.StorageManager.Direction.encode(direction)
     return args
Exemple #49
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, 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
Exemple #51
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
    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
Exemple #53
0
        def __init__(self, type, capacity, server, username, password):
            typecheck.is_enum(type, raritan.rpc.webcam.StorageManager.StorageType, AssertionError)
            typecheck.is_int(capacity, AssertionError)
            typecheck.is_string(server, AssertionError)
            typecheck.is_string(username, AssertionError)
            typecheck.is_string(password, AssertionError)

            self.type = type
            self.capacity = capacity
            self.server = server
            self.username = username
            self.password = password
Exemple #54
0
 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