use of org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter in project ovirt-engine by oVirt.
the class AddVmCommand method getQuotaVdsConsumptionParameters.
@Override
public List<QuotaConsumptionParameter> getQuotaVdsConsumptionParameters() {
List<QuotaConsumptionParameter> list = new ArrayList<>();
list.add(new QuotaSanityParameter(getQuotaId(), null));
return list;
}
use of org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter in project ovirt-engine by oVirt.
the class AddVmTemplateCommand method getQuotaVdsConsumptionParameters.
@Override
public List<QuotaConsumptionParameter> getQuotaVdsConsumptionParameters() {
Guid quotaId = getQuotaManager().getDefaultQuotaIfNull(getParameters().getMasterVm().getQuotaId(), getStoragePoolId());
List<QuotaConsumptionParameter> list = new ArrayList<>();
list.add(new QuotaSanityParameter(quotaId, null));
return list;
}
use of org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter in project ovirt-engine by oVirt.
the class AttachUserToVmFromPoolAndRunCommand method getQuotaVdsConsumptionParameters.
@Override
public List<QuotaConsumptionParameter> getQuotaVdsConsumptionParameters() {
List<QuotaConsumptionParameter> list = new ArrayList<>();
VM vm = getVm();
if (vm != null) {
setStoragePoolId(vm.getStoragePoolId());
list.add(new QuotaClusterConsumptionParameter(vm.getQuotaId(), null, QuotaConsumptionParameter.QuotaAction.CONSUME, vm.getClusterId(), vm.getCpuPerSocket() * vm.getNumOfSockets(), vm.getMemSizeMb()));
}
return list;
}
Aggregations