TECHZEN Zenoss User Community ARCHIVE  

How to add fields to the main /Devices class?

Subject: How to add fields to the main /Devices class?
Author: [Not Specified]
Posted: 2016-06-24 09:39

I have been successful at adding fields to a Device Class I created, but I have some functionnality I want to add at the root /Devices class.

In my tests, I've created a file named at the root of my ZenPack with the following entry:

= None

_properties = Device._properties + (

{'id': '', 'type': 'int'},


How do I do the same for the main /Devices class


Subject: Are these zProperties that
Author: Jane Curry
Posted: 2016-07-07 09:33

Are these zProperties that you want to create or some other attribute you want to make available to all devices

If zProperties, then you can add them simply in the in the base directory of your ZenPack. Have a look at the sample in The lines are commented out but are perfectly good.

If you want a new attribute on all devices, then have a look at the device branch of the same ZenPack - . Examples there monkey patch versionTag and versionDate attributes on to Device.



Email:    Web:

< Previous
Help for a new user
ZenPack Developers' Guide - input on chapter 3 please