private List<StorageServerConnections> getLunsWithInitializedStorageType(List<LUNs> luns, StorageType storageType) { List<StorageServerConnections> existingStorageServerConnections = new ArrayList<>(); for (LUNs lun : luns) { for (StorageServerConnections storageServerConnection : lun.getLunConnections()) { storageServerConnection.setStorageType(storageType); existingStorageServerConnections.add(storageServerConnection); } } return existingStorageServerConnections; }
public HostStorages list() { HostStorages ret = new HostStorages(); for (LUNs lun : getLogicalUnits()) { HostStorage storage = map(lun); List<StorageServerConnections> lunConnections = lun.getLunConnections(); if (lunConnections!=null && !lunConnections.isEmpty()) { getMapper(StorageServerConnections.class, LogicalUnit.class).map(lunConnections.get(0), storage.getLogicalUnits().getLogicalUnits().get(0)); } ret.getHostStorages().add(addLinks(storage)); } return ret; }
private ArrayList<SanTargetModel> createTargetModelList(LUNs a) { ArrayList<SanTargetModel> targetModelList = new ArrayList<>(); if (a.getLunConnections() != null) { for (StorageServerConnections b : a.getLunConnections()) { SanTargetModel model = new SanTargetModel(); model.setAddress(b.getConnection()); model.setPort(b.getPort()); model.setPortal(b.getPortal()); model.setName(b.getIqn()); model.setIsSelected(true); model.setIsLoggedIn(true); model.setLuns(new ObservableCollection<>()); model.getLoginCommand().setIsExecutionAllowed(false); targetModelList.add(model); } } return targetModelList; }
protected List<LUNs> setUpLuns() { StorageServerConnections cnx = new StorageServerConnections(); cnx.setConnection(ADDRESSES[0]); cnx.setIqn(TARGET); cnx.setPort(Integer.toString(PORT)); LUNs lun = new LUNs(); lun.setLUNId(LUN); lun.setLunConnections(new ArrayList<>()); lun.getLunConnections().add(cnx); List<LUNs> luns = new ArrayList<>(); luns.add(lun); return luns; }
protected void mapVolumeGroupIscsi(StorageDomain model, org.ovirt.engine.core.common.businessentities.StorageDomain entity) { VolumeGroup vg = model.getStorage().getVolumeGroup(); List<LUNs> luns = getLunsByVgId(vg.getId()); if (luns != null && !luns.isEmpty()) { vg.setLogicalUnits(new LogicalUnits()); for (LUNs lun : luns) { List<StorageServerConnections> lunConnections = lun.getLunConnections(); if (lunConnections != null) { for (StorageServerConnections cnx : lunConnections) { LogicalUnit unit = map(lun); unit = map(cnx, unit); vg.getLogicalUnits().getLogicalUnits().add(unit); } } } } }
_writer.writeAttributeString(getOvfUri(), "plugged", String.valueOf(dve.isPlugged())); _writer.writeAttributeString(getOvfUri(), LUN_ID, String.valueOf(lun.getLun().getLUNId())); if (lun.getLun().getLunConnections() != null) { for (StorageServerConnections conn : lun.getLun().getLunConnections()) { _writer.writeStartElement(LUN_CONNECTION); _writer.writeAttributeString(getOvfUri(), LUNS_CONNECTION, conn.getConnection());
@Override public String toString() { return ToStringBuilder.forInstance(this) .append("id", getLUNId()) .append("physicalVolumeId", getPhysicalVolumeId()) .append("volumeGroupId", getVolumeGroupId()) .append("serial", getSerial()) .append("lunMapping", getLunMapping()) .append("vendorId", getVendorId()) .append("productId", getProductId()) .append("lunConnections", getLunConnections()) .append("deviceSize", getDeviceSize()) .append("pvSize", getPvSize()) .append("peCount", getPeCount()) .append("peAllocatedCount", getPeAllocatedCount()) .append("vendorName", getVendorName()) .append("pathsDictionary", getPathsDictionary()) .append("pathsCapacity", getPathsCapacity()) .append("lunType", getLunType()) .append("status", getStatus()) .append("diskId", getDiskId()) .append("diskAlias", getDiskAlias()) .append("storageDomainId", getStorageDomainId()) .append("storageDomainName", getStorageDomainName()) .append("discardMaxSize", getDiscardMaxSize()) .build(); }