Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

3.6 Development Mode

VERSION 1 
Created on: Oct 28, 2010 1:58 PM by Zenoss API - Last Modified:  Oct 28, 2010 1:58 PM by Zenoss API

 6. Development Mode

New ZenPacks can be created in  Zenoss by navigating to Advanced > Settings > ZenPacks and selecting Create a ZenPack from the Action menu. This creates the ZenPack on the file system at $ZENHOME/ZenPacks/ZenPacks.community.YourZenPack and installs it into  Zenoss. You may then proceed to add device classes, templates, and MIBs to the ZenPack. (This is known as "development mode" for the ZenPack.) Once you are happy with your ZenPack, you can export it for others to use. However, once you install a freshly exported .egg ZenPack on another system (or uninstall and re-install your new ZenPack) you can no longer add things to the ZenPack.

 6.1. Source ZenPacks

If you have the source for the ZenPack available you can simply attach to the source tree. Assuming that the source directory is ZenPacks.community.YourZenPack, install the ZenPack with the following commands:

zenpack --link --install ZenPacks.community.YourZenPack
zopectl restart

Your ZenPack should now be usable and back in development mode. Changes made to the ZenPack will be persisted back to the source tree, you may still export and download as necessary. When you are satisfied with your changes, you may commit them back to the Subversion repository.

 6.2. Converting .egg Files to Development Mode

If you wish to convert an already installed ZenPack, or to install and convert an .egg ZenPack, follow these steps.

  1. Install the .egg as you would normally.

  2. Restart Zope with the command:

    zopectl restart
  3. Copy the ZenPack development files into the .egg's directory (the CONTENTS directory is unnecessary):

    cp $ZENHOME/Products/ZenModel/ZenPackTemplate/* \
    $ZENHOME/ZenPacks/ZenPacks.community.YourZenPack-1.0.2-py2.4.egg/
  4. You can now make any modifications to the ZenPack, such as updating the version number or adding new device classes.

  5. Go into the ZenPack (from Advanced > Settings, select ZenPack from the left panel, and then click the ZenPack).

  6. Export the ZenPack (select Export ZenPack from the Action menu). The changes will be persisted to the new .egg and the file system.

Note

There is a minor bug in the export and download functions. The new version saved in the export directory will have the correct name with all the updates (for example, ZenPacks.community.YourZenPack-1.0.3-py2.4.egg). If you choose to export and download the ZenPack, it will have the original name despite the updated version (for example, ZenPacks.community.YourZenPack-1.0.2-py2.4.egg) or it may fail to download. Use the version in the export directory.

Comments (0)