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
--
To view, visit
http://gerrit.ovirt.org/28704
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5dc4730214efa9eaba8425c3bf4842441b97084f
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes