Change in vdsm[master]: netinfo: rework reporting of DHCPv4/6 on network devices
osvoboda at redhat.com
osvoboda at redhat.com
Tue Sep 22 08:35:08 UTC 2015
Ondřej Svoboda has posted comments on this change.
Change subject: netinfo: rework reporting of DHCPv4/6 on network devices
......................................................................
Patch Set 1:
(2 comments)
https://gerrit.ovirt.org/#/c/46430/1/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:
Line 536: """
Line 537: underlying_device = net_attrs['iface']
Line 538: for devices in ('bridges', 'vlans', 'bondings', 'nics'):
Line 539: devinfo = netinfo[devices].get(underlying_device)
Line 540: if devinfo:
> is not None
Technically correct, but I used the assumption that _devinfo always returns a non-empty dictionary. We can't have e.g. a bridge and a NIC with the same name, link names shouldn't collide, should they?
Line 541: devinfo['dhcpv4'] = net_attrs['dhcpv4']
Line 542: devinfo['dhcpv6'] = net_attrs['dhcpv6']
Line 543: break
Line 544:
Line 806:
Line 807: for net, attrs in d['networks'].iteritems():
Line 808: if attrs['bridged']:
Line 809: attrs['cfg'] = d['bridges'][net]['cfg']
Line 810: _update_reported_dhcp(attrs, d)
> this is a lot better!
I agree with you, I'll make _update_reported_dhcp return a dictionary. At the very least it will be easier to debug because not even the second revision managed to pass testSetupNetworksAddDelDhcp.
Line 811:
Line 812: return d
Line 813:
Line 814:
--
To view, visit https://gerrit.ovirt.org/46430
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaffdc836f8f64ecdc0a7e37ef50c228032f99696
Gerrit-PatchSet: 1
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