This document describes all requirements and recommendations for ZenPack development. The intended audience is all Zenoss, Inc. employees who create or modify ZenPacks including engineering, services and support. The intended audience also includes any third-parties that create or modify ZenPacks that are delivered to Zenoss customers by Zenoss, Inc.
- Some assumptions are made in this document regarding access to test facilities.
- ZenPacks must always be developed with the understanding that the potential exists for them to become part of the product. Even in cases were ownership of the ZenPack does not rest with Zenoss this must be observed because ownership can change in the future. For this reason, special attention must be paid to document the inclusion of any sensitive company data in ZenPacks.
Access to Test Environment
- In cases where the ZenPack developer(s) do not have access to endpoints necessary for integration and testing work some standard operating procedures must be suspended.
- The location of specific files within a ZenPack’s directory structure is technically mandated in some circumstances, and open to the developer’s desires in others. To make it easier for other developers to more easily get up to speed with the ZenPack in the future, the following recommendations for file locations should be used.
- configure.zcml All ZCML definitions related to defining browser views or wiring browser-only concerns. This configure.zcml should be included by the default configure.zcml in its parent directory.
- css/ - All stylesheets loaded by users’ browsers.
- img/ - All images loaded by users’ browsers.
- lib/ Any third-party modules included with the ZenPack should be located in this directory. In the case of pure-Python modules they can be located directly here. In the case of binary modules the build process must install them here. See the section of License Compliance below for more information on how to properly handle third-party content.
Any scripts intended to be run by the zencommand daemon must be located in this directory.
There should only ever be a single file called objects.xml in this directory. While the ZenPack installation code will load objects from any file in this directory with a .xml extension, the ZenPack export code will dump all objects back to objects.xml so creating other files only creates future confusion between installation and export.
All facades (classes implementing Products.Zuul.interfaces.IFacade) should be defined in this file. In ZenPacks where this single file becomes hard to maintain, a facades/ directory should be created containing individual files named for the group of facades they contain.
All info adapters (classes implementing Products.Zuul.interfaces.IInfo) should be defined in this file. In ZenPacks where this single file becomes hard to maintain, an info/ directory should be created containing individual files named for the group of info adapters they contain.
All interfaces (classes extending zope.interface.Interface) should be defined in this file. In ZenPacks where this single file becomes hard to maintain, an interfaces/ directory should be created containing individual files named for the group of interfaces they contain.
All routers (classes extending Products.ZenUtils.Ext.DirectRouter) should be defined in this file. In ZenPacks where this single file becomes hard to maintain, a routers/ directory should be created containing individual files named for the group of routers they contain.