Features
This section describes all features that are shipped with this package. Specially take a look at the PySNMP setup features <PySNMP setup Features>, which are ready-to-use setup features, that can directly be used in your setup.
Scenario Features
SnmpManagerDevice
- class balderhub.snmpagent.lib.features.HasSnmpSystemGroupFeature(**kwargs)
Bases:
FeatureThis feature is an autonomous feature that describes that its owner has the snmp group system.
- class balderhub.snmpagent.lib.features.SnmpSystemConfig(**kwargs)
Bases:
FeatureThis feature provides the general snmp configuration for a snmp agent device
- property host: str
- Returns:
the host domain or ip address of the snmp agent
- property read_community: str
- Returns:
the community for read access to this snmp agent
- property snmp_port: int
- Returns:
the snmp port of the snmp agent
- property sys_descr: str
- Returns:
the expected
sysDescrfor this snmp agent
- property sys_object_id: str
- Returns:
the expected
sysObjectIdfor this snmp agent
- property write_community: str
- Returns:
the community for write access to this snmp agent
SnmpAgentDevices
- class balderhub.snmpagent.lib.features.SendSnmpGetRequestCommandFeature(**kwargs)
Bases:
FeatureThis feature allows to send a snmp GET-REQUEST.
- class SnmpAgent
Bases:
VDeviceremote agent this feature communicates with
- send(oid: str) SnmpPackage
This method sends a new SNMP-GET REQUEST message
- Parameters:
oid – the oid that should be requested
- Returns:
the snmp package response
- class balderhub.snmpagent.lib.features.SendSnmpSetRequestCommandFeature(**kwargs)
Bases:
FeatureThis feature allows to send a snmp SET-REQUEST.
- class SnmpAgent
Bases:
VDeviceremote agent this feature communicates with
- send(oid: str, value: str | int | None)
This method allows to send a message to the remote snmp agent.
- Parameters:
oid –
value –
PySNMP setup Features
SnmpAgentDevices
This section holds features that can directly be used in your setup.
- class balderhub.snmpagent.lib.setup_features.SendSnmpGetRequestPysnmpFeature(**kwargs)
Bases:
SendSnmpGetRequestCommandFeatureThis feature provides a basic implementation of the
SendSnmpGetRequestCommandFeaturewith the pysnmp package.Note
Please note, this feature implementation uses the SNMP version v2c!
- send(oid: str) SnmpPackage
This method sends a new SNMP-GET REQUEST message
- Parameters:
oid – the oid that should be requested
- Returns:
the snmp package response
- class balderhub.snmpagent.lib.setup_features.SendSnmpSetRequestPysnmpFeature(**kwargs)
Bases:
SendSnmpSetRequestCommandFeatureThis feature provides a basic implementation of the
SendSnmpSetRequestCommandFeaturewith the pysnmp package.Note
Please note, this feature implementation uses the SNMP version v2c!
- send(oid: str, value: str | int | None)
This method allows to send a message to the remote snmp agent.
- Parameters:
oid –
value –