use of com.emc.storageos.model.vpool.BlockVirtualPoolProtectionUpdateParam in project coprhd-controller by CoprHD.
the class ProtectionValidator method validateRpNonHaCopyVpools.
private void validateRpNonHaCopyVpools(BlockVirtualPoolUpdateParam updateParam, DbClient dbClient) {
if (updateParam.getProtection() != null && updateParam.getProtection().specifiesRPProtection() && !updateParam.specifiesHighAvailability()) {
// validate the copy target vpools
BlockVirtualPoolProtectionUpdateParam protection = updateParam.getProtection();
VirtualPoolProtectionRPChanges rpParam = protection.getRecoverPoint();
if (rpParam != null) {
for (VirtualPoolProtectionVirtualArraySettingsParam protectionSettings : rpParam.getAdd()) {
if (protectionSettings.getVpool() != null) {
VirtualPool protectionVirtualPool = dbClient.queryObject(VirtualPool.class, protectionSettings.getVpool());
if (VirtualPool.vPoolSpecifiesHighAvailability(protectionVirtualPool)) {
// does not specify HA.
throw APIException.badRequests.nonVirtualToVirtualProtectionNotSupported();
}
}
}
}
}
}
Aggregations