use of es.bsc.compss.types.ResourceCreationRequest in project compss by bsc-wdc.
the class CloudManager method getCurrentState.
public String getCurrentState(String prefix) {
StringBuilder sb = new StringBuilder();
// Current state
sb.append(prefix).append("CLOUD = [").append("\n");
sb.append(prefix).append("\t").append("CURRENT_STATE = [").append("\n");
for (CloudProvider cp : providers.values()) {
sb.append(cp.getCurrentState(prefix + "\t" + "\t"));
}
sb.append(prefix).append("\t").append("]").append("\n");
// Pending requests
sb.append(prefix).append("\t").append("PENDING_REQUESTS = [").append("\n");
for (CloudProvider cp : providers.values()) {
for (ResourceCreationRequest rcr : cp.getPendingRequests()) {
Map<CloudInstanceTypeDescription, int[]> composition = rcr.getRequested().getTypeComposition();
// REQUEST ARE COMPOSED OF A SINGLE INSTANCE TYPE
for (CloudInstanceTypeDescription citd : composition.keySet()) {
sb.append(prefix).append("\t").append("\t").append("REQUEST = ").append(citd.getName()).append("\n");
}
}
}
sb.append(prefix).append("\t").append("]").append("\n");
sb.append(prefix).append("]");
return sb.toString();
}
Aggregations