CLOUDSTACK-5349:

Volume create usage event and resource count werent getting registered. Check its type rather than it is UserVm since the code is coming from VirtualMachineManager.
This commit is contained in:
Nitin Mehta 2013-12-04 10:53:42 -08:00
parent dd3a511c66
commit ee82870aa2
1 changed files with 2 additions and 3 deletions

View File

@ -567,8 +567,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
vol = _volsDao.persist(vol);
// Save usage event and update resource count for user vm volumes
if (vm instanceof UserVm) {
if (vm.getType() == VirtualMachine.Type.User) {
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_CREATE,
vol.getAccountId(),
vol.getDataCenterId(),
@ -619,7 +618,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
vol = _volsDao.persist(vol);
// Create event and update resource count for volumes if vm is a user vm
if (vm instanceof UserVm) {
if (vm.getType() == VirtualMachine.Type.User) {
Long offeringId = null;