CLOUDSTACK-5478:

Publish uuid for deployvm action event.
This commit is contained in:
Nitin Mehta 2014-01-22 16:50:50 -08:00
parent 5747b80124
commit 1b89ae7acb
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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 {