Though some advanced screwing up while trying to develop a zenpack, I seem to
have "lost" the ability to change zDeviceTemplates on one particular device
class. Whether through the zenoss UI, ZMI, or zendmd, I get this error:
zExceptions.BadRequest: Id zDeviceTemplates is invalid or duplicate
Some useful zendmd output:
>>> dmd.Devices.hasProperty('zDeviceTemplates')
1
>>> dmd.Devices.Server.hasProperty('zDeviceTemplates')
0
>>> dmd.Devices.Server.Linux.hasProperty('zDeviceTemplates')
0
And yet, each device class *does* somehow have values for this property (which
are also displayed in the web UI):
>>> dmd.Devices.zDeviceTemplates
['Device']
>>> dmd.Devices.Server.zDeviceTemplates
['xUCDlaLoadInt5', 'xSysUpTime']
>>> dmd.Devices.Server.Linux.zDeviceTemplates
['xUCDlaLoadInt5', 'xUCDssCpuBasic', 'xUCDmemoryBasic', 'xSysUpTime',
'xNPcheck_ntp']
But attempting to remove the property gives "does not exist":
>>> dmd.Devices.Server.Linux.removeZDeviceTemplates()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/opt/zenoss/Products/ZenModel/DeviceClass.py", line 539, in
removeZDeviceTemplates
self.deleteZenProperty('zDeviceTemplates')
File "/opt/zenoss/Products/ZenRelations/ZenPropertyManager.py", line 242, in
deleteZenProperty
self._delProperty(propname)
File "opt/zenoss/lib/python/OFS/PropertyManager.py", line 215, in _delProperty
ValueError: The property zDeviceTemplates does not exist
Hmm... taking a shot in the dark, I tried to reindex(). Got this exception:
File "opt/zenoss/lib/python/Products/PageTemplates/Expressions.py", line 334,
in restrictedTraverse
AttributeError: 'int' object has no attribute 'lower'
Nope, the reindex/commit didn't fix it.
To which dimension have my zDeviceTemplates properties gone??
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=32614#32614
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users