Change in vdsm[master]: tc: refine unsetPortMirroring

asegurap at redhat.com asegurap at redhat.com
Tue Aug 28 13:47:40 UTC 2012


Antoni Segura Puimedon has posted comments on this change.

Change subject: tc: refine unsetPortMirroring
......................................................................


Patch Set 6: (1 inline comment)

....................................................
File vdsm/tc.py
Line 120:                'parent', 'root', 'prio']
Line 121:     _process_request(command)
Line 122: 
Line 123: def qdisc_get_devid(dev):
Line 124:     "Return qdisc_id of the first qdisc associated with dev"
The fact that it is the first makes a short and nice-sounding name difficult. I guess that if it would return all the qdisc ids and then the caller would pick just the first would make it easier (but it would be cheating on your question).

What I found weird is the grammatical inversion of direct object and verb, qdisc_get_devid suggests to me that what we get as a return is a devid, not a qdisc_id. Maybe get_qdisc_of_devid (the 'of' sounds lame, I know, it's what we get by not having object (OO) or dictionary(FP) representations of the network that would allow for nicer queries).
Line 125: 
Line 126:     command = [EXT_TC, 'qdisc', 'show', 'dev', dev]
Line 127:     out = _process_request(command)
Line 128:     return out.split(' ')[2]


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I09b315e7398c2293dc6f84ab63853b70308b2875
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list