Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add ComponentIdWhere. Should fix #2.

  • Loading branch information...
commit 0567d832497792262c9adc3dd4953e2e1f7cd297 1 parent 9b409a9
@cluther cluther authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 ZenPacks/zenoss/RabbitMQ/__init__.py
View
7 ZenPacks/zenoss/RabbitMQ/__init__.py
@@ -19,6 +19,7 @@
import logging
log = logging.getLogger('zen.RabbitMQ')
+from Products.ZenEvents.EventManagerBase import EventManagerBase
from Products.ZenModel.Device import Device
from Products.ZenModel.ZenPack import ZenPack as ZenPackBase
from Products.ZenRelations.RelSchema import ToManyCont, ToOne
@@ -61,3 +62,9 @@ def _buildDeviceRelations(self):
log.info("Rebuilding relations for existing devices")
for d in self.dmd.Devices.getSubDevicesGen():
d.buildRelations()
+
+
+# We need to filter CloudStack components by id instead of name.
+EventManagerBase.ComponentIdWhere = (
+ "\"(device = '%s' and component = '%s')\""
+ " % (me.device().getDmdKey(), me.id)")
Please sign in to comment.
Something went wrong with that request. Please try again.