Search in sources :

Example 6 with ClusterPolicyCRUDParameters

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

the class BackendWeightResource 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 7 with ClusterPolicyCRUDParameters

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

the class ClusterPolicyCRUDCommandTest method testCheckAddEditValidations.

@Test
public void testCheckAddEditValidations() {
    Guid clusterPolicyId = new Guid("e754440b-76a6-4099-8235-4565ab4b5521");
    ClusterPolicy clusterPolicy = new ClusterPolicy();
    clusterPolicy.setId(clusterPolicyId);
    ClusterPolicyCRUDCommand command = new ClusterPolicyCRUDCommand(new ClusterPolicyCRUDParameters(clusterPolicyId, clusterPolicy), null) {

        @Override
        protected void executeCommand() {
        }
    };
    command.schedulingManager = schedulingManager;
    assertTrue(command.checkAddEditValidations());
}
Also used : ClusterPolicyCRUDParameters(org.ovirt.engine.core.common.scheduling.parameters.ClusterPolicyCRUDParameters) Guid(org.ovirt.engine.core.compat.Guid) ClusterPolicy(org.ovirt.engine.core.common.scheduling.ClusterPolicy) Test(org.junit.Test) BaseCommandTest(org.ovirt.engine.core.bll.BaseCommandTest)

Example 8 with ClusterPolicyCRUDParameters

use of org.ovirt.engine.core.common.scheduling.parameters.ClusterPolicyCRUDParameters 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)

Aggregations

ClusterPolicyCRUDParameters (org.ovirt.engine.core.common.scheduling.parameters.ClusterPolicyCRUDParameters)8 ClusterPolicy (org.ovirt.engine.core.common.scheduling.ClusterPolicy)7 Guid (org.ovirt.engine.core.compat.Guid)3 Test (org.junit.Test)2 BaseCommandTest (org.ovirt.engine.core.bll.BaseCommandTest)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Response (javax.ws.rs.core.Response)1 PolicyUnit (org.ovirt.engine.core.common.scheduling.PolicyUnit)1 Pair (org.ovirt.engine.core.common.utils.Pair)1