On 5/11/07, David Carmean <[EMAIL PROTECTED]> wrote:

How do I change a boolean property?  e.g. zWmiMonitorIgnore ?  Is the following
correct/safe?

    setattr(dr, 'zWmiMonitorIgnore', True)

And for string objects:

    setattr(dr, 'zCommandPath', '/opt/zenoss/libexec')

David,

zProperties are a bit trickier due to their hierarchical nature.
Something like this would be a better way to do it:

if dr.hasProperty('zWmiMonitorIgnore'):
   dr.zWmiMonitorIgnore = True
else:
   dr._setProperty('zWmiMonitorIgnore', True, type='boolean')

dr could be a device or a device class.

--
Chet Luther
[EMAIL PROTECTED]
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to