Dan Kenigsberg has posted comments on this change.
Change subject: Simplify netinfo get.
......................................................................
Patch Set 8: I would prefer that you didn't submit this
(2 inline comments)
very minor comments, the split makes sense.
....................................................
File vdsm/netinfo.py
Line 273: paddr[slave] = addr.upper()
Line 274: return paddr
Line 275:
Line 276:
Line 277: def getNetData(iface, bridged, routes):
is this declared public intentionally?
Line 278: data = {}
Line 279: try:
Line 280: if bridged:
Line 281: data.update({'ports': ports(iface), 'stp':
bridge_stp_state(iface),
Line 288: data.update({'iface': iface, 'bridged': bridged,
Line 289: 'addr': getaddr(iface), 'netmask':
getnetmask(iface),
Line 290: 'gateway': routes.get(iface, '0.0.0.0'),
Line 291: 'mtu': getMtu(iface)})
Line 292: return data
nit: "return" does not raise, so it should be out of the try-block.
Line 293: except OSError as e:
Line 294: if e.errno == errno.ENOENT:
Line 295: logging.info('Obtaining info for net %s.', iface,
exc_info=True)
Line 296: raise KeyError('Network %s was not found')
--
To view, visit http://gerrit.ovirt.org/11080
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5c3e617d10308d0bfa4deaed329b2e10ef54077c
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches