use of org.ovirt.engine.api.model.QosType in project ovirt-engine by oVirt.
the class BackendQossResource method add.
@Override
public Response add(Qos qos) {
validateParameters(qos, "name", "type");
QosParametersBase<QosBase> params = new QosParametersBase<>();
org.ovirt.engine.api.model.QosType qosType = qos.getType();
QosBase qosEntity = createNewQosEntityForQosType(qosType);
params.setQos(map(qos, qosEntity));
if (dataCenterId != null) {
qosEntity.setStoragePoolId(dataCenterId);
}
return performCreate(addActionTypeForQosType(qosType), params, new QueryIdResolver<Guid>(QueryType.GetQosById, IdQueryParameters.class));
}
Aggregations