Looking at  $ZENHOME/Products/ZenModel/IpNetwork.py, it seems like the findIp 
function will raise the IpAddressConflict exception whenever it receives more 
than one object from an IP search.

This may not be the most elegant way of tracking down the culprit, but I 
believe it will print out an IP if it exists more than once underneath Networks.


Code:
#!/usr/bin/env python
import Globals
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
dmd = ZenScriptBase(connect=True).dmd

IpObjects = [ i for i in dmd.Networks.getSubObjects() if 
i.hasObject('interface') and i.objectIds() ]
IpAddresses = []
for each in IpObjects:
        IpAddresses.append(each.id)

for each in IpAddresses:
        Temp = IpAddresses.count(each)
        if Temp > 1:
                print each






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

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

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



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

Reply via email to