use of org.ovirt.engine.api.model.Weight in project ovirt-engine by oVirt.
the class BackendWeightsResource method list.
@Override
public Weights list() {
ClusterPolicy clusterPolicy = getClusterPolicy();
Weights weights = new Weights();
if (clusterPolicy.getFunctions() != null) {
for (Pair<Guid, Integer> weightPair : clusterPolicy.getFunctions()) {
Weight weight = new Weight();
weight.setId(weightPair.getFirst().toString());
weight.setFactor(weightPair.getSecond());
weights.getWeights().add(addLinks(map(clusterPolicy, weight)));
}
}
return weights;
}
use of org.ovirt.engine.api.model.Weight in project ovirt-engine by oVirt.
the class SchedulingWeightMapperTest method getModel.
@Override
protected Weight getModel(Weight Weight) {
Weight = new Weight();
Weight.setId(ID);
Weight.setFactor(FACTOR);
return Weight;
}
Aggregations