<div dir="ltr"><div class="gmail_extra">+1. That will also help full for API coming up with microversion like Nova.<br><br><div class="gmail_quote">On Fri, Aug 29, 2014 at 11:56 PM, Sean Dague <span dir="ltr"><<a href="mailto:sean@dague.net" target="_blank">sean@dague.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/29/2014 10:19 AM, David Kranz wrote:<br>
> While reviewing patches for moving response checking to the clients, I<br>
> noticed that there are places where client methods do not return any value.<br>
> This is usually, but not always, a delete method. IMO, every rest client<br>
> method should return at least the response. Some services return just<br>
> the response for delete methods and others return (resp, body). Does any<br>
> one object to cleaning this up by just making all client methods return<br>
> resp, body? This is mostly a change to the clients. There were only a<br>
> few places where a non-delete method was returning just a body that was<br>
> used in test code.<br>
<br>
Yair and I were discussing this yesterday. As the response correctness<br>
checking is happening deeper in the code (and you are seeing more and<br>
more people assigning the response object to _ ) my feeling is Tempest<br>
clients should probably return a body obj that's basically.<br>
<br>
class ResponseBody(dict):<br>
def __init__(self, body={}, resp=None):<br>
self.update(body)<br>
self.resp = resp<br>
<br>
Then all the clients would have single return values, the body would be<br>
the default thing you were accessing (which is usually what you want),<br>
and the response object is accessible if needed to examine headers.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Sean<br>
<br>
--<br>
Sean Dague<br>
<a href="http://dague.net" target="_blank">http://dague.net</a><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Thanks & Regards</div><div>Ghanshyam Mann</div><div><br></div></div>
</div></div>