stevez
2012-03-16 14:20:55 UTC
stevez [http://community.zenoss.org/people/stevez] created the discussion
"Mass zLinks Script"
To view the discussion, visit: http://community.zenoss.org/message/65263#65263
--------------------------------------------------------------
I recently tied all of our firewalls to an external report through a script which updates zLinks on each firewall:
for d in dmd.Devices.Network.Firewall.getSubDevices():
   if d.location() != None:
       d.zLinks = "<a href=\" http://webserver/cgi-bin/Report_Generator.pl?site_id= http://webserver/cgi-bin/Report_Generator.pl?site_id="+d.location().id+"\">Site Report - "+d.location().id+"</a>"
       commit()
Unfortunately, this created a zLinks attribute on each device which is something Zenoss moved away from as documented here: http://community.zenoss.org/message/32001#32001#32001 http://community.zenoss.org/message/32001#32001
This script worked fine and the links work fine but I now get errors regarding the zLinks property not existing when trying to save configuration properties. This is because the attribute takes precedence over the property or something of the sort.
What I am trying to find out is what is the device function call that adds or edits and existing zLinks property in such a way. A quick look through zendmd shows numerous lists and maps regarding properties. Is there a nice clean overarching function like d.addProperty("zLinks","the link") which properly adds/manages all of these lists.
Does anyone else do a mass configuration of zLinks on thousands of devices?
Thanks!
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65263#65263]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"Mass zLinks Script"
To view the discussion, visit: http://community.zenoss.org/message/65263#65263
--------------------------------------------------------------
I recently tied all of our firewalls to an external report through a script which updates zLinks on each firewall:
for d in dmd.Devices.Network.Firewall.getSubDevices():
   if d.location() != None:
       d.zLinks = "<a href=\" http://webserver/cgi-bin/Report_Generator.pl?site_id= http://webserver/cgi-bin/Report_Generator.pl?site_id="+d.location().id+"\">Site Report - "+d.location().id+"</a>"
       commit()
Unfortunately, this created a zLinks attribute on each device which is something Zenoss moved away from as documented here: http://community.zenoss.org/message/32001#32001#32001 http://community.zenoss.org/message/32001#32001
This script worked fine and the links work fine but I now get errors regarding the zLinks property not existing when trying to save configuration properties. This is because the attribute takes precedence over the property or something of the sort.
What I am trying to find out is what is the device function call that adds or edits and existing zLinks property in such a way. A quick look through zendmd shows numerous lists and maps regarding properties. Is there a nice clean overarching function like d.addProperty("zLinks","the link") which properly adds/manages all of these lists.
Does anyone else do a mass configuration of zLinks on thousands of devices?
Thanks!
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65263#65263]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]