Search in sources :

Example 21 with NetworkQoS

use of org.ovirt.engine.core.common.businessentities.network.NetworkQoS in project ovirt-engine by oVirt.

the class NewNetworkQoSModel method executeSave.

@Override
protected void executeSave() {
    // New network QoS
    final QosParametersBase<NetworkQoS> parameters = new QosParametersBase<>();
    parameters.setQos(networkQoS);
    Frontend.getInstance().runAction(ActionType.AddNetworkQoS, parameters, result -> {
        ActionReturnValue retVal = result.getReturnValue();
        boolean succeeded = false;
        if (retVal != null && retVal.getSucceeded()) {
            succeeded = true;
            networkQoS.setId((Guid) retVal.getActionReturnValue());
        }
        postSaveAction(succeeded);
    });
}
Also used : ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) QosParametersBase(org.ovirt.engine.core.common.action.QosParametersBase) NetworkQoS(org.ovirt.engine.core.common.businessentities.network.NetworkQoS)

Aggregations

NetworkQoS (org.ovirt.engine.core.common.businessentities.network.NetworkQoS)21 Test (org.junit.Test)6 ArrayList (java.util.ArrayList)3 QosParametersBase (org.ovirt.engine.core.common.action.QosParametersBase)3 HashMap (java.util.HashMap)2 Map (java.util.Map)2 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)2 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)2 List (java.util.List)1 Default (javax.validation.groups.Default)1 Before (org.junit.Before)1 DataCenter (org.ovirt.engine.api.model.DataCenter)1 Qos (org.ovirt.engine.api.model.Qos)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 Network (org.ovirt.engine.core.common.businessentities.network.Network)1 NetworkFilter (org.ovirt.engine.core.common.businessentities.network.NetworkFilter)1 VnicProfile (org.ovirt.engine.core.common.businessentities.network.VnicProfile)1 VnicProfileView (org.ovirt.engine.core.common.businessentities.network.VnicProfileView)1 QosQueryParameterBase (org.ovirt.engine.core.common.queries.QosQueryParameterBase)1 QueryParametersBase (org.ovirt.engine.core.common.queries.QueryParametersBase)1