You can subscribe to this list here.
2007 |
Jan
|
Feb
(65) |
Mar
(276) |
Apr
(544) |
May
(638) |
Jun
(225) |
Jul
(204) |
Aug
(294) |
Sep
(532) |
Oct
(506) |
Nov
(324) |
Dec
(359) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(208) |
Feb
(225) |
Mar
(248) |
Apr
(388) |
May
(222) |
Jun
(47) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Author: cgibbons Date: 2008-04-21 14:15:37 -0400 (Mon, 21 Apr 2008) New Revision: 9062 Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/INSTALL.txt trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/README.txt trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/__init__.py trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/__init__.py trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/daemons/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/datasources/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/datasources/LDAPMonitorDataSource.py trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/datasources/__init__.py trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/lib/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/lib/__init__.py trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/migrate/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/migrate/__init__.py trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/modeler/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/modeler/plugins/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/objects/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/objects/objects.xml trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/reports/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/skins/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/skins/ZenPacks.zenoss.LDAPMonitor/ trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/skins/ZenPacks.zenoss.LDAPMonitor/editLDAPMonitorDataSource.pt trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/__init__.py trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/setup.py Log: * Fixes #2998 : new ZenPack for monitoring LDAP server response time using check_ldap or check_ldaps Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/INSTALL.txt Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/README.txt Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/datasources/LDAPMonitorDataSource.py Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/datasources/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/lib/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/migrate/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/objects/objects.xml Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/LDAPMonitor/skins/ZenPacks.zenoss.LDAPMonitor/editLDAPMonitorDataSource.pt Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/ZenPacks/zenoss/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.LDAPMonitor/setup.py |
From: <sv...@ze...> - 2008-04-21 17:53:44
|
Author: jstevens Date: 2008-04-21 13:53:48 -0400 (Mon, 21 Apr 2008) New Revision: 9061 Modified: trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/ZenPacks/zenoss/ApacheMonitor/datasources/ApacheMonitorDataSource.py Log: fixes #2997 Modified: trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/ZenPacks/zenoss/ApacheMonitor/datasources/ApacheMonitorDataSource.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/ZenPacks/zenoss/ApacheMonitor/datasources/ApacheMonitorDataSource.py 2008-04-21 15:43:04 UTC (rev 9060) +++ trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/ZenPacks/zenoss/ApacheMonitor/datasources/ApacheMonitorDataSource.py 2008-04-21 17:53:48 UTC (rev 9061) @@ -97,7 +97,8 @@ def checkCommandPrefix(self, context, cmd): if self.usessh: return os.path.join(context.zCommandPath, cmd) - return os.path.join('$ZENHOME/Products/ApacheMonitor/libexec', cmd) + zp = self.getZenPack(context) + return zp.path('libexec', cmd) def addDataPoints(self): |
From: <sv...@ze...> - 2008-04-21 15:42:58
|
Author: jstevens Date: 2008-04-21 11:43:04 -0400 (Mon, 21 Apr 2008) New Revision: 9060 Modified: trunk/zenpacks/GNUmakefile Log: refs #2995 Modified: trunk/zenpacks/GNUmakefile =================================================================== --- trunk/zenpacks/GNUmakefile 2008-04-21 15:18:57 UTC (rev 9059) +++ trunk/zenpacks/GNUmakefile 2008-04-21 15:43:04 UTC (rev 9060) @@ -23,5 +23,5 @@ install: build mkdir -p $(DESTDIR)/$(ZENHOME)/packs for p in $(OLD_PACKS) ; do cp $$p*.zip $(DESTDIR)/$(ZENHOME)/packs ; done - for p in $(EGG_PACKS) ; do cp $$p*.egg $(DESTDIR/$(ZENHOME)/packs ; done + for p in $(EGG_PACKS) ; do cp $$p*.egg $(DESTDIR)/$(ZENHOME)/packs ; done |
From: <sv...@ze...> - 2008-04-21 15:18:50
|
Author: jstevens Date: 2008-04-21 11:18:57 -0400 (Mon, 21 Apr 2008) New Revision: 9059 Modified: trunk/zenpacks/HelloWorldZenPack/ trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/ trunk/zenpacks/ZenPacks.zenoss.DellMonitor/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/ trunk/zenpacks/ZenPacks.zenoss.HPMonitor/ trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ Log: setting the svn:ignore properties Property changes on: trunk/zenpacks/HelloWorldZenPack ___________________________________________________________________ Name: svn:ignore - *.pyc Property changes on: trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info Property changes on: trunk/zenpacks/ZenPacks.zenoss.DellMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info Property changes on: trunk/zenpacks/ZenPacks.zenoss.DigMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info Property changes on: trunk/zenpacks/ZenPacks.zenoss.DnsMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info Property changes on: trunk/zenpacks/ZenPacks.zenoss.HPMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info Property changes on: trunk/zenpacks/ZenPacks.zenoss.HttpMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info Property changes on: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info Property changes on: trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info Property changes on: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor ___________________________________________________________________ Name: svn:ignore + build dist temp *.egg-info |
From: <sv...@ze...> - 2008-04-21 15:06:23
|
Author: jstevens Date: 2008-04-21 11:06:25 -0400 (Mon, 21 Apr 2008) New Revision: 9058 Removed: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/ Log: egg-info directories shoudn't be in svn |
From: <sv...@ze...> - 2008-04-21 15:03:53
|
Author: jstevens Date: 2008-04-21 11:03:52 -0400 (Mon, 21 Apr 2008) New Revision: 9057 Added: trunk/zenpacks/build-egg.sh Modified: trunk/zenpacks/GNUmakefile trunk/zenpacks/README.txt trunk/zenpacks/zenpacks.spec Log: refs #2995 * first pass at adding eggified zenpacks to the build process Modified: trunk/zenpacks/GNUmakefile =================================================================== --- trunk/zenpacks/GNUmakefile 2008-04-21 14:18:59 UTC (rev 9056) +++ trunk/zenpacks/GNUmakefile 2008-04-21 15:03:52 UTC (rev 9057) @@ -1,5 +1,8 @@ -PACKS=$(patsubst %/about.txt,%,$(wildcard */about.txt)) -BUILD=$(patsubst %-build,%,$(PACKS)) +OLD_PACKS=$(patsubst %/about.txt,%,$(wildcard */about.txt)) +EGG_PACKS=$(patsubst %/setup.py,%,$(wildcard */setup.py)) +BUILD_OLD=$(patsubst %-build,%,$(OLD_PACKS)) +BUILD_EGG=$(patsubst %-build,%,$(EGG_PACKS)) + ifeq ($(OS),) OS:=el5 endif @@ -7,14 +10,18 @@ all: build -build: $(BUILD) +build: $(BUILD_OLD) $(BUILD_EGG) -$(BUILD): always +$(BUILD_OLD): always ./build-pack.sh $@ $(OS) +$(BUILD_EGG): always + ./build-egg.sh $@ $(OS) + always: install: build mkdir -p $(DESTDIR)/$(ZENHOME)/packs - for p in $(PACKS) ; do cp $$p*.zip $(DESTDIR)/$(ZENHOME)/packs ; done + for p in $(OLD_PACKS) ; do cp $$p*.zip $(DESTDIR)/$(ZENHOME)/packs ; done + for p in $(EGG_PACKS) ; do cp $$p*.egg $(DESTDIR/$(ZENHOME)/packs ; done Modified: trunk/zenpacks/README.txt =================================================================== --- trunk/zenpacks/README.txt 2008-04-21 14:18:59 UTC (rev 9056) +++ trunk/zenpacks/README.txt 2008-04-21 15:03:52 UTC (rev 9057) @@ -1,18 +1,12 @@ Managing ZenPacks -To install a ZenPack in .zip format, run the command: +See the ZenPack section of the Zenoss Admin Guide for more details. - zenpack --install <ZenPackFileName> - +To install a ZenPack from source: +$ zenpack --link --install <ZenPackSourceDirectory> -To install an unzipped ZenPack, run the same command: +To install a ZenPack from a .egg file: +$ zenpack --install <ZenPackEggFile> - zenpack --install <ZenPackDirectoryName> - - -To list the install ZenPacks, run the command: - - zenpack --list - - -See the Zenoss Admin Guide for more information on ZenPacks. \ No newline at end of file +To get a list of all installed ZenPacks: +$ zenpack --list Added: trunk/zenpacks/build-egg.sh Property changes on: trunk/zenpacks/build-egg.sh ___________________________________________________________________ Name: svn:executable + * Modified: trunk/zenpacks/zenpacks.spec =================================================================== --- trunk/zenpacks/zenpacks.spec 2008-04-21 14:18:59 UTC (rev 9056) +++ trunk/zenpacks/zenpacks.spec 2008-04-21 15:03:52 UTC (rev 9057) @@ -13,7 +13,7 @@ # we come up with a more generic way of calculating which should be installed # first, second, third, etc... # note: el4 requires these to be on one line... -%define zenpacks "ApacheMonitor DnsMonitor HPMonitor MySqlMonitor DellMonitor HttpMonitor ZenJMX" +%define zenpacks "ZenPacks.zenoss.ApacheMonitor ZenPacks.zenoss.DnsMonitor ZenPacks.zenoss.HPMonitor ZenPacks.zenoss.MySqlMonitor ZenPacks.zenoss.DellMonitor ZenPacks.zenoss.HttpMonitor ZenJMX" %define zenpack_install_dir %{zenhome}/packs @@ -97,8 +97,11 @@ DIR=%{zenpack_install_dir} for i in `echo %{zenpacks}` do - PACK="`ls ${DIR}/$i*.zip`" + PACK="`ls ${DIR}/$i*.egg`" if [ "x${PACK}" = "x" ]; then + PACK="`ls ${DIR}/$i*.zip`" + fi + if [ "x${PACK}" = "x" ]; then echo "Error: pack ${i} not found in ${DIR}" continue fi |
From: <sv...@ze...> - 2008-04-21 14:18:59
|
Author: jstevens Date: 2008-04-21 10:18:59 -0400 (Mon, 21 Apr 2008) New Revision: 9056 Added: trunk/zenpacks/OldNonEggPacks/ApacheMonitor/ trunk/zenpacks/OldNonEggPacks/DellMonitor/ trunk/zenpacks/OldNonEggPacks/DnsMonitor/ trunk/zenpacks/OldNonEggPacks/HPMonitor/ trunk/zenpacks/OldNonEggPacks/HttpMonitor/ trunk/zenpacks/OldNonEggPacks/MySqlMonitor/ Log: These have been superceded by egg zenpacks Copied: trunk/zenpacks/OldNonEggPacks/ApacheMonitor (from rev 9049, trunk/zenpacks/ApacheMonitor) Copied: trunk/zenpacks/OldNonEggPacks/DellMonitor (from rev 9049, trunk/zenpacks/DellMonitor) Copied: trunk/zenpacks/OldNonEggPacks/DnsMonitor (from rev 9049, trunk/zenpacks/DnsMonitor) Copied: trunk/zenpacks/OldNonEggPacks/HPMonitor (from rev 9049, trunk/zenpacks/HPMonitor) Copied: trunk/zenpacks/OldNonEggPacks/HttpMonitor (from rev 9049, trunk/zenpacks/HttpMonitor) Copied: trunk/zenpacks/OldNonEggPacks/MySqlMonitor (from rev 9049, trunk/zenpacks/MySqlMonitor) |
From: <sv...@ze...> - 2008-04-21 14:18:19
|
Author: jstevens Date: 2008-04-21 10:18:23 -0400 (Mon, 21 Apr 2008) New Revision: 9055 Removed: trunk/zenpacks/ApacheMonitor/ trunk/zenpacks/DellMonitor/ trunk/zenpacks/DnsMonitor/ trunk/zenpacks/HPMonitor/ trunk/zenpacks/HttpMonitor/ trunk/zenpacks/MySqlMonitor/ Log: moving these to oldzenpacks dir before rm them later |
From: <sv...@ze...> - 2008-04-21 13:52:14
|
Author: jstevens Date: 2008-04-21 09:52:21 -0400 (Mon, 21 Apr 2008) New Revision: 9054 Added: trunk/zenpacks/OldNonEggPacks/ Log: Temporarily moving outdated packs to the OldNonEggPacks dir. Once 2.2 is out and these aren't needed for testing we can rm them. |
From: <sv...@ze...> - 2008-04-21 12:30:38
|
Author: ian Date: 2008-04-21 08:30:45 -0400 (Mon, 21 Apr 2008) New Revision: 9053 Modified: trunk/Products/ZenModel/migrate/fixOldTemplates.py trunk/Products/ZenModel/migrate/zZenDiscLove.py Log: * Old migrate scripts didn't make it into the proper tags. Updated versions Modified: trunk/Products/ZenModel/migrate/fixOldTemplates.py =================================================================== --- trunk/Products/ZenModel/migrate/fixOldTemplates.py 2008-04-21 12:27:08 UTC (rev 9052) +++ trunk/Products/ZenModel/migrate/fixOldTemplates.py 2008-04-21 12:30:45 UTC (rev 9053) @@ -21,8 +21,13 @@ import re class FixOldTemplates(Migrate.Step): - version = Migrate.Version(2, 1, 2) + version = Migrate.Version(2, 2, 0) + def __init__(self): + Migrate.Step.__init__(self) + import twotwoindexing + self.dependencies = [ twotwoindexing.twotwoindexing ] + def cutover(self, dmd): for template in dmd.Devices.getAllRRDTemplates(): if template.id == 'FileSystem': Modified: trunk/Products/ZenModel/migrate/zZenDiscLove.py =================================================================== --- trunk/Products/ZenModel/migrate/zZenDiscLove.py 2008-04-21 12:27:08 UTC (rev 9052) +++ trunk/Products/ZenModel/migrate/zZenDiscLove.py 2008-04-21 12:30:45 UTC (rev 9053) @@ -14,7 +14,7 @@ import Migrate class zZenDiscLove(Migrate.Step): - version = Migrate.Version(2, 1, 2) + version = Migrate.Version(2, 2, 0) def cutover(self, dmd): if not dmd.Networks.hasProperty('zAutoAllocateScript'): @@ -27,5 +27,3 @@ zZenDiscLove() - - |
From: <sv...@ze...> - 2008-04-21 12:27:01
|
Author: ecn Date: 2008-04-21 08:27:08 -0400 (Mon, 21 Apr 2008) New Revision: 9052 Modified: trunk/Products/ZenModel/Device.py Log: * put back the monitors relation to keep existing devices from flailing Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2008-04-21 06:15:20 UTC (rev 9051) +++ trunk/Products/ZenModel/Device.py 2008-04-21 12:27:08 UTC (rev 9052) @@ -269,6 +269,9 @@ "managedObject")), ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), + # unused: + ('monitors', ToMany(ToMany, 'Products.ZenModel.StatusMonitorConf', + 'devices')), ) # Screen action bindings (and tab definitions) |
From: <sv...@ze...> - 2008-04-21 06:15:12
|
Author: jstevens Date: 2008-04-21 02:15:20 -0400 (Mon, 21 Apr 2008) New Revision: 9051 Modified: trunk/Products/ZenUtils/ZenPackCmd.py Log: refs #2994 Modified: trunk/Products/ZenUtils/ZenPackCmd.py =================================================================== --- trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-21 06:12:00 UTC (rev 9050) +++ trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-21 06:15:20 UTC (rev 9051) @@ -363,7 +363,11 @@ # We skipped deleteing the existing files from filesystem # because maybe they'd be needed in migrate scripts. # Delete them now - shutil.rmtree(zenPath('Products', existing.id)) + oldZpDir = zenPath('Products', existing.id) + if os.path.islink(oldZpDir): + os.remove(oldZpDir) + else: + shutil.rmtree(oldZpDir) cleanupSkins(dmd) transaction.commit() |
From: <sv...@ze...> - 2008-04-21 06:11:55
|
Author: jstevens Date: 2008-04-21 02:12:00 -0400 (Mon, 21 Apr 2008) New Revision: 9050 Modified: trunk/Products/ZenUtils/ZenPackCmd.py trunk/Products/ZenUtils/zenpack.py Log: refs #2994 Modified: trunk/Products/ZenUtils/ZenPackCmd.py =================================================================== --- trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-21 05:31:22 UTC (rev 9049) +++ trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-21 06:12:00 UTC (rev 9050) @@ -331,6 +331,7 @@ if not existing and zenPack.prevZenPackName: existing = dmd.ZenPackManager.packs._getOb( zenPack.prevZenPackName, None) + deferFileDeletion = False packables = [] if existing: for p in existing.packables(): @@ -346,14 +347,23 @@ forceNoFileDeletion=forceNoFileDeletion, uninstallEgg=False) else: + # Don't delete files, might still be needed for + # migrate scripts to be run below. + deferFileDeletion = True oldzenpack.RemoveZenPack(dmd, existing.id, - skipDepsCheck=False, leaveObjects=True) + skipDepsCheck=False, leaveObjects=True, + deleteFiles=False) dmd.ZenPackManager.packs._setObject(packName, zenPack) zenPack = dmd.ZenPackManager.packs._getOb(packName) zenPack.install(dmd) for p in packables: - zenPack.packables.addRelation(p) + zenPack.packables.addRelation(p) + if deferFileDeletion: + # We skipped deleteing the existing files from filesystem + # because maybe they'd be needed in migrate scripts. + # Delete them now + shutil.rmtree(zenPath('Products', existing.id)) cleanupSkins(dmd) transaction.commit() Modified: trunk/Products/ZenUtils/zenpack.py =================================================================== --- trunk/Products/ZenUtils/zenpack.py 2008-04-21 05:31:22 UTC (rev 9049) +++ trunk/Products/ZenUtils/zenpack.py 2008-04-21 06:12:00 UTC (rev 9050) @@ -28,7 +28,8 @@ def RemoveZenPack(dmd, packName, log=None, - skipDepsCheck=False, leaveObjects=True): + skipDepsCheck=False, leaveObjects=True, + deleteFiles=True): if log: log.debug('Removing Pack "%s"' % packName) if not skipDepsCheck: @@ -49,12 +50,13 @@ zp.remove(dmd, leaveObjects=True) dmd.ZenPackManager.packs._delObject(packName) root = zenPath('Products', packName) - if log: - log.debug('Removing %s' % root) - recurse = "" - if os.path.isdir(root): - recurse = "r" - os.system('rm -%sf %s' % (recurse, root)) + if deleteFiles: + if log: + log.debug('Removing %s' % root) + recurse = "" + if os.path.isdir(root): + recurse = "r" + os.system('rm -%sf %s' % (recurse, root)) cleanupSkins(dmd) return True |
From: <sv...@ze...> - 2008-04-21 05:31:18
|
Author: jstevens Date: 2008-04-21 01:31:22 -0400 (Mon, 21 Apr 2008) New Revision: 9049 Modified: trunk/Products/ZenUtils/ZenPackCmd.py Log: refs #2994 Modified: trunk/Products/ZenUtils/ZenPackCmd.py =================================================================== --- trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-21 04:36:13 UTC (rev 9048) +++ trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-21 05:31:22 UTC (rev 9049) @@ -303,6 +303,7 @@ Given an installed dist, install it into Zenoss as a ZenPack. Return the ZenPack instance. """ + from Products.ZenRelations.Exceptions import ObjectNotFound # Instantiate ZenPack entryMap = pkg_resources.get_entry_map(dist, ZENPACK_ENTRY_POINT) if not entryMap or len(entryMap) > 1: @@ -334,7 +335,10 @@ if existing: for p in existing.packables(): packables.append(p) - existing.packables.removeRelation(p) + try: + existing.packables.removeRelation(p) + except ObjectNotFound: + pass if existing.isEggPack(): forceNoFileDeletion = existing.eggPath() == dist.location RemoveZenPack(dmd, existing.id, |
From: <sv...@ze...> - 2008-04-21 04:37:13
|
Author: jstevens Date: 2008-04-21 00:36:13 -0400 (Mon, 21 Apr 2008) New Revision: 9048 Modified: trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/ZenPacks/zenoss/MySqlMonitor/migrate/RenamePasswordProperty.py Log: refs #2883 Modified: trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/ZenPacks/zenoss/MySqlMonitor/migrate/RenamePasswordProperty.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/ZenPacks/zenoss/MySqlMonitor/migrate/RenamePasswordProperty.py 2008-04-21 04:34:16 UTC (rev 9047) +++ trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/ZenPacks/zenoss/MySqlMonitor/migrate/RenamePasswordProperty.py 2008-04-21 04:36:13 UTC (rev 9048) @@ -13,8 +13,6 @@ import Globals from Products.ZenModel.migrate.Migrate import Version -from Products.MySqlMonitor.datasources.MySqlMonitorDataSource \ - import MySqlMonitorDataSource class RenamePasswordProperty: """ @@ -31,6 +29,9 @@ def migrate(self, pack): dmd = pack.__primary_parent__.__primary_parent__ + from Products.MySqlMonitor.datasources.MySqlMonitorDataSource \ + import MySqlMonitorDataSource + # Update existing templates that use the MySqlMonitorDataSource to use # the new zProperty names for template in dmd.Devices.getAllRRDTemplates(): |
From: <sv...@ze...> - 2008-04-21 04:35:11
|
Author: jstevens Date: 2008-04-21 00:34:16 -0400 (Mon, 21 Apr 2008) New Revision: 9047 Modified: trunk/Products/ZenUtils/ZenPackCmd.py Log: fixes #2986 Modified: trunk/Products/ZenUtils/ZenPackCmd.py =================================================================== --- trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-21 00:05:31 UTC (rev 9046) +++ trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-21 04:34:16 UTC (rev 9047) @@ -222,9 +222,11 @@ dmd.ZenPackManager.packs, and runs the zenpacks's install method. Returns a list of ZenPacks that were installed. """ + zenPacks = [] try: - zenPackName = InstallEgg(dmd, eggPath, link=link) - zenPacks = DiscoverAndInstall(dmd, zenPackName) + zpDists = InstallEgg(dmd, eggPath, link=link) + for d in zpDists: + zenPacks.append(InstallDistAsZenPack(dmd, d, filesOnly=filesOnly)) except: if sendEvent: ZPEvent(dmd, 4, 'Error installing ZenPack %s' % eggPath, @@ -232,10 +234,10 @@ raise if sendEvent: zenPackIds = [zp.id for zp in zenPacks] - if zenPackName in zenPackIds: + if zenPackIds: ZPEvent(dmd, 2, 'Installed ZenPacks %s' % ','.join(zenPackIds)) else: - ZPEvent(dmd, 4, 'Unable to install ZenPack %s' % zenPackName) + ZPEvent(dmd, 4, 'Unable to install %s' % eggPath) return zenPacks @@ -243,16 +245,12 @@ """ Install the given egg and add to the current working set. This does not install the egg as a ZenPack. + Return a list of distributions that should be installed as ZenPacks. """ eggPath = os.path.abspath(eggPath) zenPackDir = zenPath('ZenPacks') eggInZenPacksDir = eggPath.startswith(zenPackDir + '/') - - # On upgrade, if location is switching, we should delete the old - # location zenpack.deleteFilesOnRemove(). This way people could move - # zenpacks in development out of ZenPacks dir with a simple reinstall - # from another location. - + # Make sure $ZENHOME/ZenPacks exists CreateZenPacksDir() @@ -270,25 +268,36 @@ errors = p.stderr.read() if errors: sys.stderr.write('%s\n' % errors) + zpDists = AddDistToWorkingSet(eggPath) else: - cmd = 'easy_install --always-unzip --site-dirs=%s -d %s %s' % ( - zenPackDir, - zenPackDir, - eggPath) - p = subprocess.Popen(cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - shell=True) - p.wait() - eggName = os.path.split(eggPath)[1] - eggPath = os.path.join(zenPackDir, eggName) + zpDists = DoEasyInstall(eggPath) + # cmd = 'easy_install --always-unzip --site-dirs=%s -d %s %s' % ( + # zenPackDir, + # zenPackDir, + # eggPath) + # p = subprocess.Popen(cmd, + # stdout=subprocess.PIPE, + # stderr=subprocess.PIPE, + # shell=True) + # p.wait() + # eggName = os.path.split(eggPath)[1] + # eggPath = os.path.join(zenPackDir, eggName) - # Add egg to working_set - zenPackName = AddDistToWorkingSet(eggPath) + return zpDists - return zenPackName +# def GetZenPackNamesFromEggPath(eggPath): +# """ +# Given a path to a ZenPack egg (installed or not) return the +# name of the ZenPack it contains. +# """ +# zpNames = [] +# for d in pkg_resources.find_distributions(eggPath) +# if d.project_name.startswith('ZenPacks.'): +# zpNames.append(d.project_name) +# return zpNames + def InstallDistAsZenPack(dmd, dist, filesOnly=False): """ Given an installed dist, install it into Zenoss as a ZenPack. @@ -327,8 +336,11 @@ packables.append(p) existing.packables.removeRelation(p) if existing.isEggPack(): + forceNoFileDeletion = existing.eggPath() == dist.location RemoveZenPack(dmd, existing.id, - skipDepsCheck=False, leaveObjects=True) + skipDepsCheck=False, leaveObjects=True, + forceNoFileDeletion=forceNoFileDeletion, + uninstallEgg=False) else: oldzenpack.RemoveZenPack(dmd, existing.id, skipDepsCheck=False, leaveObjects=True) @@ -344,7 +356,7 @@ return zenPack -def DiscoverAndInstall(dmd, zenPackId): +def DiscoverAndInstall(dmd, zpNames): """ Discover installed eggs that provide zenoss.zenpacks entry points. Install into Zenoss those that aren't already. @@ -427,17 +439,16 @@ Given the path to a dist (an egg) add it to the current working set. This is basically a pkg_resources-friendly way of adding it to sys.path. - If the dist was added successfully then return the name of the - dist project, otherwise return None + Return a list of all distributions on distPath that appear to + be ZenPacks. """ - distGen = pkg_resources.find_distributions(distPath) - try: - dist = distGen.next() - except StopIteration: - return None - pkg_resources.working_set.add(dist) - pkg_resources.require(dist.project_name) - return dist.project_name + zpDists = [] + for d in pkg_resources.find_distributions(distPath): + pkg_resources.working_set.add(d) + pkg_resources.require(d.project_name) + if d.project_name.startswith('ZenPacks.'): + zpDists.append(d) + return zpDists def ReadZenPackInfo(dist): @@ -490,6 +501,51 @@ os.mkdir(zpDir, 0750) +def DoEasyInstall(eggPath): + """ + Use easy_install to install an egg from the filesystem. + easy_install will install the egg, but does not install it into + Zenoss as ZenPacks. + Returns a list of distributions that were installed that appear + to be ZenPacks. + """ + from setuptools.command import easy_install + + # Make sure $ZENHOME/ZenPacks exists + CreateZenPacksDir() + + # Create temp file for easy_install to write results to + _, tempPath = tempfile.mkstemp(prefix='zenpackcmd-easyinstall') + # eggPaths is a set of paths to eggs that were installed. We need to + # add them to the current workingset so we can discover their + # entry points. + eggPaths = set() + try: + # Execute the easy_install + args = ['--site-dirs', zenPath('ZenPacks'), + '-d', zenPath('ZenPacks'), + # '-i', ZEN_PACK_INDEX_URL, + '--record', tempPath, + '--quiet', + eggPath] + easy_install.main(args) + # Collect the paths for eggs that were installed + f = open(tempPath, 'r') + marker = '.egg/' + markerOffset = len(marker)-1 + for l in f.readlines(): + i = l.find(marker) + if i > 0: + eggPaths.add(l[:i+markerOffset]) + finally: + os.remove(tempPath) + # Add any installed eggs to the current working set + zpDists = [] + for path in eggPaths: + zpDists += AddDistToWorkingSet(path) + return zpDists + + ######################################## # Zenoss.Net ######################################## @@ -500,9 +556,11 @@ Fetch the named zenpack and all its dependencies and install them. Return a list of the ZenPacks that were installed. """ + zenPacks = [] try: - FetchZenPack(zenPackName, zenPackVersion) - zenPacks = DiscoverAndInstall(dmd, zenPackName) + zpDists = FetchZenPack(zenPackName, zenPackVersion) + for d in zpDists: + zenPacks.append(InstallDistAsZenPack(dmd, d)) except: if sendEvent: ZPEvent(dmd, 4, 'Failed to install ZenPack %s' % zenPackName, @@ -522,8 +580,11 @@ Use easy_install to retrieve the given zenpack and any dependencies. easy_install will install the eggs, but does not install them into Zenoss as ZenPacks. - Return list of project_names of installed distributions. These are - probably all ZenPacks, but possibly not. + Return a list of distributions just installed that appear to be + ZenPacks. + + NB: This should be refactored. It shares most of its code with + DoEasyInstall() """ from setuptools.command import easy_install @@ -556,11 +617,10 @@ finally: os.remove(tempPath) # Add any installed eggs to the current working set - distProjectNames = [] + zpDists = [] for path in eggPaths: - projectName = AddDistToWorkingSet(path) - distProjectNames.append(projectName) - return distProjectNames + zpDists += AddDistToWorkingSet(path) + return zpDists def UploadZenPack(dmd, packName, project, description, znetUser, znetPass): @@ -607,7 +667,8 @@ def RemoveZenPack(dmd, packName, filesOnly=False, skipDepsCheck=False, - leaveObjects=False, sendEvent=True): + leaveObjects=False, sendEvent=True, + forceNoFileDeletion=False, uninstallEgg=True): """ Remove the given ZenPack from Zenoss. Whether the ZenPack will be removed from the filesystem or not @@ -634,6 +695,7 @@ packName) zp.remove(dmd, leaveObjects) dmd.ZenPackManager.packs._delObject(packName) + transaction.commit() # Uninstall the egg and possibly delete it # If we can't find the distribution then apparently the zp egg itself is @@ -647,35 +709,38 @@ # Determine deleteFiles before develop -u gets called. Once # it is called the egg has problems figuring out some of it's state. deleteFiles = zp.shouldDeleteFilesOnRemoval() - if zp.isDevelopment(): - zenPackDir = zenPath('ZenPacks') - cmd = ('python setup.py develop -u ' - '--site-dirs=%s ' % zenPackDir + - '-d %s' % zenPackDir) - p = subprocess.Popen(cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - shell=True, - cwd=zp.eggPath()) - p.wait() - errors = p.stderr.read() - if errors: - raise ZenPackException(errors) - else: - # Do we need to call easy_install -m here? It causes problems - # because it tries to install deps. However, we might be leaving - # around lines in easy-install.pth otherwise. - pass - if deleteFiles: + if uninstallEgg: + if zp.isDevelopment(): + zenPackDir = zenPath('ZenPacks') + cmd = ('python setup.py develop -u ' + '--site-dirs=%s ' % zenPackDir + + '-d %s' % zenPackDir) + p = subprocess.Popen(cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=True, + cwd=zp.eggPath()) + p.wait() + errors = p.stderr.read() + if errors: + raise ZenPackException(errors) + else: + DoEasyUninstall(packName) + # elif cleanupEasyInstallPth: + # # Do we need to call easy_install -m here? It causes problems + # # because it tries to install deps. Cleanup easy-install.pth + # # ourselves instead. + # # We don't want to cleanup easy-install.pth when a newer + # # version of the egg has already been installed (when doing + # # an upgrade or installing in new location.) + # eggLink = './%s' % zp.eggName() + # CleanupEasyInstallPth(eggLink) + if deleteFiles and not forceNoFileDeletion: eggDir = zp.eggPath() if os.path.islink(eggDir): os.remove(eggDir) else: shutil.rmtree(eggDir) - # Looks like maybe this is not needed. at least some of the - # time the easy-install.pth file is removed by setuptools - # eggLink = './%s' % zp.eggName() - #CleanupEasyInstallPth(eggLink) cleanupSkins(dmd) transaction.commit() except: @@ -687,6 +752,24 @@ ZPEvent(dmd, 2, 'Removed ZenPack %s' % packName) +def DoEasyUninstall(name): + """ + Execute the easy_install command to unlink the given egg. + What this is really doing is switching the egg to be in + multiple-version mode, however this is the first step in deleting + an egg as described here: + http://peak.telecommunity.com/DevCenter/EasyInstall#uninstalling-packages + """ + from setuptools.command import easy_install + args = ['--site-dirs', zenPath('ZenPacks'), + '-d', zenPath('ZenPacks'), + #'--record', tempPath, + '--quiet', + '-m', + name] + easy_install.main(args) + + def CanRemoveZenPacks(dmd, packNames): """ Returns a tuple of (canRemove, otherDependents) @@ -702,15 +785,30 @@ return (not unhappy and True or False, list(unhappy)) -def CleanupEasyInstallPth(eggLink): - # Remove the path from easy-install.pth - easyPth = zenPath('ZenPacks', 'easy-install.pth') - f = open(easyPth, 'r') - newLines = [l for l in f if l.strip() != eggLink] - f.close() - f = open(easyPth, 'w') - f.writelines(newLines) - f.close() +# def CleanupEasyInstallPth(eggLink): +# """ +# Remove the entry for the given egg from the +# $ZENHOME/ZenPacks/easy-install.pth file. If this entry is left +# in place in can cause problems during the next install of the same +# egg. +# """ +# # Remove the path from easy-install.pth +# eggTail = os.path.split(eggLink)[1] +# easyPth = zenPath('ZenPacks', 'easy-install.pth') +# if os.path.isfile(easyPth): +# needToWrite = False +# newLines = [] +# f = open(easyPth, 'r') +# for line in f: +# if os.path.split(line.strip())[1] == eggTail: +# needToWrite = True +# else: +# newLines.append(line) +# f.close() +# if needToWrite: +# f = open(easyPth, 'w') +# f.writelines(newLines) +# f.close() def GetDependents(dmd, packName): |
From: <sv...@ze...> - 2008-04-21 00:05:24
|
Author: cluther Date: 2008-04-20 20:05:31 -0400 (Sun, 20 Apr 2008) New Revision: 9046 Added: sandboxen/cluther/trunk/ Log: making copy of trunk Copied: sandboxen/cluther/trunk (from rev 9045, trunk) |
From: <sv...@ze...> - 2008-04-21 00:04:14
|
Author: cluther Date: 2008-04-20 20:04:20 -0400 (Sun, 20 Apr 2008) New Revision: 9045 Added: sandboxen/cluther/ Log: adding a sandbox for cluther |
From: <sv...@ze...> - 2008-04-19 00:54:27
|
Author: sjakesch Date: 2008-04-18 20:54:33 -0400 (Fri, 18 Apr 2008) New Revision: 9044 Modified: trunk/Products/ZenModel/Commandable.py Log: adding better newline handling after ticket #2797 was closed by r9001 Modified: trunk/Products/ZenModel/Commandable.py =================================================================== --- trunk/Products/ZenModel/Commandable.py 2008-04-18 21:41:51 UTC (rev 9043) +++ trunk/Products/ZenModel/Commandable.py 2008-04-19 00:54:33 UTC (rev 9044) @@ -261,8 +261,14 @@ ''' # Looks like firefox renders progressive output more smoothly # if each line is stuck into a table row. + + # I doubt the above statement, as tested on Firefox 3 + # this only generates a larger DOM object and does nothing + # for smoothness. It actually slows things down for large command + # output. Should maybe retested especially now that we are + # using CSS pre startLine = '<tr><td class="commandoutput">' - endLine = '</td></tr>\n' + endLine = '\n</td></tr>\n' if out: if not isinstance(lines, list): lines = [lines] @@ -273,5 +279,7 @@ l = cgi.escape(l) l = l.replace('\n', endLine + startLine) out.write(startLine + l + endLine) + + InitializeClass(Commandable) |
From: <sv...@ze...> - 2008-04-18 21:41:45
|
Author: sjakesch Date: 2008-04-18 17:41:51 -0400 (Fri, 18 Apr 2008) New Revision: 9043 Modified: trunk/Products/ZenModel/UserSettings.py Log: add a comment related to r8994 and #2957 Modified: trunk/Products/ZenModel/UserSettings.py =================================================================== --- trunk/Products/ZenModel/UserSettings.py 2008-04-18 18:21:07 UTC (rev 9042) +++ trunk/Products/ZenModel/UserSettings.py 2008-04-18 21:41:51 UTC (rev 9043) @@ -488,6 +488,7 @@ }, {'name' : 'Event Views', 'action' : 'editEventViews', + # ideally make this its own permission 'permissions' : (ZEN_CHANGE_SETTINGS,), }, {'name' : 'Alerting Rules', |
From: <sv...@ze...> - 2008-04-18 18:21:06
|
Author: ian Date: 2008-04-18 14:21:07 -0400 (Fri, 18 Apr 2008) New Revision: 9042 Added: trunk/Products/ZenModel/tests/testRRDTemplates.py Log: * Fixes #2984: Tests for new template catalog Added: trunk/Products/ZenModel/tests/testRRDTemplates.py |
From: <sv...@ze...> - 2008-04-18 18:05:53
|
Author: jstevens Date: 2008-04-18 14:05:53 -0400 (Fri, 18 Apr 2008) New Revision: 9041 Modified: trunk/Products/ZenModel/ZenPack.py trunk/Products/ZenUtils/EggifyZenPack.py trunk/Products/ZenUtils/ZenPackCmd.py Log: * Improved support for upgrading from non-egg zenpacks Modified: trunk/Products/ZenModel/ZenPack.py =================================================================== --- trunk/Products/ZenModel/ZenPack.py 2008-04-18 18:05:24 UTC (rev 9040) +++ trunk/Products/ZenModel/ZenPack.py 2008-04-18 18:05:53 UTC (rev 9041) @@ -677,6 +677,7 @@ PACKAGES = packages, INSTALL_REQUIRES = [], COMPAT_ZENOSS_VERS = self.compatZenossVers, + PREV_ZENPACK_NAME = self.prevZenPackName, ) ZenPackCmd.WriteSetup(self.eggPath('setup.py'), attrs) Modified: trunk/Products/ZenUtils/EggifyZenPack.py =================================================================== --- trunk/Products/ZenUtils/EggifyZenPack.py 2008-04-18 18:05:24 UTC (rev 9040) +++ trunk/Products/ZenUtils/EggifyZenPack.py 2008-04-18 18:05:53 UTC (rev 9041) @@ -43,7 +43,7 @@ self.connect() # Create new zenpack - eggDir = ZenPackCmd.CreateZenPack(newId) + eggDir = ZenPackCmd.CreateZenPack(newId, prevZenPackName=zpName) # Copy old one into new one parts = newId.split('.') Modified: trunk/Products/ZenUtils/ZenPackCmd.py =================================================================== --- trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-18 18:05:24 UTC (rev 9040) +++ trunk/Products/ZenUtils/ZenPackCmd.py 2008-04-18 18:05:53 UTC (rev 9041) @@ -45,13 +45,14 @@ # ZenPack Creation ######################################## -def CreateZenPack(zpId): +def CreateZenPack(zpId, prevZenPackName=''): """ Create the zenpack in the filesystem. The zenpack is not installed in Zenoss, it is simply created in the $ZENHOME/ZenPacks directory. Usually this should be followed with a "zenpack install" call. zpId should already be valid, scrubbed value. + prevZenPackName is written to PREV_ZENPACK_NAME in setup.py. """ parts = zpId.split('.') @@ -77,6 +78,7 @@ PACKAGES = packages, INSTALL_REQUIRES = [], COMPAT_ZENOSS_VERS = '', + PREV_ZENPACK_NAME = prevZenPackName, ) WriteSetup(os.path.join(destDir, 'setup.py'), mapping) @@ -665,13 +667,14 @@ # around lines in easy-install.pth otherwise. pass if deleteFiles: - eggLink = './%s' % zp.eggName() - if os.path.islink(eggLink): - os.remove(eggLink) + eggDir = zp.eggPath() + if os.path.islink(eggDir): + os.remove(eggDir) else: - shutil.rmtree(eggLink) + shutil.rmtree(eggDir) # Looks like maybe this is not needed. at least some of the # time the easy-install.pth file is removed by setuptools + # eggLink = './%s' % zp.eggName() #CleanupEasyInstallPth(eggLink) cleanupSkins(dmd) transaction.commit() |
From: <sv...@ze...> - 2008-04-18 18:05:32
|
Author: jstevens Date: 2008-04-18 14:05:24 -0400 (Fri, 18 Apr 2008) New Revision: 9040 Modified: trunk/Products/ZenUtils/Skins.py Log: registerSkins copes better with empty skins directories Modified: trunk/Products/ZenUtils/Skins.py =================================================================== --- trunk/Products/ZenUtils/Skins.py 2008-04-18 18:03:53 UTC (rev 9039) +++ trunk/Products/ZenUtils/Skins.py 2008-04-18 18:05:24 UTC (rev 9040) @@ -25,9 +25,10 @@ if not d.startswith('.'): layers.append(d) # stop at one level - return layers - + break + return layers + def registerSkin(self, base, positionAfter='custom'): """setup the skins in a product""" layers = skinDirs(base) |
From: <sv...@ze...> - 2008-04-18 18:03:52
|
Author: ian Date: 2008-04-18 14:03:53 -0400 (Fri, 18 Apr 2008) New Revision: 9039 Modified: trunk/Products/ZenModel/RRDTemplate.py Log: * Fixed small potential bug resulting from gotcha in YieldAllRRDTemplates code Modified: trunk/Products/ZenModel/RRDTemplate.py =================================================================== --- trunk/Products/ZenModel/RRDTemplate.py 2008-04-18 18:03:31 UTC (rev 9038) +++ trunk/Products/ZenModel/RRDTemplate.py 2008-04-18 18:03:53 UTC (rev 9039) @@ -65,7 +65,7 @@ The searchRRDTemplates catalog was added in 2.2 """ zcat = getattr(root, RRDTEMPLATE_CATALOG, None) - if zcat: + if zcat is not None: criteria = criteria or {} criteria.setdefault('getPhysicalPath', root.getPrimaryId()) brains = zcat(criteria) |
From: <sv...@ze...> - 2008-04-18 18:03:27
|
Author: jstevens Date: 2008-04-18 14:03:31 -0400 (Fri, 18 Apr 2008) New Revision: 9038 Modified: trunk/Products/ZenModel/ZenPackPersistence.py Log: * Added getZenPack() convenience method Modified: trunk/Products/ZenModel/ZenPackPersistence.py =================================================================== --- trunk/Products/ZenModel/ZenPackPersistence.py 2008-04-18 17:59:22 UTC (rev 9037) +++ trunk/Products/ZenModel/ZenPackPersistence.py 2008-04-18 18:03:31 UTC (rev 9038) @@ -87,6 +87,13 @@ return self.ZENPACKID + def getZenPack(self, context): + """ + Return the ZenPack instance that provides this object. + """ + return context.dmd.ZenPackManager.packs._getOb(self.ZENPACK_ID, None) + + # index_object and unindex_object are overridden so that instances # can participate in other catalogs, not just the # ZENPACK_PERSISTENCE_CATALOG. |