cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seb...@apache.org
Subject [16/50] git commit: updated refs/heads/sdnextensions to bcfb4e6
Date Fri, 12 Jul 2013 07:51:11 GMT
CLOUDSTACK-3423. Publish 'VM.UPGRADE' usage event every time the service offering of a VM is
upgraded.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/873e4e0e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/873e4e0e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/873e4e0e

Branch: refs/heads/sdnextensions
Commit: 873e4e0e585f36491b8e2ab7b5983e843283c2be
Parents: 3f5c1c6
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Thu Jul 11 10:03:57 2013 +0530
Committer: Likitha Shetty <likitha.shetty@citrix.com>
Committed: Thu Jul 11 10:06:10 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/vm/UserVmManagerImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/873e4e0e/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 0486071..53b4b6e 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -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());
 
     }


Mime
View raw message