@@ -80,17 +80,13 @@ class SNMP_client(CommClient):
ifisinstance(annotation,dict):
# check if required path inarg is present
ifannotation.get('oids')isNone:
AssertionError("SNMP get attributes require an oid")
ValueError("SNMP get attributes require an oid")
oids=annotation.get("oids")# required
else:
TypeError("SNMP attributes require a dict with oid(s)")
return
ifannotation.get('type')isnotNone:
dtype=annotation.get("type")# required
# actual_type = snmp_types[dtype]
else:
dtype=None
dtype=annotation.get('type',None)
returnoids,dtype
...
...
@@ -128,12 +124,9 @@ class SNMP_client(CommClient):
# already is an array but the wrong length. Unable to handle this
raiseValueError("SNMP oids need to either be a single value or an array the size of the attribute dimensions. got: {} expected: {}x{}={}".format(len(in_oid),x,y,x*y))