mirror of https://github.com/apache/cloudstack.git
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:
parent
dd3a511c66
commit
ee82870aa2
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue