I've been creating an extra tab in a ZenPack for a certain device class using
the following entry in the objects.xml for the zenMenuItem (along with other
files, e.g: the .pt template) which has been working fine:
Code:
<!-- ('', 'zport', 'dmd', 'zenMenus', 'More', 'zenMenuItems', 'xHostDetail') -->
<object id='/zport/dmd/zenMenus/More/zenMenuItems/xHostDetail'
module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'>
<property type="text" id="description" mode="w" >
X
</property>
<property type="text" id="action" mode="w" >
xHostDetail
</property>
<property type="boolean" id="isglobal" mode="w" >
True
</property>
<property type="lines" id="permissions" mode="w" >
('View',)
</property>
<property type="boolean" id="isdialog" mode="w" >
False
</property>
<property type="float" id="ordering" mode="w" >
5.0
</property>
</object>
I'm now trying to add a second tab to the ZenPack by duplicating that code
section in objects.xml for yHost (and duplicating all the other appropriate
files), however, when I load the Zenpack and view the Zenpacks "Provides" list,
I see only 1 entry for xHost (/zenMenus/More/zenMenuItems/xHostDetail) - there
is no entry for the yHost... however, both tabs are visible for hosts added to
each device class.
However, both menu items appear to be created in dmd:
Code:
>>> for i in dmd.zenMenus.More.zenMenuItems._objects:
... print i
...
<SNIP>
xHostDetail
<SNIP>
yHostDetail
<SNIP>
I've done an egrep -R "xHost | yHost" on the zenpack to confirm there are
obvious no errors.
Am I adding the second tab to the objects.xml file incorrectly? Perhaps there
should there be a "tomanycont" - although I'm not sure where this would be
related to as there is no new object above the 2 menu items.
Or is this a bug? The fact that the two menuItems are created but only 1 is
linked to the Zenpack it was created from seems a bit odd.
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=23893#23893
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users