Change in vdsm[master]: ip route: parse only first line of route

ibarkan at redhat.com ibarkan at redhat.com
Sun Dec 21 12:06:13 UTC 2014


Ido Barkan has posted comments on this change.

Change subject: ip route: parse only first line of route
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/36184/3/lib/vdsm/ipwrapper.py
File lib/vdsm/ipwrapper.py:

Line 534:     return _execCmd(command)
Line 535: 
Line 536: 
Line 537: def routeShowTable(table):
Line 538:     command = [_IP_BINARY.cmd, '-o', 'route', 'show', 'table', table]
I suggest including the long options whenever we compose a commandline, e.g. -oneline in this case. This is probably why we don't use 'r' instead of 'route'. This produces a better self documentation (and clearer logging) and prevents the round trip to man pages.

why did you add this option?
Line 539:     return _execCmd(command)
Line 540: 
Line 541: 
Line 542: def routeAdd(route, family=4, dev=None):


-- 
To view, visit http://gerrit.ovirt.org/36184
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5b655ddbbb2fdaa7ec57bc460bc593e40bac977e
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek 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