Search in sources :

Example 1 with UiAction

use of org.ovirt.engine.ui.uicommonweb.action.UiAction in project ovirt-engine by oVirt.

the class HostSetupNetworksModel method postOnSetupNetworks.

public void postOnSetupNetworks() {
    UiAction setupNetworksAction = createSetupNetworksAction();
    setupNetworksAction.then(getVfsConfigAction()).then(getCommitNetworkChangesAction()).onAllExecutionsFinish(getCloseAction());
    setupNetworksAction.runAction();
}
Also used : UiAction(org.ovirt.engine.ui.uicommonweb.action.UiAction)

Example 2 with UiAction

use of org.ovirt.engine.ui.uicommonweb.action.UiAction in project ovirt-engine by oVirt.

the class VfsConfigAction method onActionExecute.

@Override
protected void onActionExecute() {
    for (HostNicVfsConfig originalVfsConfig : originalVfsConfigs) {
        HostNicVfsConfig updatedVfsConfig = updatedNicToVfsConfig.get(originalVfsConfig.getNicId());
        initUpdateVfsConfigParams(originalVfsConfig, updatedVfsConfig);
        if (!updatedVfsConfig.isAllNetworksAllowed()) {
            initAddedNetworksParams(originalVfsConfig, updatedVfsConfig);
            initRemovedNetworksParams(originalVfsConfig, updatedVfsConfig);
            initAddedLabelsParams(originalVfsConfig, updatedVfsConfig);
            initRemovedLabelsParams(originalVfsConfig, updatedVfsConfig);
        }
    }
    UiAction updateAction = new UiVdcMultipleAction(ActionType.UpdateHostNicVfsConfig, updatedVfsConfigsParams, getModel(), true, false);
    updateAction.then(new UiVdcMultipleAction(ActionType.AddVfsConfigNetwork, addedNetworksParams, getModel())).and(new UiVdcMultipleAction(ActionType.RemoveVfsConfigNetwork, removedNetworksParams, getModel())).and(new UiVdcMultipleAction(ActionType.AddVfsConfigLabel, addedLabelsParams, getModel())).and(new UiVdcMultipleAction(ActionType.RemoveVfsConfigLabel, removedLabelsParams, getModel())).then(getNextAction());
    then(null);
    updateAction.runParallelAction(getActionFlowState());
}
Also used : HostNicVfsConfig(org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig) UiVdcMultipleAction(org.ovirt.engine.ui.uicommonweb.action.UiVdcMultipleAction) UiAction(org.ovirt.engine.ui.uicommonweb.action.UiAction) SyncUiAction(org.ovirt.engine.ui.uicommonweb.action.SyncUiAction)

Aggregations

UiAction (org.ovirt.engine.ui.uicommonweb.action.UiAction)2 HostNicVfsConfig (org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig)1 SyncUiAction (org.ovirt.engine.ui.uicommonweb.action.SyncUiAction)1 UiVdcMultipleAction (org.ovirt.engine.ui.uicommonweb.action.UiVdcMultipleAction)1