Dan Kenigsberg has posted comments on this change. Change subject: netinfo: optimize ipaddr retrieval ......................................................................
Patch Set 3: (2 comments) http://gerrit.ovirt.org/#/c/23518/3/lib/vdsm/netinfo.py File lib/vdsm/netinfo.py: Line 297: Line 298: def prefix2netmask(prefix): Line 299: if not 0 <= prefix <= 32: Line 300: raise ValueError('%s is not a valid prefix value. It must be between ' Line 301: '0 and 32' % prefix) correct - but unrelated. Line 302: return socket.inet_ntoa( Line 303: struct.pack("!I", int('1' * prefix + '0' * (32 - prefix), 2))) Line 304: Line 305: Line 637: gateways = getRoutes() Line 638: ipv6routes = getIPv6Routes() Line 639: paddr = permAddr() Line 640: dhcp4 = getDhclientIfaces(_DHCLIENT_LEASES_GLOBS) Line 641: ipAddrs = _getIpAddrs() maybe keeping the naming convention of the other caches above ("ipaddrs") would make this a bit more streamlined. Line 642: Line 643: for net, netAttr in networks().iteritems(): Line 644: try: Line 645: d['networks'][net] = _getNetInfo(netAttr.get('iface', net), -- To view, visit http://gerrit.ovirt.org/23518 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I571529f6dd379ffb317625fd9e2abd6b5ae88696 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Ondřej Svoboda <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
