Allow usaage reporting on removed service offering

This commit is contained in:
Hiroki Ohashi 2014-05-29 19:12:11 +02:00 committed by Daan Hoogland
parent cdf4047ce8
commit 3256e88623

View File

@ -3028,7 +3028,7 @@ public class ApiResponseHelper implements ResponseGenerator {
}
if (usageRecord.getUsageType() == UsageTypes.RUNNING_VM || usageRecord.getUsageType() == UsageTypes.ALLOCATED_VM) {
ServiceOfferingVO svcOffering = _entityMgr.findById(ServiceOfferingVO.class, usageRecord.getOfferingId().toString());
ServiceOfferingVO svcOffering = _entityMgr.findByIdIncludingRemoved(ServiceOfferingVO.class, usageRecord.getOfferingId().toString());
//Service Offering Id
usageRecResponse.setOfferingId(svcOffering.getUuid());
//VM Instance ID