Dan Kenigsberg has posted comments on this change.

Change subject: NetReload: netmodels for addNetwork
......................................................................


Patch Set 21: (1 inline comment)

....................................................
File lib/vdsm/netinfo.py
Line 446:     return d
Line 447: 
Line 448: 
Line 449: def isVlanned(dev):
Line 450:     return len(glob.glob(PROC_NET_VLAN + dev + '.*')) != 0
I kinda prefer iglob (which avoids list allocation). But I wonder why is it a 
bit different to the implementation of the vlans() function. I'd prefer

 return any([vlan.startswith(dev + '.') for vlan in vlans()])

and if PROC_NET_VLAN is safer than /sys/class/net (I think that it is!), that 
should be fixed in vlans().
Line 451: 
Line 452: 
Line 453: def getVlanDevice(vlan):
Line 454:     """ Return the device of the given VLAN. """


--
To view, visit http://gerrit.ovirt.org/14303
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba5c5b84760e27245cbe34c3b290c54e51278e72
Gerrit-PatchSet: 21
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvall...@redhat.com>
Gerrit-Reviewer: Livnat Peer <lp...@redhat.com>
Gerrit-Reviewer: Mark Wu <wu...@linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to