[openstack-qa] On refactoring of base classes/infrastructure

Daryl Walleck daryl.walleck at RACKSPACE.COM
Thu Feb 21 19:04:33 UTC 2013


I think the intent of having XML and JSON running tests is a great idea, the implementation I think could use some redesign. To me, whether I want to use XML or JSON requests is more of a configuration level detail as opposed to a fixture detail. The clients themselves don't really need to be specific to a format either. The only thing that differs is the serialization and deserialization of the request and response, where the serializer/deserializer could be a member of the client class instantiated based on configuration. If you take that a step further, you can refactor the requests and responses out of the clients into their own classes, and let each class take care of the serialization process. Either way, avoiding duplicated client code could help with tightening up the infrastructure of Tempest.

Daryl
________________________________________
From: Jay Pipes [jaypipes at gmail.com]
Sent: Thursday, February 21, 2013 11:48 AM
To: openstack-qa at lists.openstack.org
Subject: Re: [openstack-qa] On refactoring of base classes/infrastructure

On 02/21/2013 11:52 AM, Attila Fazekas wrote:
> Probably we can came up with a solution, to move both xml and json clients to the same file (per remote service) and still keep it small.
> We should use the rest API's key naming in our code even, even if it would violate, the python variable naming conventions.

Sure on a single file. Not sure why we'd want to violate our variable
naming conventions, though. -1 on that.

> The rest_clients /service proxies/ does lazy authentication, so if they not used, they does not have significant cost.
> We are now creating "demo" users too frequently, probably we just need to create users just per process, and we just had get a token (excluding keystone test) only once  (unless it expires, but usually they have 24h lifetime).
> The current behavior spend measurable additional unnecessary time in chatting with keystone.

100% agreed.

> There is lot of code duplication and other anomalies in our base test classes.
> First, we should have 4 more generic base classes
> - One for both XML/JSON
> - One for pythton-client libs

We already have this...

https://github.com/openstack/tempest/blob/master/tempest/test.py

> - One for AWS/Boto
> - One for CLI

Sure, ok, if not already done...

> Both of them, should cover all functionality regardless to the remote service type.
>
> Slowly we should make them more similar to each other....
>
> Most of the whitebox features, should go to some utils like place.

++

-jay

_______________________________________________
openstack-qa mailing list
openstack-qa at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-qa



More information about the openstack-qa mailing list