use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.
the class BackendIscsiBondStorageConnectionResourceTest method getEntity.
@Override
protected StorageServerConnections getEntity(int index) {
StorageServerConnections cnx = new StorageServerConnections();
cnx.setId(GUIDS[index].toString());
cnx.setConnection("10.11.12.13" + ":" + "/1");
return cnx;
}
use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.
the class BackendIscsiBondStorageConnectionsResourceTest method getEntity.
@Override
protected StorageServerConnections getEntity(int index) {
StorageServerConnections cnx = new StorageServerConnections();
cnx.setId(GUIDS[index].toString());
cnx.setConnection("10.11.12.13" + ":" + "/1");
return cnx;
}
use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.
the class AsyncDataProvider method getStorageConnectionById.
public void getStorageConnectionById(AsyncQuery<StorageServerConnections> aQuery, String id, boolean isRefresh) {
aQuery.converterCallback = source -> source != null ? (StorageServerConnections) source : null;
StorageServerConnectionQueryParametersBase params = new StorageServerConnectionQueryParametersBase(id);
params.setRefresh(isRefresh);
Frontend.getInstance().runQuery(QueryType.GetStorageServerConnectionById, params, aQuery);
}
use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.
the class AddStorageDomainRM method prepare4.
private void prepare4() {
if (timer != null) {
timer.cancel();
timer = null;
}
PreparingEnlistment enlistment = (PreparingEnlistment) context.enlistment;
EnlistmentContext enlistmentContext = (EnlistmentContext) enlistment.getContext();
HostListModel<?> model = enlistmentContext.getModel();
ConfigureLocalStorageModel configureModel = (ConfigureLocalStorageModel) model.getWindow();
if (context.host.getStatus() != VDSStatus.Up) {
prepare3();
} else {
// Add storage domain.
StorageServerConnections connection = new StorageServerConnections();
connection.setConnection(configureModel.getStorage().getPath().getEntity());
connection.setStorageType(StorageType.LOCALFS);
context.connection = connection;
StorageServerConnectionParametersBase parameters = new StorageServerConnectionParametersBase(connection, context.host.getId(), false);
parameters.setCorrelationId(getCorrelationId());
Frontend.getInstance().runAction(ActionType.AddStorageServerConnection, parameters, result -> {
ActionReturnValue returnValue = result.getReturnValue();
context.addStorageServerConnectionReturnValue = returnValue;
prepare5();
});
}
}
use of org.ovirt.engine.core.common.businessentities.StorageServerConnections in project ovirt-engine by oVirt.
the class StorageListModel method checkDomainAttachedToDc.
private void checkDomainAttachedToDc(String commandName, List<StorageDomain> storageDomains, StorageServerConnections storageServerConnections) {
final StorageModel storageModel = (StorageModel) getWindow();
StoragePool storagePool = storageModel.getDataCenter().getSelectedItem();
final UICommand okCommand = UICommand.createDefaultOkUiCommand(commandName, this);
if (storagePool.getId().equals(Guid.Empty)) {
okCommand.execute();
return;
}
VDS host = storageModel.getHost().getSelectedItem();
AsyncDataProvider.getInstance().getStorageDomainsWithAttachedStoragePoolGuid(new AsyncQuery<>(attachedStorageDomains -> {
if (!attachedStorageDomains.isEmpty()) {
ConfirmationModel model = new ConfirmationModel();
setConfirmWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().storageDomainsAttachedToDataCenterWarningTitle());
model.setMessage(ConstantsManager.getInstance().getConstants().storageDomainsAttachedToDataCenterWarningMessage());
model.setHelpTag(HelpTag.import_storage_domain_confirmation);
// $NON-NLS-1$
model.setHashName("import_storage_domain_confirmation");
List<String> stoageDomainNames = new ArrayList<>();
for (StorageDomainStatic domain : attachedStorageDomains) {
stoageDomainNames.add(domain.getStorageName());
}
model.setItems(stoageDomainNames);
// $NON-NLS-1$
UICommand cancelCommand = createCancelCommand("CancelImportConfirm");
model.getCommands().add(okCommand);
model.getCommands().add(cancelCommand);
} else {
okCommand.execute();
}
}), storagePool, storageDomains, storageServerConnections, host.getId());
}
Aggregations