[openstack-qa] About Glance Client in Tempest

Yaniv Kaul ykaul at redhat.com
Tue Feb 5 09:48:09 UTC 2013


On 05/02/13 11:33, Patil, Kavan K (HPCS) wrote:
>
> Hi Matthew Treinish,
>
> [I am not sure how one could reply to comments on gerrit, so I am 
> mailing this across. I am using the list as other people could express 
> their thoughts here.]
>
> Quoted Text from your review comment for : 
> https://review.openstack.org/#/c/20464/ 
> <https://review.openstack.org/#/c/20464/>
>
> ---------------
>
> “I also have some concerns about whether using http from glanceclient 
> common is distinct enough from just testing glanceclient (like we do 
> currently) for tempest. I'm not sure if we should use tempest's 
> RestClient or another tempest specific http client for glance, or if 
> using glanceclient's http lib is enough. If someone with more 
> knowledge about this could chime in...
>
> Either way I think writing a client class for the API is the right way 
> to do it, instead of baking the request formatting and headers into 
> the tests like you did here. I have a WIP up for this at: 
> https://review.openstack.org/#/c/19963/ . It doesn't currently work 
> because of issues with image upload, but I'll rework it ASAP depending 
> on what the consensus is on which http client to use. (Using glance 
> client's would be easier) Once that's done I'll update the review so 
> you can rebase the tests on top of it.”
>
> ---------------
>
> About your first point, i.e. which http base client to use while 
> writing tempest tests: I think we will be reinventing the wheel if we 
> try to write our own http base class, especially for tricky things 
> like SSL support. The glanceclient.common.http module has special 
> consideration for SSL (https) based connections and we would also have 
> to do the same thing if we want to write a http base client ourselves. 
> So I would vote to just use glanceclient.common.http as the base http 
> client.
>

I'm not sure why SSL is complex. It's been done before, many times.

> Next, I agree that we should try to have a API client wrapper (like 
> the ones for Compute and Quantum), and use that in our tests. I didn’t 
> do it because I thought that will again be like implementing 
> glanceclient.v1.images, while we could do all the stuff through the 
> base http client directly in tests as I have done in my proposal.
>

Well, you could go even further and ask why not use the command line 
tool? This way we are testing:
CLI -> client -> API

(say we use 'pexpect' or something for the command line client, or just 
parse it).

I think there are cons and pros to each direction - I like that we test 
all those layers in one sweep, but we are definitely adding complexity 
to the debugging process if there are issues.
I'm mostly concerned that the clients do not have stable versions and 
are just rolling along.

> Still if we want to maintain consistency (w.r.t. other services) we 
> could implement an Image v1 API client for Tempest, as you have done 
> here: https://review.openstack.org/#/c/19963/ and use that in the test 
> scripts instead of plain http.
>

I'm in favor of a simple client, mainly because I don't 'trust' the 
clients and want to maintain independence in implementation according to 
the API, and not use an implementation that may have been tailored 
between the client and the server.
Y.

> I request others to chime in.
>
> Regards,
>
> Kavan
>
>
>
> _______________________________________________
> openstack-qa mailing list
> openstack-qa at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-qa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-qa/attachments/20130205/c0f3cef4/attachment.html>


More information about the openstack-qa mailing list