use of com.emc.storageos.db.client.model.VpoolProtectionVarraySettings in project coprhd-controller by CoprHD.
the class RPHelper method fetchRPTargetVirtualPools.
/**
* Fetch the RP Protected target virtual pool uris.
*
* @param dbClient db client
* @return set of vpools that are RP target virtual pools
*/
public static Set<URI> fetchRPTargetVirtualPools(DbClient dbClient) {
Set<URI> rpProtectedTargetVPools = new HashSet<URI>();
try {
List<URI> vpoolProtectionSettingsURIs = dbClient.queryByType(VpoolProtectionVarraySettings.class, true);
Iterator<VpoolProtectionVarraySettings> vPoolProtectionSettingsItr = dbClient.queryIterativeObjects(VpoolProtectionVarraySettings.class, vpoolProtectionSettingsURIs, true);
while (vPoolProtectionSettingsItr.hasNext()) {
VpoolProtectionVarraySettings rSetting = vPoolProtectionSettingsItr.next();
if (null != rSetting && !NullColumnValueGetter.isNullURI(rSetting.getVirtualPool())) {
rpProtectedTargetVPools.add(rSetting.getVirtualPool());
}
}
} catch (Exception ex) {
_log.error("Exception occurred while fetching RP enabled virtualpools", ex);
}
return rpProtectedTargetVPools;
}
Aggregations