You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ni...@apache.org on 2014/01/23 01:50:59 UTC
git commit: updated refs/heads/master to 1b89ae7
Updated Branches:
refs/heads/master 5747b8012 -> 1b89ae7ac
CLOUDSTACK-5478:
Publish uuid for deployvm action event.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1b89ae7a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1b89ae7a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1b89ae7a
Branch: refs/heads/master
Commit: 1b89ae7acbaed3902e9b2efe69bac421fab5a742
Parents: 5747b80
Author: Nitin Mehta <ni...@citrix.com>
Authored: Wed Jan 22 16:50:50 2014 -0800
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Wed Jan 22 16:50:50 2014 -0800
----------------------------------------------------------------------
server/src/com/cloud/event/ActionEventUtils.java | 5 ++++-
server/src/com/cloud/vm/UserVmManagerImpl.java | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b89ae7a/server/src/com/cloud/event/ActionEventUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/event/ActionEventUtils.java b/server/src/com/cloud/event/ActionEventUtils.java
index 0363a0d..d435381 100755
--- a/server/src/com/cloud/event/ActionEventUtils.java
+++ b/server/src/com/cloud/event/ActionEventUtils.java
@@ -25,6 +25,7 @@ import java.util.Map;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
+import com.cloud.vm.VirtualMachine;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
@@ -181,7 +182,7 @@ public class ActionEventUtils {
}
org.apache.cloudstack.framework.events.Event event =
- new org.apache.cloudstack.framework.events.Event(ManagementService.Name, eventCategory, eventType, EventTypes.getEntityForEvent(eventType), null);
+ new org.apache.cloudstack.framework.events.Event(ManagementService.Name, eventCategory, eventType, EventTypes.getEntityForEvent(eventType), entityUuid);
Map<String, String> eventDescription = new HashMap<String, String>();
Account account = s_accountDao.findById(accountId);
@@ -233,6 +234,8 @@ public class ActionEventUtils {
else if (eventType.startsWith("USER."))
{
return User.class;
+ }else if (eventType.startsWith("VM.")){
+ return VirtualMachine.class;
}
return null;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b89ae7a/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 fc0ec0e..85f3527 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -2971,6 +2971,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
long vmId = cmd.getEntityId();
Long hostId = cmd.getHostId();
UserVmVO vm = _vmDao.findById(vmId);
+ CallContext.current().putContextParameter(VirtualMachine.class, vm.getUuid());
Pair<UserVmVO, Map<VirtualMachineProfile.Param, Object>> vmParamPair = null;
try {