|
(→AHPSCRIPTS-121)
|
(→AHPSCRIPTS-116)
|
| Line 2460: | |||
| double deletionRate = ((double)totalDeletes) / ((double)secs); | double deletionRate = ((double)totalDeletes) / ((double)secs); | ||
| System.out.println("Deleted " + totalDeletes + " empty directories in " + secs + " seconds (" + deletionRate + " deletes per second).");</pre> | System.out.println("Deleted " + totalDeletes + " empty directories in " + secs + " seconds (" + deletionRate + " deletes per second).");</pre> | ||
| + | = Need Report of Agents Not In Environments = | ||
| + | ==== AHPSCRIPTS-117 ==== | ||
| + | <pre>import com.urbancode.anthill3.domain.reporting.*; | ||
| + | ReportMetaData rmd = new ReportMetaData(); | ||
| + | rmd.addColumn("Agent"); | ||
| + | return rmd; | ||
| + | ================================================ | ||
| + | import com.urbancode.anthill3.domain.agent.*; | ||
| + | import com.urbancode.anthill3.domain.reporting.*; | ||
| + | import com.urbancode.anthill3.domain.servergroup.*; | ||
| + | ReportOutput output = new ReportOutput(metaData); | ||
| + | envs = ServerGroupFactory.getInstance().restoreAll(); | ||
| + | agents = AgentFactory.getInstance().restoreAllConfigured(); | ||
| + | for (Agent agent : agents) { | ||
| + | boolean agentInEnv = false; | ||
| + | for (ServerGroup env : envs) { | ||
| + | if (env.containsServer(agent)) { | ||
| + | agentInEnv = true; | ||
| + | break; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | if (!agentInEnv) { | ||
| + | ReportRow row = new ReportRow(output, String.valueOf(agent.getId())); | ||
| + | row.setColumnValue("Agent", agent.getName()); | ||
| + | output.addRow(row); | ||
| + | } | ||
| + | } | ||
| + | return output;</pre> | ||