Sorry for posting again, but there was a small mistake and I'm not sure how 
edits would be propogated to the mailing list.

I think specifying the subnet in the octet format
192.168.1.1/255.255.0.0
should work.

I am new to zenoss, but I believe the following patch should allow inputing in 
CIDR format (192.168.1.1/16), but only that format. Also I haven't tested with 
multiple addresses, but I think it should work.


Code:

--- IpInterface.orig.py 2008-10-14 11:33:03.000000000 +0100
+++ IpInterface.py      2008-10-14 11:35:05.000000000 +0100
@@ -274,10 +274,11 @@ class IpInterface(OSComponent):
                 # is a primary id /zport/dmd/Newtowrks... etc
                 # and we are looking for just the IP part
                 # we used the full id later when deleting the IPs
-                rawip = ipFromIpMask(ip)
+                rawip = ip.split("/")[0]
+                netmask = int(ip.split("/")[1])
                 ipmatch = filter(lambda x: x.find(rawip) > -1, ipids)
                 if not ipmatch:
-                    self.addIpAddress(ip)
+                    self.addIpAddress(rawip, netmask)
                 elif len(ipmatch) == 1:
                     ipids.remove(ipmatch[0])




This should be applied to Products/ZenModel/IpInterface.py and is for 2.2.4.




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

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

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



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

Reply via email to