Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danielrobbins/3342625 to your computer and use it in GitHub Desktop.
Save danielrobbins/3342625 to your computer and use it in GitHub Desktop.
reviewed by pwarren fixes ZEN-2893 update both the global and component search catalog when setting the monitored state of a component
Index: trunk/core/Products/Zuul/facades/devicefacade.py
===================================================================
--- trunk/core/Products/Zuul/facades/devicefacade.py (revision 62389)
+++ trunk/core/Products/Zuul/facades/devicefacade.py (revision 62567)
@@ -1,9 +1,9 @@
##############################################################################
-#
+#
# Copyright (C) Zenoss, Inc. 2009, all rights reserved.
-#
+#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
-#
+#
##############################################################################
@@ -296,5 +296,9 @@
for comp in comps:
IInfo(comp).monitor = monitor
- self._root.componentSearch.catalog_object(comp, idxs=('monitored',))
+ # update the componentSearch catalog
+ comp.index_object(idxs=('monitored',))
+
+ # update the global catalog as well
+ notify(IndexingEvent(comp, idxs=('monitored',)))
def pushChanges(self, uids):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment