Nir Soffer has posted comments on this change.

Change subject: Prettify/simplify netinfo.py:get()
......................................................................


Patch Set 4: Code-Review+1

(2 comments)

I would clean it up a little bit, but it is good enough as is.

....................................................
File lib/vdsm/netinfo.py
Line 487:             raise
Line 488:     return data
Line 489: 
Line 490: 
Line 491: def _bridgeinfo(bridge, gateways, ipv6routes):
Accepting a device, and using dev.name will clean caller code. But maybe not in 
this patch.
Line 492:     info = _devinfo(bridge)
Line 493:     info.update({'gateway': getgateway(gateways, bridge),
Line 494:                 'ipv6gateway': ipv6routes.get(bridge, '::'),
Line 495:                 'ports': ports(bridge), 'stp': 
bridge_stp_state(bridge)})


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 (link for link in getLinks() if not link.isHidden()):
Using link.isHidden in the main loop is cleaner, this generator is pointless 
here. But it is good enough if you don't want to create another patch.
Line 545:         if dev.isBRIDGE():
Line 546:             d['bridges'][dev.name] = \
Line 547:                 _bridgeinfo(dev.name, gateways, ipv6routes)
Line 548:         elif dev.isNICLike():


-- 
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: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Nir Soffer <[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

Reply via email to