use of org.opennms.netmgt.provision.service.operations.ImportOperation in project opennms by OpenNMS.
the class CoreImportActivities method scanNodes.
@Activity(lifecycle = "import", phase = "scan", schedulingHint = "import")
public static void scanNodes(final Phase currentPhase, final ImportOperationsManager opsMgr, final RequisitionImport ri) {
if (ri.isAborted()) {
info("The import has been aborted, skipping scan phase import.");
return;
}
info("Scheduling nodes for phase {}", currentPhase);
final Collection<ImportOperation> operations = opsMgr.getOperations();
for (final ImportOperation op : operations) {
final LifeCycleInstance nodeScan = currentPhase.createNestedLifeCycle("nodeImport");
debug("Created lifecycle {} for operation {}", nodeScan, op);
nodeScan.setAttribute("operation", op);
nodeScan.setAttribute("requisitionImport", ri);
nodeScan.trigger();
}
}
Aggregations