Search in sources :

Example 31 with VpoolProtectionVarraySettings

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;
}
Also used : VpoolProtectionVarraySettings(com.emc.storageos.db.client.model.VpoolProtectionVarraySettings) NamedURI(com.emc.storageos.db.client.model.NamedURI) URI(java.net.URI) URISyntaxException(java.net.URISyntaxException) APIException(com.emc.storageos.svcs.errorhandling.resources.APIException) InternalException(com.emc.storageos.svcs.errorhandling.resources.InternalException) DeviceControllerException(com.emc.storageos.exceptions.DeviceControllerException) RecoverPointException(com.emc.storageos.recoverpoint.exceptions.RecoverPointException) HashSet(java.util.HashSet)

Aggregations

VpoolProtectionVarraySettings (com.emc.storageos.db.client.model.VpoolProtectionVarraySettings)31 VirtualPool (com.emc.storageos.db.client.model.VirtualPool)26 StringMap (com.emc.storageos.db.client.model.StringMap)22 VirtualArray (com.emc.storageos.db.client.model.VirtualArray)18 NamedURI (com.emc.storageos.db.client.model.NamedURI)17 URI (java.net.URI)16 StringSetMap (com.emc.storageos.db.client.model.StringSetMap)15 ArrayList (java.util.ArrayList)15 StoragePool (com.emc.storageos.db.client.model.StoragePool)14 BlockConsistencyGroup (com.emc.storageos.db.client.model.BlockConsistencyGroup)13 ProtectionSystem (com.emc.storageos.db.client.model.ProtectionSystem)13 StringSet (com.emc.storageos.db.client.model.StringSet)13 StorageSystem (com.emc.storageos.db.client.model.StorageSystem)12 RPProtectionRecommendation (com.emc.storageos.volumecontroller.RPProtectionRecommendation)12 RPRecommendation (com.emc.storageos.volumecontroller.RPRecommendation)12 VirtualPoolCapabilityValuesWrapper (com.emc.storageos.volumecontroller.impl.utils.VirtualPoolCapabilityValuesWrapper)12 Network (com.emc.storageos.db.client.model.Network)11 Project (com.emc.storageos.db.client.model.Project)11 RPSiteArray (com.emc.storageos.db.client.model.RPSiteArray)11 StoragePort (com.emc.storageos.db.client.model.StoragePort)11