mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-02 20:02:29 +01:00 
			
		
		
		
	CLOUDSTACK-3423. Publish 'VM.UPGRADE' usage event every time the service offering of a VM is upgraded.
This commit is contained in:
		
							parent
							
								
									3f5c1c6da3
								
							
						
					
					
						commit
						873e4e0e58
					
				@ -818,6 +818,10 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
 | 
			
		||||
            _resourceLimitMgr.decrementResourceCount(caller.getAccountId(), ResourceType.memory, new Long (currentMemory - newMemory));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Generate usage event for VM upgrade
 | 
			
		||||
        UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VM_UPGRADE, vmInstance.getAccountId(), vmInstance.getDataCenterId(), vmInstance.getId(), vmInstance.getHostName(),
 | 
			
		||||
                vmInstance.getServiceOfferingId(), vmInstance.getTemplateId(), vmInstance.getHypervisorType().toString(), VirtualMachine.class.getName(), vmInstance.getUuid());
 | 
			
		||||
 | 
			
		||||
        return _vmDao.findById(vmInstance.getId());
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user