Change in vdsm[master]: netinfo: simplify getNetworksAndVlansForIface
ibarkan at redhat.com
ibarkan at redhat.com
Wed Oct 7 12:16:50 UTC 2015
Ido Barkan has posted comments on this change.
Change subject: netinfo: simplify getNetworksAndVlansForIface
......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/46765/2/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:
Line 875: def getNetworksAndVlansForIface(self, iface):
Line 876: """Return tuples of (network, VLAN ID) connected to a NIC/bond."""
Line 877: for network, netdict in self.networks.iteritems():
Line 878: for net_device in netdict['ports'] if netdict['bridged'] else (
Line 879: netdict['iface'],):
> netdict['ports'] is an iterable (a list); and (netdict['iface'],) is as wel
yes, just
if:
foo
else:
bar
Line 880: vlan_info = self.vlans.get(iface)
Line 881: if vlan_info:
Line 882: yield (network, vlan_info['vlanid'])
Line 883: elif iface == net_device: # NIC/bond
--
To view, visit https://gerrit.ovirt.org/46765
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2718e1a1d2799edbd9ad91d42f90c2c9c3d9397
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list