You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/11/20 20:51:18 UTC

[cloudstack] branch master updated: api: Add event for VM recovery operation (#4486)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new aa67f9c  api: Add event for VM recovery operation (#4486)
aa67f9c is described below

commit aa67f9c6e2a3dbdcdc23dc02fd389fa3f145c17d
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Sat Nov 21 02:21:02 2020 +0530

    api: Add event for VM recovery operation (#4486)
    
    Co-authored-by: Pearl Dsilva <pe...@shapeblue.com>
---
 api/src/main/java/com/cloud/event/EventTypes.java        | 1 +
 server/src/main/java/com/cloud/vm/UserVmManagerImpl.java | 1 +
 2 files changed, 2 insertions(+)

diff --git a/api/src/main/java/com/cloud/event/EventTypes.java b/api/src/main/java/com/cloud/event/EventTypes.java
index 852198b..ebe7590 100644
--- a/api/src/main/java/com/cloud/event/EventTypes.java
+++ b/api/src/main/java/com/cloud/event/EventTypes.java
@@ -104,6 +104,7 @@ public class EventTypes {
     public static final String EVENT_VM_EXPUNGE = "VM.EXPUNGE";
     public static final String EVENT_VM_IMPORT = "VM.IMPORT";
     public static final String EVENT_VM_UNMANAGE = "VM.UNMANAGE";
+    public static final String EVENT_VM_RECOVER = "VM.RECOVER";
 
     // Domain Router
     public static final String EVENT_ROUTER_CREATE = "ROUTER.CREATE";
diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
index 7de7b8e..3d447c6 100644
--- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
@@ -2037,6 +2037,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
 
     @Override
     @DB
+    @ActionEvent(eventType = EventTypes.EVENT_VM_RECOVER, eventDescription = "Recovering VM")
     public UserVm recoverVirtualMachine(RecoverVMCmd cmd) throws ResourceAllocationException, CloudRuntimeException {
 
         final Long vmId = cmd.getId();