Search in sources :

Example 36 with ClusterPolicy

use of org.ovirt.engine.core.common.scheduling.ClusterPolicy in project ovirt-engine by oVirt.

the class BackendFilterResource method remove.

@Override
public Response remove() {
    ClusterPolicy entity = parent.getClusterPolicy();
    updateEntityForRemove(entity, guid);
    return performAction(ActionType.EditClusterPolicy, new ClusterPolicyCRUDParameters(entity.getId(), entity));
}
Also used : ClusterPolicyCRUDParameters(org.ovirt.engine.core.common.scheduling.parameters.ClusterPolicyCRUDParameters) ClusterPolicy(org.ovirt.engine.core.common.scheduling.ClusterPolicy)

Example 37 with ClusterPolicy

use of org.ovirt.engine.core.common.scheduling.ClusterPolicy in project ovirt-engine by oVirt.

the class BackendPolicyUnitsResource method performAdd.

// need to revisit: update should be in a separate hierarchy
protected Response performAdd(N incoming) {
    ClusterPolicy entity = getClusterPolicy();
    performAction(ActionType.EditClusterPolicy, getAddParametersProvider().getParameters(incoming, entity));
    entity = getClusterPolicy();
    updateIncomingId(incoming);
    N model = map(entity, incoming);
    model = addLinks(doPopulate(model, entity));
    return Response.ok(model).build();
}
Also used : ClusterPolicy(org.ovirt.engine.core.common.scheduling.ClusterPolicy)

Aggregations

ClusterPolicy (org.ovirt.engine.core.common.scheduling.ClusterPolicy)37 Guid (org.ovirt.engine.core.compat.Guid)20 HashMap (java.util.HashMap)10 LinkedHashMap (java.util.LinkedHashMap)8 Test (org.junit.Test)8 ArrayList (java.util.ArrayList)7 ClusterPolicyCRUDParameters (org.ovirt.engine.core.common.scheduling.parameters.ClusterPolicyCRUDParameters)7 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)4 PolicyUnit (org.ovirt.engine.core.common.scheduling.PolicyUnit)4 VDS (org.ovirt.engine.core.common.businessentities.VDS)3 Pair (org.ovirt.engine.core.common.utils.Pair)3 HashSet (java.util.HashSet)2 List (java.util.List)2 Map (java.util.Map)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 BaseCommandTest (org.ovirt.engine.core.bll.BaseCommandTest)2 QueryParametersBase (org.ovirt.engine.core.common.queries.QueryParametersBase)2 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)2 ValidationError (org.ovirt.engine.core.common.utils.customprop.ValidationError)2 Arrays (java.util.Arrays)1