use of org.snmp4j.agent.mo.snmp.SnmpCommunityMIB.SnmpCommunityEntryRow in project opennms by OpenNMS.
the class MockSnmpAgent method addCommunities.
/** {@inheritDoc} */
@Override
protected void addCommunities(SnmpCommunityMIB communityMIB) {
Variable[] com2sec = new Variable[] { // community name
new OctetString("public"), // security name
new OctetString("public"), // local engine ID
getAgent().getContextEngineID(), // default context name
new OctetString(), // transport tag
new OctetString(), // storage type
new Integer32(StorageType.nonVolatile), // row status
new Integer32(RowStatus.active) };
SnmpCommunityEntryRow row = communityMIB.getSnmpCommunityEntry().createRow(new OctetString("public2public").toSubIndex(true), com2sec);
communityMIB.getSnmpCommunityEntry().addRow(row);
}
Aggregations