Search in sources :

Example 16 with StorageServerConnections

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;
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections)

Example 17 with StorageServerConnections

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;
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections)

Example 18 with StorageServerConnections

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);
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) StorageServerConnectionQueryParametersBase(org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase)

Example 19 with StorageServerConnections

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();
        });
    }
}
Also used : StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) PreparingEnlistment(org.ovirt.engine.ui.uicompat.PreparingEnlistment) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) StorageServerConnectionParametersBase(org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase)

Example 20 with StorageServerConnections

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());
}
Also used : SearchType(org.ovirt.engine.core.common.interfaces.SearchType) Arrays(java.util.Arrays) FrontendActionAsyncResult(org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult) SearchObjects(org.ovirt.engine.core.searchbackend.SearchObjects) RegexValidation(org.ovirt.engine.ui.uicommonweb.validation.RegexValidation) Inject(com.google.inject.Inject) StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) ApplicationMode(org.ovirt.engine.core.common.mode.ApplicationMode) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ExtendSANStorageDomainParameters(org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters) DiskProfileListModel(org.ovirt.engine.ui.uicommonweb.models.profiles.DiskProfileListModel) ActionType(org.ovirt.engine.core.common.action.ActionType) GlusterBrickEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity) NfsVersion(org.ovirt.engine.core.common.businessentities.NfsVersion) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) HasEntity(org.ovirt.engine.ui.uicommonweb.models.HasEntity) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) AttachStorageDomainToPoolParameters(org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters) StorageType(org.ovirt.engine.core.common.businessentities.storage.StorageType) SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) ReduceSANStorageDomainDevicesCommandParameters(org.ovirt.engine.core.common.action.ReduceSANStorageDomainDevicesCommandParameters) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) Set(java.util.Set) AddSANStorageDomainParameters(org.ovirt.engine.core.common.action.AddSANStorageDomainParameters) StorageDomainSharedStatus(org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus) StringHelper(org.ovirt.engine.core.compat.StringHelper) List(java.util.List) Cloner(org.ovirt.engine.ui.uicommonweb.Cloner) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) QueryType(org.ovirt.engine.core.common.queries.QueryType) PermissionListModel(org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel) ITaskTarget(org.ovirt.engine.ui.uicompat.ITaskTarget) Guid(org.ovirt.engine.core.compat.Guid) IFrontendActionAsyncCallback(org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback) TaskContext(org.ovirt.engine.ui.uicompat.TaskContext) StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) HelpTag(org.ovirt.engine.ui.uicommonweb.help.HelpTag) Task(org.ovirt.engine.ui.uicompat.Task) StorageDomainStatus(org.ovirt.engine.core.common.businessentities.StorageDomainStatus) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel) GetDeviceListQueryParameters(org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Frontend(org.ovirt.engine.ui.frontend.Frontend) StorageDomainStatic(org.ovirt.engine.core.common.businessentities.StorageDomainStatic) LinkedList(java.util.LinkedList) Model(org.ovirt.engine.ui.uicommonweb.models.Model) RemoveStorageDomainParameters(org.ovirt.engine.core.common.action.RemoveStorageDomainParameters) StorageDomainManagementParameter(org.ovirt.engine.core.common.action.StorageDomainManagementParameter) Linq(org.ovirt.engine.ui.uicommonweb.Linq) SearchStringMapping(org.ovirt.engine.ui.uicommonweb.models.SearchStringMapping) IValidation(org.ovirt.engine.ui.uicommonweb.validation.IValidation) ListWithSimpleDetailsModel(org.ovirt.engine.ui.uicommonweb.models.ListWithSimpleDetailsModel) StorageServerConnectionParametersBase(org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase) StorageDomainType(org.ovirt.engine.core.common.businessentities.StorageDomainType) WebAdminApplicationPlaces(org.ovirt.engine.ui.uicommonweb.place.WebAdminApplicationPlaces) VDS(org.ovirt.engine.core.common.businessentities.VDS) StorageDomainParametersBase(org.ovirt.engine.core.common.action.StorageDomainParametersBase) PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs) LUNs(org.ovirt.engine.core.common.businessentities.storage.LUNs) StorageDomainStatic(org.ovirt.engine.core.common.businessentities.StorageDomainStatic) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) VDS(org.ovirt.engine.core.common.businessentities.VDS) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) List(java.util.List) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)

Aggregations

StorageServerConnections (org.ovirt.engine.core.common.businessentities.StorageServerConnections)181 Test (org.junit.Test)83 ArrayList (java.util.ArrayList)43 Guid (org.ovirt.engine.core.compat.Guid)39 LUNs (org.ovirt.engine.core.common.businessentities.storage.LUNs)33 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)32 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)19 List (java.util.List)18 StorageType (org.ovirt.engine.core.common.businessentities.storage.StorageType)17 VDS (org.ovirt.engine.core.common.businessentities.VDS)16 StorageServerConnectionParametersBase (org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase)15 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)15 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)14 HashSet (java.util.HashSet)13 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)11 ActionType (org.ovirt.engine.core.common.action.ActionType)11 Set (java.util.Set)10 StorageConnection (org.ovirt.engine.api.model.StorageConnection)10 StorageDomainType (org.ovirt.engine.core.common.businessentities.StorageDomainType)10 QueryType (org.ovirt.engine.core.common.queries.QueryType)10