Hi Ronald,
Most likely, you get the IMPORTS from a different MIB module, or the MIB
module
could not be parsed correctly (this could happen if you use the lenient mode
with a broken MIB module).
Hope this helps.
Best regards,
Frank
Am 03.11.2016 um 17:27 schrieb Ronald Braswell:
I am trying to use the SmiModule::getImports() to get the imports for a
module.
Then I want to use the SmiImport::getImportedObjectNames() and
SmiImport::getSourceModuleName()
methods for each import.
Here is the import clause for XUPS-MIB:
IMPORTS
TimeTicks, Gauge32, Counter32, Integer32
FROM SNMPv2-SMI
DisplayString
FROM SNMPv2-TC
MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE
FROM SNMPv2-SMI
MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
FROM SNMPv2-CONF
eaton, xupsEnvironment
FROM EATON-OIDS
-- Need to import these EMP objects to support PowerMIB-style traps for
EMP
xupsContactIndex, xupsContactType, xupsContactState, xupsContactDescr,
xupsEnvRemoteTemp, xupsEnvRemoteTempLowerLimit,
xupsEnvRemoteTempUpperLimit,
xupsEnvRemoteHumidity, xupsEnvRemoteHumidityLowerLimit,
xupsEnvRemoteHumidityUpperLimit
FROM EATON-EMP-MIB;
Issues:
The source module names I get from this module are:
RFC1155-SMI
RFC1213-MIB
RFC-1212
RFC-1215
List moduleImports = smiModule.getImports();
List importedModules = moduleImports.stream().map( i ->
i.getSourceModuleName() ).collect(Collectors.toList());
importedModules.stream().forEach(System.out::println);
Am I doing something wrong?
Yet, smiModule.getObjectNames() does include the objects imported from the
EATON-EMP-OID (e.g. xupsEnvRemoteTemp) but the imported objects do not
have all fields populated (e.g. units) whereas the EATON-EMP-MIB objects do
have all fields populated (according to the MIB.
Why would I not see EATON-EMP-MIB in the list of SmiImport for the XUPS-MIB
module?
Ron
___
SNMP4J mailing list
SNMP4J@agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax: +49 7024 8688231
___
SNMP4J mailing list
SNMP4J@agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j