@Override public void run(final ContainerTask<?> parent) { parent .getBuilder() .addSequence( new RunInBatch() { @Override public void run(final BatchTask phase) { applyNodePolicies(phase); } }, new RunInBatch() { @Override public void run(final BatchTask phase) { stampProvisionedInterfaces(phase); } }, new RunInBatch() { @Override public void run(final BatchTask phase) { deleteObsoleteResources(phase); } }, new RunInBatch() { @Override public void run(final BatchTask phase) { doPersistNodeInfo(phase); } }); }
@Override public void run(final ContainerTask<?> parent) { parent .getBuilder() .addSequence( new NodeInfoScan( getNode(), getAgentAddress(), getForeignSource(), this, getAgentConfigFactory(), getProvisionService(), getNodeId()), new RunInBatch() { @Override public void run(final BatchTask phase) { detectPhysicalInterfaces(phase); } }, new RunInBatch() { @Override public void run(final BatchTask phase) { detectIpAddressTable(phase); } }, new RunInBatch() { @Override public void run(final BatchTask phase) { detectIpInterfaceTable(phase); } }, new RunInBatch() { @Override public void run(final BatchTask phase) { deleteObsoleteResources(); } }, new RunInBatch() { @Override public void run(final BatchTask phase) { completed(); } }); }
private void onAgentFound( final ContainerTask<?> currentPhase, final OnmsIpInterface primaryIface) { // Make AgentScan a NeedContainer class and have that call run currentPhase.add(createAgentScan(primaryIface.getIpAddress(), "SNMP")); setAgentFound(true); }