Search in sources :

Example 1 with UiVdcMultipleAction

use of org.ovirt.engine.ui.uicommonweb.action.UiVdcMultipleAction 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

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