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 <SmiImport> moduleImports = smiModule.getImports(); List <String> 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