wrote by chduncan:

Code:

i really need to query on a given ip, check to ensure that its the current 
managedip for that device and if so set a new mgmt ip

also the devices are not in dns

any ideas?




I guess this can get you started:


Code:

for d in dmd.Devices.getSubDevices(): <-- this refer to whole group
d.setManageIp()

commit()

Be aware that this will blank out the IP address for devices that
can't be resolved with DNS. You may want to do the following
afterwards to find any devices with a blank manageIp so that you can
get them added to DNS.

pprint([ d.id for d in dmd.Devices.getSubDevices() if d.manageIp ==
"" ]) 

Refer to Zenoss Dev Guide for example on looking for specific device.





I also noticed that the my dnsmassresetter.py scripts no longer working with 
zenoss 2.4. The error also is something that I never see before this (as shown 
below):


Code:

zen...@zenoss$ ./massdnsresetter.py 
Traceback (most recent call last):
  File "./massdnsresetter.py", line 17, in ?
    dmd.ZenEventManager.manage_ackEvents(evids)
  File "/usr/local/zenoss/Products/ZenEvents/EventManagerBase.py", line 1581, 
in manage_ackEvents
    self.manage_setEventStates(1 , evids, REQUEST=request)
  File "/usr/local/zenoss/Products/ZenEvents/EventManagerBase.py", line 1610, 
in manage_setEventStates
    messaging.IMessageSender(self).sendToBrowser(
  File "usr/local/zenoss/lib/python/zope/interface/interface.py", line 682, in 
__call__
TypeError: ('Could not adapt', <MySqlEventManager at 
/zport/dmd/ZenEventManager>, <InterfaceClass 
Products.ZenWidgets.interfaces.IMessageSender>)





Perhaps any Zen Master could enlighten me in this... Chet?




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=34704#34704

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
zenoss-users@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to