[openstack-qa] About Glance Client in Tempest

Patil, Kavan K (HPCS) kavan.patil at hp.com
Tue Feb 5 09:33:12 UTC 2013


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/
---------------
"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.

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.

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 request others to chime in.

Regards,
Kavan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-qa/attachments/20130205/7cb21119/attachment.html>


More information about the openstack-qa mailing list