You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/11/25 20:05:08 UTC
[12/20] git commit: updated refs/heads/4.3 to 67df5b9
CLOUDSTACK-6467: Add pre/post-state transition status to messages published on
... event bus by UserVmStateListener. Allow system VM resource state
post-transitions to be published.
(cherry picked from commit 9c4de764f74bffd5cd547f8514d4a6897fb961c2)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Conflicts:
server/src/com/cloud/vm/UserVmStateListener.java
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/af79d6aa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/af79d6aa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/af79d6aa
Branch: refs/heads/4.3
Commit: af79d6aaf7b2305e4032f01ed0fe7dff2a01fee3
Parents: 7e5c7d4
Author: jeff <je...@greenqloud.com>
Authored: Mon Apr 21 14:47:12 2014 +0000
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Nov 25 23:16:01 2014 +0530
----------------------------------------------------------------------
server/src/com/cloud/vm/UserVmStateListener.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af79d6aa/server/src/com/cloud/vm/UserVmStateListener.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmStateListener.java b/server/src/com/cloud/vm/UserVmStateListener.java
index f783ffa..213ff8a 100644
--- a/server/src/com/cloud/vm/UserVmStateListener.java
+++ b/server/src/com/cloud/vm/UserVmStateListener.java
@@ -72,12 +72,12 @@ public class UserVmStateListener implements StateListener<State, VirtualMachine.
if(!status){
return false;
}
-
- if(vo.getType() != VirtualMachine.Type.User){
+
+ pubishOnEventBus(event.name(), "postStateTransitionEvent", vo, oldState, newState);
+
+ if (vo.getType() != VirtualMachine.Type.User) {
return true;
}
-
- pubishOnEventBus(event.name(), "postStateTransitionEvent", vo, oldState, newState);
if (VirtualMachine.State.isVmCreated(oldState, event, newState)) {
generateUsageEvent(vo.getServiceOfferingId(), vo, EventTypes.EVENT_VM_CREATE);
@@ -135,6 +135,7 @@ public class UserVmStateListener implements StateListener<State, VirtualMachine.
eventDescription.put("id", vo.getUuid());
eventDescription.put("old-state", oldState.name());
eventDescription.put("new-state", newState.name());
+ eventDescription.put("status", status);
String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").format(new Date());
eventDescription.put("eventDateTime", eventDate);