diff --git a/tangostationcontrol/tangostationcontrol/devices/snmp_device.py b/tangostationcontrol/tangostationcontrol/devices/snmp_device.py index 323fab8c8115fd62430113eeb3c72edadbe3df39..95b4265570202bd12ba21a83a8e1587292a6ad12 100644 --- a/tangostationcontrol/tangostationcontrol/devices/snmp_device.py +++ b/tangostationcontrol/tangostationcontrol/devices/snmp_device.py @@ -75,11 +75,11 @@ class SNMP(lofar_device): # will return a # Reads from a table and returns an array of table entries 1 to 10 (note, tables require an index key and start at 1) - test_attr1_R = attribute_wrapper(comms_annotation={"mib": "test-MIB", "name": "test_attr1", "index": 1}, dims=(10,), datatype=numpy.str) + test_attr1_R = attribute_wrapper(comms_annotation={"mib": "TEST-MIB", "name": "test_attr1", "index": 1}, dims=(10,), datatype=numpy.str) # indices can also be IP addresses sometimes. Gets a single scalar value - test_attr2_R = attribute_wrapper(comms_annotation={"mib": "test-MIB", "name": "test_attr2", "index": (127,0,0,1)}, datatype=numpy.int64) + test_attr2_R = attribute_wrapper(comms_annotation={"mib": "TEST-MIB", "name": "test_attr2", "index": (127,0,0,1)}, datatype=numpy.int64) # if the attribute doesn't get the value from a table, then no index is needed, or the default of 0 can be supplied. - test_attr3_R = attribute_wrapper(comms_annotation={"mib": "test-MIB", "name": "test_attr3"}, datatype=numpy.int64) + test_attr3_R = attribute_wrapper(comms_annotation={"mib": "TEST-MIB", "name": "test_attr3"}, datatype=numpy.int64) # -------- diff --git a/tangostationcontrol/tangostationcontrol/test/clients/test_mib_loading.py b/tangostationcontrol/tangostationcontrol/test/clients/test_mib_loading.py index a5d608da946eb376b092f3c0bdfb8bcb69fde48e..9bdcdd8a312278a7501890f43625e002f2f8cc05 100644 --- a/tangostationcontrol/tangostationcontrol/test/clients/test_mib_loading.py +++ b/tangostationcontrol/tangostationcontrol/test/clients/test_mib_loading.py @@ -1,9 +1,7 @@ -from unittest import mock - from tangostationcontrol.test import base from tangostationcontrol.clients.snmp_client import mib_loader -from pysnmp.smi import builder, view +from pysnmp.smi import view import pysnmp.hlapi as pysnmp from pysnmp.smi.rfc1902 import ObjectIdentity diff --git a/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py b/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py index b130d401bc166367841a089a632e65fec90f7006..86a6301f9848f8f81c2d75bf3d0b94adb219310c 100644 --- a/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py +++ b/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py @@ -5,7 +5,7 @@ from unittest import mock from tangostationcontrol.test import base -from tangostationcontrol.clients.snmp_client import SNMP_client, snmp_attribute, mib_loader +from tangostationcontrol.clients.snmp_client import SNMP_client, snmp_attribute class server_imitator: