Search in sources :

Example 6 with ClusterModel

use of org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel in project ovirt-engine by oVirt.

the class AddClusterRM method prepare1.

public void prepare1() {
    EnlistmentContext enlistmentContext = (EnlistmentContext) context.enlistment.getContext();
    HostListModel<?> model = enlistmentContext.getModel();
    ConfigureLocalStorageModel configureModel = (ConfigureLocalStorageModel) model.getWindow();
    ClusterModel clusterModel = configureModel.getCluster();
    String clusterName = clusterModel.getName().getEntity();
    if (!StringHelper.isNullOrEmpty(clusterName)) {
        AsyncDataProvider.getInstance().getClusterListByName(new AsyncQuery<>(returnValue -> {
            context.clusterFoundByName = Linq.firstOrNull(returnValue);
            prepare2();
        }), clusterName);
    } else {
        prepare2();
    }
}
Also used : ClusterModel(org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel) ClusterModel(org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel) IEnlistmentNotification(org.ovirt.engine.ui.uicompat.IEnlistmentNotification) Linq(org.ovirt.engine.ui.uicommonweb.Linq) Guid(org.ovirt.engine.core.compat.Guid) PreparingEnlistment(org.ovirt.engine.ui.uicompat.PreparingEnlistment) StringHelper(org.ovirt.engine.core.compat.StringHelper) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) ClusterOperationParameters(org.ovirt.engine.core.common.action.ClusterOperationParameters) Objects(java.util.Objects) ActionType(org.ovirt.engine.core.common.action.ActionType) Frontend(org.ovirt.engine.ui.frontend.Frontend) Enlistment(org.ovirt.engine.ui.uicompat.Enlistment) Cluster(org.ovirt.engine.core.common.businessentities.Cluster) ManagementNetworkOnClusterOperationParameters(org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters) AsyncQuery(org.ovirt.engine.ui.frontend.AsyncQuery) Version(org.ovirt.engine.core.compat.Version) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)

Aggregations

ClusterModel (org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel)6 ManagementNetworkOnClusterOperationParameters (org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters)3 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)3 Version (org.ovirt.engine.core.compat.Version)3 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)2 ClusterOperationParameters (org.ovirt.engine.core.common.action.ClusterOperationParameters)2 StringHelper (org.ovirt.engine.core.compat.StringHelper)2 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)2 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)2 PreparingEnlistment (org.ovirt.engine.ui.uicompat.PreparingEnlistment)2 EventBus (com.google.gwt.event.shared.EventBus)1 Inject (com.google.inject.Inject)1 ArrayList (java.util.ArrayList)1 Objects (java.util.Objects)1 Optional (java.util.Optional)1 ActionType (org.ovirt.engine.core.common.action.ActionType)1 MigrationBandwidthLimitType (org.ovirt.engine.core.common.businessentities.MigrationBandwidthLimitType)1 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)1 ConfigValues (org.ovirt.engine.core.common.config.ConfigValues)1 Guid (org.ovirt.engine.core.compat.Guid)1