use of com.emc.storageos.driver.dellsc.scapi.objects.ScReplayProfile in project coprhd-controller by CoprHD.
the class DellSCDiscovery method getStorageVolumes.
/**
* Discover storage volumes.
*
* @param storageSystem The storage system on which to discover.
* @param storageVolumes The discovered storage volumes.
* @param token Used for paging. Input 0 indicates that the first page should be returned. Output 0 indicates
* that last page was returned
* @return The discovery task.
*/
public DriverTask getStorageVolumes(StorageSystem storageSystem, List<StorageVolume> storageVolumes, MutableInt token) {
LOG.info("Getting volumes from {}", storageSystem.getNativeId());
DellSCDriverTask task = new DellSCDriverTask("getVolumes");
try {
StorageCenterAPI api = connectionManager.getConnection(storageSystem.getNativeId());
Map<ScReplayProfile, List<String>> cgInfo = util.getGCInfo(api, storageSystem.getNativeId());
ScVolume[] volumes = api.getAllVolumes(storageSystem.getNativeId());
for (ScVolume volume : volumes) {
if (volume.inRecycleBin || volume.liveVolume || volume.cmmDestination || volume.replicationDestination) {
continue;
}
StorageVolume driverVol = util.getStorageVolumeFromScVolume(api, volume, cgInfo);
storageVolumes.add(driverVol);
}
task.setStatus(TaskStatus.READY);
} catch (DellSCDriverException | StorageCenterAPIException e) {
String msg = String.format("Error getting volume info: %s", e);
LOG.warn(msg);
task.setFailed(msg);
}
return task;
}
use of com.emc.storageos.driver.dellsc.scapi.objects.ScReplayProfile in project coprhd-controller by CoprHD.
the class StorageCenterAPI method getConsistencyGroups.
/**
* Gets all replay profiles that are consistent type.
*
* @param ssn The Storage Center serial number.
* @return The consistent replay profiles.
*/
public ScReplayProfile[] getConsistencyGroups(String ssn) {
PayloadFilter filter = new PayloadFilter();
filter.append("scSerialNumber", ssn);
filter.append("type", "Consistent");
RestResult rr = restClient.post("StorageCenter/ScReplayProfile/GetList", filter.toJson());
if (checkResults(rr)) {
return gson.fromJson(rr.getResult(), ScReplayProfile[].class);
}
return new ScReplayProfile[0];
}
Aggregations