use of com.emc.storageos.driver.dellsc.scapi.rest.PayloadFilter in project coprhd-controller by CoprHD.
the class StorageCenterAPI method getStorageTypes.
/**
* Get all storage types from the system.
*
* @param ssn The Storage Center system serial number.
* @return The storage types.
*/
public ScStorageType[] getStorageTypes(String ssn) {
PayloadFilter filter = new PayloadFilter();
if (ssn != null) {
filter.append("scSerialNumber", ssn);
}
RestResult rr = restClient.post("StorageCenter/ScStorageType/GetList", filter.toJson());
if (checkResults(rr)) {
return gson.fromJson(rr.getResult(), ScStorageType[].class);
}
return new ScStorageType[0];
}
use of com.emc.storageos.driver.dellsc.scapi.rest.PayloadFilter in project coprhd-controller by CoprHD.
the class StorageCenterAPI method findServerHba.
/**
* Find an initiator WWN or iSCSI IQN.
*
* @param ssn The Storage Center SN on which to check.
* @param iqnOrWwn The FC WWN or iSCSI IQN.
* @return The HBA object.
*/
private ScServerHba findServerHba(String ssn, String iqnOrWwn) {
ScServerHba result = null;
PayloadFilter filter = new PayloadFilter();
filter.append("scSerialNumber", ssn);
filter.append("instanceName", iqnOrWwn);
RestResult rr = restClient.post("StorageCenter/ScServerHba/GetList", filter.toJson());
if (checkResults(rr)) {
ScServerHba[] hbas = gson.fromJson(rr.getResult(), ScServerHba[].class);
for (ScServerHba hba : hbas) {
// Should only return one if found, but just grab first from list
result = hba;
break;
}
}
return result;
}
use of com.emc.storageos.driver.dellsc.scapi.rest.PayloadFilter in project coprhd-controller by CoprHD.
the class StorageCenterAPI method getAllVolumes.
/**
* Gets all volumes.
*
* @param ssn The Storage Center to query from.
* @return The volumes on the requested SC.
*/
public ScVolume[] getAllVolumes(String ssn) {
PayloadFilter filter = new PayloadFilter();
filter.append("scSerialNumber", ssn);
RestResult rr = restClient.post("StorageCenter/ScVolume/GetList", filter.toJson());
if (checkResults(rr)) {
return gson.fromJson(rr.getResult(), ScVolume[].class);
}
return new ScVolume[0];
}
use of com.emc.storageos.driver.dellsc.scapi.rest.PayloadFilter 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];
}
use of com.emc.storageos.driver.dellsc.scapi.rest.PayloadFilter in project coprhd-controller by CoprHD.
the class StorageCenterAPI method getVolumeSnapshots.
/**
* Gets all replays for a given volume.
*
* @param instanceId The volume instance ID.
* @return The volume's replays.
*/
public ScReplay[] getVolumeSnapshots(String instanceId) {
PayloadFilter filter = new PayloadFilter();
filter.append("createVolume", instanceId);
filter.append("active", false);
filter.append("markedForExpiration", false);
RestResult rr = restClient.post("StorageCenter/ScReplay/GetList", filter.toJson());
if (checkResults(rr)) {
return gson.fromJson(rr.getResult(), ScReplay[].class);
}
return new ScReplay[0];
}
Aggregations