use of org.opennms.netmgt.provision.service.operations.ImportOperationsManager in project opennms by OpenNMS.
the class CoreImportActivities method auditNodes.
@Activity(lifecycle = "import", phase = "audit", schedulingHint = "import")
public ImportOperationsManager auditNodes(final RequisitionImport ri, final String rescanExisting) {
if (ri.isAborted()) {
info("The import has been aborted, skipping audit phase import.");
return null;
}
final Requisition specFile = ri.getRequisition();
info("Auditing nodes for requisition {}. The parameter {} was set to {} during import.", specFile, EventConstants.PARM_IMPORT_RESCAN_EXISTING, rescanExisting);
final String foreignSource = specFile.getForeignSource();
final Map<String, Integer> foreignIdsToNodes = m_provisionService.getForeignIdToNodeIdMap(foreignSource);
final ImportOperationsManager opsMgr = new ImportOperationsManager(foreignIdsToNodes, m_provisionService, rescanExisting);
opsMgr.setForeignSource(foreignSource);
opsMgr.auditNodes(specFile);
debug("Finished auditing nodes.");
return opsMgr;
}
Aggregations