Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: add gateway reporting to all devices
......................................................................
Patch Set 8: Code-Review-1
(2 comments)
http://gerrit.ovirt.org/#/c/28704/8/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:
Line 354: def getDefaultGateway():
Line 355: output = routeShowGateways('main')
Line 356: return Route.fromText(output[0]) if output else None
Line 357:
Line 358:
I believe that this, as well as getRoute, can and should be removed (possibly in a
different patch).
Line 359: def getgateway(gateways, dev):
Line 360: return gateways.get(dev, '')
Line 361:
Line 362:
Line 769: r['destination'] == 'none' and
Line 770: r['family'] == ('inet6' if family == 6 else
'inet') and
Line 771: r['scope'] == 'universe' and
Line 772: r['table'] == nl_route._MAIN_TABLE]
Line 773: except ValueError: # no default gateway for the device
please log a crazy error if we get "too many values to unpack".
Line 774: return '::' if family == 6 else ''
Line 775: return route['gateway']
Line 776:
Line 777:
--
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: 8
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