use of com.emc.storageos.vnxe.models.VNXeHost in project coprhd-controller by CoprHD.
the class VNXeApiClient method getHostLUNIds.
/**
* Get host LUN Ids
*
* @param hostId
* @return host LUN Ids
*/
public Set<String> getHostLUNIds(String hostId) {
Set<String> lunIds = new HashSet<>();
VNXeHost host = getHostById(hostId);
if (host != null) {
List<VNXeBase> hostLunIds = host.getHostLUNs();
if (hostLunIds != null && !hostLunIds.isEmpty()) {
for (VNXeBase hostLunId : hostLunIds) {
HostLun hostLun = getHostLun(hostLunId.getId());
VNXeBase vnxelunId = null;
if (hostLun.getType() == HostLUNTypeEnum.LUN_SNAP.getValue()) {
vnxelunId = hostLun.getSnap();
} else {
vnxelunId = hostLun.getLun();
}
lunIds.add(vnxelunId.getId());
}
}
}
return lunIds;
}
use of com.emc.storageos.vnxe.models.VNXeHost in project coprhd-controller by CoprHD.
the class DeleteHostRequest method deleteHost.
public VNXeCommandResult deleteHost() throws VNXeException {
logger.info("deleting host: {}", hostId);
HostRequest hostRequest = new HostRequest(_client, hostId);
VNXeHost host = hostRequest.get();
if (host == null) {
logger.info("Could not find host: ", hostId);
return null;
}
return deleteHostInitiatorSync();
}
Aggregations