cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject [1/4] git commit: updated refs/heads/master to bf967eb
Date Tue, 03 Sep 2013 17:38:36 GMT
Updated Branches:
  refs/heads/master e48e75625 -> bf967eb62


Adding eventDateTime to all event generation locations


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/14ee684c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/14ee684c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/14ee684c

Branch: refs/heads/master
Commit: 14ee684ce3cf3a2ec5581a35ff6574c26d553f4e
Parents: e48e756
Author: Chip Childers <chipchilders@apache.org>
Authored: Tue Sep 3 11:34:56 2013 -0400
Committer: Chip Childers <chipchilders@apache.org>
Committed: Tue Sep 3 11:34:56 2013 -0400

----------------------------------------------------------------------
 server/src/com/cloud/event/ActionEventUtils.java               | 6 ++++++
 server/src/com/cloud/event/AlertGenerator.java                 | 6 ++++++
 server/src/com/cloud/event/UsageEventUtils.java                | 6 ++++++
 server/src/com/cloud/network/NetworkStateListener.java         | 6 ++++++
 .../src/com/cloud/storage/listener/SnapshotStateListener.java  | 6 ++++++
 server/src/com/cloud/storage/listener/VolumeStateListener.java | 6 ++++++
 server/src/com/cloud/vm/UserVmStateListener.java               | 6 ++++++
 7 files changed, 42 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14ee684c/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 4ee6e9e..e89c8a0 100755
--- a/server/src/com/cloud/event/ActionEventUtils.java
+++ b/server/src/com/cloud/event/ActionEventUtils.java
@@ -17,6 +17,8 @@
 
 package com.cloud.event;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -189,6 +191,10 @@ public class ActionEventUtils {
         eventDescription.put("status", state.toString());
         eventDescription.put("entity", entityType);
         eventDescription.put("entityuuid", entityUuid);
+
+        String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+        eventDescription.put("eventDateTime", eventDate);
+
         event.setDescription(eventDescription);
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14ee684c/server/src/com/cloud/event/AlertGenerator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/event/AlertGenerator.java b/server/src/com/cloud/event/AlertGenerator.java
index c56f917..b19500b 100644
--- a/server/src/com/cloud/event/AlertGenerator.java
+++ b/server/src/com/cloud/event/AlertGenerator.java
@@ -31,8 +31,10 @@ import org.springframework.stereotype.Component;
 
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
+import java.text.SimpleDateFormat;
 
 @Component
 public class AlertGenerator {
@@ -83,6 +85,10 @@ public class AlertGenerator {
         } else {
             eventDescription.put("podId", null);
         }
+
+        String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+        eventDescription.put("eventDateTime", eventDate);
+
         event.setDescription(eventDescription);
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14ee684c/server/src/com/cloud/event/UsageEventUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/event/UsageEventUtils.java b/server/src/com/cloud/event/UsageEventUtils.java
index 2e42229..4ac433d 100644
--- a/server/src/com/cloud/event/UsageEventUtils.java
+++ b/server/src/com/cloud/event/UsageEventUtils.java
@@ -33,6 +33,8 @@ import org.springframework.stereotype.Component;
 
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -148,6 +150,10 @@ public class UsageEventUtils {
         eventDescription.put("event", usageEventType);
         eventDescription.put("resource", resourceType);
         eventDescription.put("id", resourceUUID);
+
+        String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+        eventDescription.put("eventDateTime", eventDate);
+
         event.setDescription(eventDescription);
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14ee684c/server/src/com/cloud/network/NetworkStateListener.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkStateListener.java b/server/src/com/cloud/network/NetworkStateListener.java
index 038e769..674c5e5 100644
--- a/server/src/com/cloud/network/NetworkStateListener.java
+++ b/server/src/com/cloud/network/NetworkStateListener.java
@@ -31,6 +31,8 @@ import org.apache.log4j.Logger;
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 
 import javax.inject.Inject;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -80,6 +82,10 @@ public class NetworkStateListener implements StateListener<State, Event,
Network
         eventDescription.put("id", vo.getUuid());
         eventDescription.put("old-state", oldState.name());
         eventDescription.put("new-state", newState.name());
+
+        String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+        eventDescription.put("eventDateTime", eventDate);
+
         eventMsg.setDescription(eventDescription);
         try {
             _eventBus.publish(eventMsg);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14ee684c/server/src/com/cloud/storage/listener/SnapshotStateListener.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/listener/SnapshotStateListener.java b/server/src/com/cloud/storage/listener/SnapshotStateListener.java
index 21fcf11..d47cc13 100644
--- a/server/src/com/cloud/storage/listener/SnapshotStateListener.java
+++ b/server/src/com/cloud/storage/listener/SnapshotStateListener.java
@@ -34,6 +34,8 @@ import com.cloud.storage.SnapshotVO;
 import com.cloud.utils.fsm.StateListener;
 import com.cloud.utils.component.ComponentContext;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -79,6 +81,10 @@ public class SnapshotStateListener implements StateListener<State, Event,
Snapsh
         eventDescription.put("id", vo.getUuid());
         eventDescription.put("old-state", oldState.name());
         eventDescription.put("new-state", newState.name());
+
+        String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+        eventDescription.put("eventDateTime", eventDate);
+
         eventMsg.setDescription(eventDescription);
         try {
             _eventBus.publish(eventMsg);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14ee684c/server/src/com/cloud/storage/listener/VolumeStateListener.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/listener/VolumeStateListener.java b/server/src/com/cloud/storage/listener/VolumeStateListener.java
index 6fa56a5..9940aae 100644
--- a/server/src/com/cloud/storage/listener/VolumeStateListener.java
+++ b/server/src/com/cloud/storage/listener/VolumeStateListener.java
@@ -29,6 +29,8 @@ import org.apache.cloudstack.framework.events.EventBusException;
 import org.apache.log4j.Logger;
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -74,6 +76,10 @@ public class VolumeStateListener implements StateListener<State, Event,
Volume>
         eventDescription.put("id", vo.getUuid());
         eventDescription.put("old-state", oldState.name());
         eventDescription.put("new-state", newState.name());
+
+        String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+        eventDescription.put("eventDateTime", eventDate);
+
         eventMsg.setDescription(eventDescription);
         try {
             _eventBus.publish(eventMsg);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14ee684c/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 d270e60..c61f1ed 100644
--- a/server/src/com/cloud/vm/UserVmStateListener.java
+++ b/server/src/com/cloud/vm/UserVmStateListener.java
@@ -34,6 +34,8 @@ import org.apache.log4j.Logger;
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 
 import javax.inject.Inject;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -116,6 +118,10 @@ public class UserVmStateListener implements StateListener<State, VirtualMachine.
         eventDescription.put("id", vo.getUuid());
         eventDescription.put("old-state", oldState.name());
         eventDescription.put("new-state", newState.name());
+
+        String eventDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+        eventDescription.put("eventDateTime", eventDate);
+
         eventMsg.setDescription(eventDescription);
         try {
             _eventBus.publish(eventMsg);


Mime
View raw message