use of com.emc.storageos.model.compute.ComputeSystemRestRep in project coprhd-controller by CoprHD.
the class ComputeSystems method itemDetails.
public static void itemDetails(String id) {
ComputeSystemRestRep computeSystem = ComputeSystemUtils.getComputeSystem(id);
if (computeSystem == null) {
error(MessagesUtils.get(UNKNOWN, id));
}
render(computeSystem);
}
use of com.emc.storageos.model.compute.ComputeSystemRestRep in project coprhd-controller by CoprHD.
the class ComputeVirtualPools method computeVirtualPoolDetails.
public static void computeVirtualPoolDetails(String id) {
ComputeVirtualPoolRestRep computeVirtualPool = ComputeVirtualPoolUtils.getComputeVirtualPool(id);
if (computeVirtualPool == null) {
error(MessagesUtils.get(UNKNOWN, id));
}
List<NamedRelatedResourceRep> temps = computeVirtualPool.getServiceProfileTemplates();
List<RelatedResourceRep> varrays = computeVirtualPool.getVirtualArrays();
StringBuilder selectedTemplatesBuilder = new StringBuilder();
for (RelatedResourceRep varray : varrays) {
List<ComputeSystemRestRep> arrayComputes = VirtualArrayUtils.getComputeSystems(varray.getId());
for (ComputeSystemRestRep acomp : arrayComputes) {
for (NamedRelatedResourceRep spt : acomp.getServiceProfileTemplates()) {
if (CollectionUtils.isNotEmpty(temps)) {
for (NamedRelatedResourceRep template : temps) {
if (spt.getId().equals(template.getId())) {
selectedTemplatesBuilder.append(acomp.getName()).append(" - ").append(template.getName()).append(", ");
}
}
}
}
}
}
String selectedTemplatesString = StringUtils.stripEnd(selectedTemplatesBuilder.toString(), ", ");
render(computeVirtualPool, selectedTemplatesString);
}
Aggregations