Assaf Muller has posted comments on this change. Change subject: Optimize netinfo.py:get() ......................................................................
Patch Set 2: (5 comments) .................................................... File lib/vdsm/ipwrapper.py Line 230: """Returns a list of Link objects for each link in the system.""" Line 231: return [Link.fromText(line) for line in linksShowDetailed()] Line 232: Line 233: Line 234: def getVisibleLinks(): Done Line 235: for link in getLinks(): Line 236: if not link.isHidden(): Line 237: yield link Line 238: .................................................... File lib/vdsm/netinfo.py Line 522: 'cfg': getIfaceCfg(dev), Line 523: 'ipv6addrs': ipv6addrs, Line 524: 'mtu': str(getMtu(dev)), Line 525: 'netmask': ipv4netmask} Line 526: Out of scope of this patch. Line 527: Line 528: def get(): Line 529: d = defaultdict(dict) Line 530: gateways = getRoutes() Line 540: netAttr.get('qosOutbound')) Line 541: except KeyError: Line 542: continue # Do not report missing libvirt networks. Line 543: Line 544: for dev in getVisibleLinks(): Sorry, you're right - My first commit message was the right one after all. Line 545: if dev.isBRIDGE(): Line 546: d['bridges'][dev.name] = \ Line 547: _bridgeinfo(dev.name, gateways, ipv6routes) Line 548: if dev.isNICLike(): Line 544: for dev in getVisibleLinks(): Line 545: if dev.isBRIDGE(): Line 546: d['bridges'][dev.name] = \ Line 547: _bridgeinfo(dev.name, gateways, ipv6routes) Line 548: if dev.isNICLike(): Done Line 549: d['nics'][dev.name] = _nicinfo(dev.name, paddr) Line 550: if dev.isBOND(): Line 551: d['bondings'][dev.name] = _bondinfo(dev.name) Line 552: if dev.isVLAN(): Line 544: for dev in getVisibleLinks(): Line 545: if dev.isBRIDGE(): Line 546: d['bridges'][dev.name] = \ Line 547: _bridgeinfo(dev.name, gateways, ipv6routes) Line 548: if dev.isNICLike(): Done Line 549: d['nics'][dev.name] = _nicinfo(dev.name, paddr) Line 550: if dev.isBOND(): Line 551: d['bondings'][dev.name] = _bondinfo(dev.name) Line 552: if dev.isVLAN(): -- To view, visit http://gerrit.ovirt.org/21652 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I70379b24084fa8bec88425de9eca106e2a6ae8f0 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller <amul...@redhat.com> Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com> Gerrit-Reviewer: Assaf Muller <amul...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches