cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From likit...@apache.org
Subject git commit: updated refs/heads/4.2 to 8eac039
Date Thu, 11 Jul 2013 04:41:18 GMT
Updated Branches:
  refs/heads/4.2 4d4bd8a26 -> 8eac039d8


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/8eac039d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8eac039d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8eac039d

Branch: refs/heads/4.2
Commit: 8eac039d868c1dd2e56c27c6d9cb8e0715295818
Parents: 4d4bd8a
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:05:08 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/8eac039d/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