use of com.emc.storageos.driver.dellsc.scapi.objects.ScServerHba 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;
}
Aggregations