Beispiel #1
0
    def getPduCount(self):
        snmp = snmpClient(self.ipAddr, self.readString, self.writeString)

        testoid = base_oid + '.' + '1.1.0'

        status, pduCount = snmp.getCmdInteger(testoid)

        return status, pduCount
Beispiel #2
0
def getPduCountJones(HOST, defReadString, defWriteString):
    snmp = snmpClient(HOST, defReadString, defWriteString)

    #testoid = base_oid + '.' + '1.1.0'
    testoid = base_oid + '.' + sensorbase + '.' + '9' + '.' + pdug5TemperatureScale

    status, pduCount = snmp.getCmdInteger(testoid)

    return status, pduCount
Beispiel #3
0
 def getSensorStringValue(self, pdu, sensor, param):
     snmp = snmpClient(self.ipAddr, self.readString, self.writeString)
     if pdu == 0:
         testoid = base_oid + '.' + param + '.' + str(sensor)
     else:
         testoid = base_oid + '.' + param + '.' + str(pdu) + '.' + str(
             sensor)
     status, value = snmp.getCmdString(testoid)
     return status, value
Beispiel #4
0
 def getEnviroValue(self, pdu, param):
     snmp = snmpClient(self.ipAddr, self.readString, self.writeString)
     testoid = base_oid + '.' + sensorbase + '.' + param + '.' + str(pdu)
     status, value = snmp.getCmdInteger(testoid)
     return status, value
Beispiel #5
0
def getPduSnmpIntData(HOST, defReadString, defWriteString, myoid):
        snmp = snmpClient(HOST, defReadString, defWriteString)
        status, value = snmp.getCmdInteger(myoid);
        return status, value