Commit 635d2388 authored by Julian Zobel's avatar Julian Zobel
Browse files

Added a groupID-filtered host request to the Global Orcale

parent faddbb04
......@@ -173,6 +173,29 @@ public class GlobalOracle implements OracleComponent {
}
}
/**
* @return the list with all hosts of the scenario
*/
public static List<SimHost> getHosts(String groupID) {
if(groupID.equals("")) {
return getHosts();
}
else {
synchronized (hosts) {
ArrayList<SimHost> groupedHosts = new ArrayList<SimHost>();
for (SimHost h : hosts) {
if(h.getProperties().getGroupID().equals(groupID)) {
groupedHosts.add(h);
}
}
return groupedHosts;
}
}
}
@Override
public List<Host> getAllHosts() {
return new ArrayList<Host>(hosts);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment