cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/2] git commit: updated refs/heads/4.8 to 41ed00a
Date Thu, 03 Nov 2016 11:20:31 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.8 68f22e2a4 -> 41ed00a8c


CLOUDSTACK-9554 Juniper Contrail plug-in is publishing events to wrong message bus


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

Branch: refs/heads/4.8
Commit: 725ddb82a1c0f99f91ce1316d0e8082b6731d41e
Parents: 9eb8b2e
Author: subhash yedugundla <venkatasubhashnaidu.yedugundla@citrix.com>
Authored: Wed Aug 17 14:08:53 2016 +0530
Committer: subhash_y <venkata.yedugundla@accelerite.com>
Committed: Fri Oct 21 12:14:21 2016 +0530

----------------------------------------------------------------------
 plugins/network-elements/juniper-contrail/pom.xml  | 11 +++++++++++
 .../network/contrail/management/EventUtils.java    | 17 +++++++++--------
 2 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/725ddb82/plugins/network-elements/juniper-contrail/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/pom.xml b/plugins/network-elements/juniper-contrail/pom.xml
index de57749..4e7373d 100644
--- a/plugins/network-elements/juniper-contrail/pom.xml
+++ b/plugins/network-elements/juniper-contrail/pom.xml
@@ -83,6 +83,17 @@
     </dependency>
     <dependency>
       <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-utils</artifactId>
+      <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+           <artifactId>xml-apis</artifactId>
+           <groupId>xml-apis</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
       <artifactId>cloud-framework-spring-lifecycle</artifactId>
       <version>${project.version}</version>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/725ddb82/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java
b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java
index faeff1f..78ec013 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java
@@ -28,8 +28,8 @@ import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.context.CallContext;
-import org.apache.cloudstack.framework.messagebus.MessageBus;
-import org.apache.cloudstack.framework.messagebus.MessageBusBase;
+import org.apache.cloudstack.framework.events.EventBus;
+import org.apache.cloudstack.framework.events.EventBusException;
 import org.aopalliance.intercept.MethodInterceptor;
 import org.aopalliance.intercept.MethodInvocation;
 
@@ -46,7 +46,7 @@ import com.cloud.utils.component.ComponentMethodInterceptor;
 public class EventUtils {
     private static final Logger s_logger = Logger.getLogger(EventUtils.class);
 
-    protected static MessageBus s_messageBus = null;
+    protected static  EventBus s_eventBus = null;
 
     public EventUtils() {
     }
@@ -58,9 +58,9 @@ public class EventUtils {
         }
 
         try {
-            s_messageBus = ComponentContext.getComponent(MessageBusBase.class);
+            s_eventBus = ComponentContext.getComponent(EventBus.class);
         } catch (NoSuchBeanDefinitionException nbe) {
-            return; // no provider is configured to provide events bus, so just return
+             return; // no provider is configured to provide events bus, so just return
         }
 
         org.apache.cloudstack.framework.events.Event event =
@@ -72,9 +72,10 @@ public class EventUtils {
         eventDescription.put("details", details);
         event.setDescription(eventDescription);
         try {
-            s_messageBus.publish(EventTypes.getEntityForEvent(eventType), eventType, null,
event);
-        } catch (Exception e) {
-            s_logger.warn("Failed to publish action event on the the event bus.");
+            s_eventBus.publish(event);
+        } catch (EventBusException evx) {
+            String errMsg = "Failed to publish contrail event.";
+            s_logger.warn(errMsg, evx);
         }
 
     }


Mime
View raw message