use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.
the class AsyncDataProvider method getBlockDataStorageModels.
public List<IStorageModel> getBlockDataStorageModels() {
ArrayList<IStorageModel> models = new ArrayList<>();
IscsiStorageModel iscsiDataModel = new IscsiStorageModel();
iscsiDataModel.setIsGroupedByTarget(true);
models.add(iscsiDataModel);
FcpStorageModel fcpDataModel = new FcpStorageModel();
models.add(fcpDataModel);
addTypeToStorageModels(StorageDomainType.Data, models);
return models;
}
use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.
the class AsyncDataProvider method getIsoStorageModels.
public List<IStorageModel> getIsoStorageModels() {
ArrayList<IStorageModel> models = new ArrayList<>();
NfsStorageModel nfsIsoModel = new NfsStorageModel();
models.add(nfsIsoModel);
PosixStorageModel posixIsoModel = new PosixStorageModel();
models.add(posixIsoModel);
GlusterStorageModel glusterStorageModel = new GlusterStorageModel();
models.add(glusterStorageModel);
LocalStorageModel localIsoModel = new LocalStorageModel();
models.add(localIsoModel);
addTypeToStorageModels(StorageDomainType.ISO, models);
return models;
}
use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.
the class AsyncDataProvider method getExportStorageModels.
public List<IStorageModel> getExportStorageModels() {
ArrayList<IStorageModel> models = new ArrayList<>();
NfsStorageModel nfsExportModel = new NfsStorageModel();
models.add(nfsExportModel);
PosixStorageModel posixExportModel = new PosixStorageModel();
models.add(posixExportModel);
GlusterStorageModel glusterExportModel = new GlusterStorageModel();
models.add(glusterExportModel);
LocalStorageModel localExportStorageModel = new LocalStorageModel();
models.add(localExportStorageModel);
addTypeToStorageModels(StorageDomainType.ImportExport, models);
return models;
}
use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.
the class AsyncDataProvider method getImportBlockDataStorageModels.
public List<IStorageModel> getImportBlockDataStorageModels() {
ArrayList<IStorageModel> models = new ArrayList<>();
ImportIscsiStorageModel iscsiDataModel = new ImportIscsiStorageModel();
models.add(iscsiDataModel);
ImportFcpStorageModel fcpDataModel = new ImportFcpStorageModel();
models.add(fcpDataModel);
addTypeToStorageModels(StorageDomainType.Data, models);
return models;
}
use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.
the class StoragePopupView method revealStorageView.
@SuppressWarnings("unchecked")
private void revealStorageView(StorageModel object) {
StorageType storageType = storageTypeListEditor.asEditor().getActualEditor().getValue();
StorageDomainType storageDomainType = domainFunctionListEditor.asEditor().getActualEditor().getValue();
if (storageType == null || storageDomainType == null) {
return;
}
switch(storageType) {
case NFS:
storageView = new NfsStorageView();
break;
case LOCALFS:
storageView = new LocalStorageView();
break;
case POSIXFS:
storageView = new PosixStorageView();
break;
case GLUSTERFS:
storageView = new GlusterStorageView();
break;
case FCP:
if (!object.getBehavior().isImport()) {
storageView = new FcpStorageView(true);
} else {
storageView = new ImportFcpStorageView();
}
break;
case ISCSI:
if (!object.getBehavior().isImport()) {
storageView = new IscsiStorageView(true);
} else {
storageView = new ImportIscsiStorageView();
}
break;
default:
break;
}
updateStorageItem(object);
IStorageModel model = object.getCurrentStorageItem();
// Re-apply element IDs on 'storageView' change
ViewIdHandler.idHandler.generateAndSetIds(this);
// Clear the current storage view
specificStorageTypePanel.clear();
// Add the new storage view and call focus on it if needed
if (storageView != null && model != null) {
storageView.edit(model);
specificStorageTypePanel.add(storageView);
if (!nameEditor.isVisible()) {
storageView.focus();
}
}
}
Aggregations