TECHZEN Zenoss User Community ARCHIVE  

SDK : template binding, modeler plugins and properties not set at installation

Subject: SDK : template binding, modeler plugins and properties not set at installation
Author: Charles Bueche
Posted: 2017-03-22 04:47

Not sure if these forums are still the correct place to ask for Zenoss SDK help.

I have developed a Zenpack for Efficient-IP DDI appliances using the SDK (2.0.x). During zenpack installation no error are shown, but after the installation, the templates are not bound to the device class, the properties not set, the modeler plugin list not applied. If I do all these steps manually, the zenpack works as expected. See here for the details, help welcome !

https://github.com/zenoss/ZenPacks.zenoss.ZenPackLib/issues/443

Thanks !
Charles



Subject: RE: SDK : template binding, modeler plugins and properties not set at installation
Author: Patrick McMahon
Posted: 2017-05-30 16:43

Sounds like you are encountering an intentional behavior change. Beginning with ZenPackLib 2.0 zProperties will no longer be overwritten if a target device class already exists (i.e. during an upgrade or if the YAML affects a preexisting class such as /Devices/Server. Instead, a warning will be displayed to the user during installation, and the target zProperty will be left alone. (Found at bottom of yaml zProperties documentation https://zenpack-sdk.zenoss.com/en/latest/yaml-zProperties.html)

This can trip you up while iteratively developing a zenpack e.g. add something to yaml, install zenpack, test, repeat. Since it is isolated to you (i assume), manual adding is a quick and dirty workaround.

For a final release of your zenpack (may NOT be necessary on first version released as there should be no pre-existing properties), look into writing some migration code http://zenpackers.readthedocs.io/en/latest/migration.html

------------------------------
Patrick McMahon
Sr. Client Services Engineer
Zenoss
------------------------------


< Previous
zenoss 5 docker installation overview
  Next
Zenoss 4.2.5 Command Modeler plugin problems
>