use of com.emc.storageos.vasa.data.internal.Volume.HighAvailabilityVolume in project coprhd-controller by CoprHD.
the class SOSAlarmManager method getThinlyProvisionStatusOfHAVolumes.
private String getThinlyProvisionStatusOfHAVolumes(SyncManager manager, List<HighAvailabilityVolume> haVolList) throws StorageFault {
final String methodName = "getThinlyProvisionStatusOfHAVolumes(): ";
log.debug(methodName + "Entry with input: haVolList" + haVolList);
String alarmStatus = null;
StoragePool storagePool = null;
Set<String> alarmSet = new HashSet<String>();
for (HighAvailabilityVolume haVol : haVolList) {
try {
AssociatedPool associatedPool = manager.fetchAssociatedPoolOfVolume(haVol.getId());
if (log.isTraceEnabled()) {
log.trace(methodName + haVol.getId() + " is associated with " + associatedPool);
}
storagePool = manager.fetchStoragePoolByHref(associatedPool.getStoragepool().getLink().getHref());
alarmStatus = this.getThinlyProvisionStatusOfStoragePool(storagePool);
alarmSet.add(alarmStatus);
} catch (SOSFailure e) {
log.error(methodName + "SOSFailure failure occured", e);
throw FaultUtil.StorageFault(e);
}
}
if (alarmSet.contains(AlarmStatusEnum.Red.getValue())) {
log.debug(methodName + "Exit returning [RED]");
return AlarmStatusEnum.Red.getValue();
}
if (alarmSet.contains(AlarmStatusEnum.Yellow.getValue())) {
log.debug(methodName + "Exit returning [YELLOW]");
return AlarmStatusEnum.Yellow.getValue();
}
log.debug(methodName + "Exit returning [GREEN]");
return AlarmStatusEnum.Green.getValue();
}
Aggregations