[Patchew-devel] [PATCH 4/5] rest: create separate results endpoint
Paolo Bonzini
pbonzini at redhat.com
Wed Mar 21 05:49:30 UTC 2018
On 21/03/2018 03:33, Fam Zheng wrote:
>> - def __new__(cls, name, status, log_url=None, data=None, request=None):
>> + def __new__(cls, name, status, message, log_url=None, data=None, request=None):
>> if log_url is not None and request is not None:
>> log_url = request.build_absolute_uri(log_url)
>> if status not in ('pending', 'success', 'failure'):
>> raise ValueError("invalid value '%s' for status field" % status)
>> return super(cls, Result).__new__(cls, status=status, log_url=log_url,
>> - data=data, name=name)
>> + message=message, data=data, name=name)
> Result model is useful for Project as well (we want to test project master too?
> It will be important when we add this:
>
> https://github.com/patchew-project/patchew/issues/32
> (Test base branch as well when testing on topic failed, and use it as a
> reference)
I agree, and we need to add it for a REST equivalent of
/api/testing-report. For this series I only looked at ensuring that
future changes to the REST API keep backwards-compatibility, but
/projects/{id}/results/ is certainly on the roadmap.
Paolo
More information about the Patchew-devel
mailing list