Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: add gateway reporting to all devices
......................................................................
Patch Set 1:
(2 comments)
I'm so sorry - I managed to keep my initial comments as drafts.
http://gerrit.ovirt.org/#/c/28704/1/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:
Line 749:
Line 750:
Line 751: def _getRoutes():
Line 752: routes = defaultdict(list)
Line 753: for route in nl_route.iter_routes():
wouldn't
routes[route['oif']].extend(nl_route.iter_routes())
do the trick, and faster?
Line 754: routes[route['oif']].append(route)
Line 755: return routes
Line 756:
Line 757:
http://gerrit.ovirt.org/#/c/28704/1/lib/vdsm/netlink/route.py
File lib/vdsm/netlink/route.py:
Line 25: from . import _nladdr_to_str, _nlaf_to_str, _nlscope_to_str, AF_UNSPEC
Line 26: from .link import _nl_link_cache, _link_index_to_name
Line 27:
Line 28: EXTRA_TABLE_FIELD = 252
Line 29: MAIN_TABLE = 254
I find it better to keep the underlying names as much as possible. The RT_ prefix of
RT_TABLE_MAIN is clear by this module name, so it can be dropped. But the rest should
better stay the same.
Line 30:
Line 31:
Line 32: def iter_routes():
Line 33: """Generator that yields an information dictionary for each
route in the
--
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: 1
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