use of com.emc.storageos.api.service.impl.placement.StorageScheduler in project coprhd-controller by CoprHD.
the class DefaultBlockFullCopyApiImpl method getPlacementRecommendations.
/**
* Get the placement recommendations for the passed full copy source.
*
* @param blockObject A reference to the full copy source.
* @param capabilities Encapsulates the copy capabilities
* @param varray A reference to the virtual array.
* @param vpoolURI The URI of the virtual pool for the source.
*
* @return A list of volume placement recommendations.
*/
private List<VolumeRecommendation> getPlacementRecommendations(BlockObject blockObject, VirtualPoolCapabilityValuesWrapper capabilities, VirtualArray varray, URI vpoolURI) {
// Find placement for block volume copies
VirtualPool vPool = _dbClient.queryObject(VirtualPool.class, vpoolURI);
List<VolumeRecommendation> placementRecommendations = ((StorageScheduler) _scheduler).getRecommendationsForVolumeClones(varray, vPool, blockObject, capabilities);
if (placementRecommendations.isEmpty()) {
throw APIException.badRequests.invalidParameterNoStorageFoundForVolume(varray.getId(), vPool.getId(), blockObject.getId());
}
return placementRecommendations;
}
Aggregations