Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: add gateway reporting to all devices ......................................................................
Patch Set 9: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/28704/9/lib/vdsm/netinfo.py File lib/vdsm/netinfo.py:
Line 722: """Returns the default gateway for a device and an address family""" Line 723: if dev is None: # get all routes Line 724: routes = nl_route.iter_routes() Line 725: else: # get only routes for the device Line 726: if routes is None: Python allows it, but I find it confusing that "routes" can be an iterable or a dictionary of iterables in the same function. Can you think of another name for one of those? Line 727: routes = _get_routes() Line 728: routes = routes[dev] Line 729: Line 730: gateways = [r for r in routes if r['destination'] == 'none' and