Change in vdsm[master]: netinfo: routes_by_dev parameter is never None anyway so _ge...
danken at redhat.com
danken at redhat.com
Mon Feb 2 18:13:39 UTC 2015
Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: routes_by_dev parameter is never None anyway so _get_gateway can be simpified.
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.ovirt.org/#/c/37441/1/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:
Line 600:
Line 601:
Line 602: def _get_gateway(routes_by_dev, dev=None, family=4,
Line 603: table=nl_route._RT_TABLE_MAIN):
Line 604: """Returns the default gateway for a device and an address family"""
however, with the removal of
routes_by_dev = _get_routes()
the expected type of routes_by_dev is less clear. Could you describe it in the docstring?
Line 605: if dev is None: # get all routes
Line 606: routes = nl_route.iter_routes()
Line 607: else: # get only routes for the device
Line 608: routes = routes_by_dev[dev]
--
To view, visit http://gerrit.ovirt.org/37441
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I27c1c97e1b59ab45cc1bb3e7a358021c62c919d2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list