Hi all,
I'm writing scripts in Python using the LAVA XML-RPC API to parse data from my bundle stream.
I read the documentation for the dashboard.get_filter_results() method. I understand that by default, the count parameter is set to 10 as shown here:
get_filter_results(filter_name, count=10, offset=0)
However, if I change the value of count from 10 to 100, I run into this error:
bbb_results = server.dashboard.get_filter_results(bbb_filter_name, count=100) TypeError: __call__() got an unexpected keyword argument 'count'
and bbb_filter_name is set to "~lisatn/pmwg-bbb"
I would like to be able to display more than 10 results (currently have 75 pm-qa test runs for beaglebone-black), or am I misunderstanding the purpose of count?
Lisa
On Tue, 27 May 2014 15:44:10 -0700 Lisa Nguyen lisa.nguyen@linaro.org wrote:
Hi all,
I'm writing scripts in Python using the LAVA XML-RPC API to parse data from my bundle stream.
I read the documentation for the dashboard.get_filter_results() method. I understand that by default, the count parameter is set to 10 as shown here:
get_filter_results(filter_name, count=10, offset=0)
I get working results with:
print "filter results: %s\n" % server.dashboard.get_filter_results(filter_name, 2)
or
print "filter results: %s\n" % server.dashboard.get_filter_results(filter_name, 25)
or, to use offset:
print "filter results: %s\n" % server.dashboard.get_filter_results(filter_name, 25, 15)
This does enforce strict variable ordering, I'm not sure why.
I would like to be able to display more than 10 results (currently have 75 pm-qa test runs for beaglebone-black), or am I misunderstanding the purpose of count?
This might be a limitation in the linaro-django-xmlrpc support integrated into lava-server. The xmlrpclib docs do appear to hint that the usual python default argument syntax should work.
https://docs.python.org/2/library/xmlrpclib.html
On Thu, 29 May 2014 14:30:26 +0100 Neil Williams codehelp@debian.org wrote:
On Tue, 27 May 2014 15:44:10 -0700
get_filter_results(filter_name, count=10, offset=0)
I get working results with:
print "filter results: %s\n" % server.dashboard.get_filter_results(filter_name, 2)
This does enforce strict variable ordering, I'm not sure why.
OK, misread the docs on that.
XMLRPC does not support passing parameters by name, only by position.
http://xmlrpc.scripting.com/spec.html
If the procedure call has parameters, the <methodCall> must contain a <params> sub-item. The <params> sub-item can contain any number of <param>s, each of which has a <value>.
i.e. only value, not a name and a value.
xmlrpclib is a python implementation of the XMLRPC spec which supports C and other languages, so language-specific syntax is not supported.
**kwargs fails for the same reason.
A note on this could be added to the LAVA API documentation.
On 29 May 2014 07:03, Neil Williams codehelp@debian.org wrote:
On Thu, 29 May 2014 14:30:26 +0100 Neil Williams codehelp@debian.org wrote:
On Tue, 27 May 2014 15:44:10 -0700
get_filter_results(filter_name, count=10, offset=0)
I get working results with:
print "filter results: %s\n" % server.dashboard.get_filter_results(filter_name, 2)
The examples you gave me worked :)
This does enforce strict variable ordering, I'm not sure why.
OK, misread the docs on that.
XMLRPC does not support passing parameters by name, only by position.
http://xmlrpc.scripting.com/spec.html
If the procedure call has parameters, the <methodCall> must contain a <params> sub-item. The <params> sub-item can contain any number of
<param>s, each of which has a <value>.
i.e. only value, not a name and a value.
xmlrpclib is a python implementation of the XMLRPC spec which supports C and other languages, so language-specific syntax is not supported.
**kwargs fails for the same reason.
A note on this could be added to the LAVA API documentation.
Thanks for looking into this, Neil. It would be helpful to have this note added to the LAVA API documentation. I'll have to read up more on XML RPC stuff.
linaro-validation@lists.linaro.org