Ondřej Svoboda has posted comments on this change.

Change subject: net_func_tests: add calling method name to setupNetworks
......................................................................


Patch Set 1:

(1 comment)

How to find the calling method (the test).

http://gerrit.ovirt.org/#/c/35711/1/tests/functional/utils.py
File tests/functional/utils.py:

Line 153: 
Line 154:     @netinfo_altering
Line 155:     def setupNetworks(self, networks, bonds, options):
Line 156:         options = dir(options)
Line 157:         options['_caller'] = inspect()[2][3]  # add calling method 
for logs
> This could be improved by searching for the parent method in the frame stac
Determining the method's (e.g. NetworkTest.testSetupNetworksAddBadParams) class 
type is not straightforward, unfortunately, as we can only retrieve the 
function's name and perhaps the source code around it, not the actual function 
object or its self.

It is feasible though to search by function name, thus looking for the one 
prefixed with "test", which is almost as good.

But to get the clue this patch is great, thanks! :-)
Line 158:         result = self.vdscli.setupNetworks(networks, bonds, options)
Line 159:         return result['status']['code'], result['status']['message']
Line 160: 
Line 161:     def _vlanInRunningConfig(self, devName, vlanId):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id5f07be1f2cef54a773deb8dd73967dc55bf2cf0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Ido Barkan <[email protected]>
Gerrit-Reviewer: Ondřej Svoboda <[email protected]>
Gerrit-Reviewer: Petr Horáček <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to