[openstack-dev] [Tempest][Neutron] Network client and API tests refactoring.

Eugene Nikanorov enikanorov at mirantis.com
Sat Dec 14 11:26:19 UTC 2013


Hi tempest folks,

While adding new API tests for Neutron I found out that network client used
in tempest could be improved in at least two ways:
1) code duplication between xml and json versions could be removed
2) client API could be made more flexible and similar to real neutron
client API.
E.g. instead of accepting fixed subset of properties of the resource,
methods could accept full dict with resource description.

Implementing this two points will also require some changes in the tests:
for example, instead of calling
 network_client.create_network(name)
test should call:
 network_data = {'name': name, 'property2': property, ...}
 network_client.create_network(network_data)

Those both items require quite a bit of work and I'm working on such
improvement right now.
My personal motivation for this is that I hate to add new client methods by
copy-pasting existing and
hardcoding stuff in them (and btw, I need to do it for both xml and json
versions)

So before committing more than two hours on this, I wanted to ask if such
kind of change is desirable?
If so, I'm going to present a sequence of patches that will implement this
plan.

Thanks,
Eugene.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131214/2173d5d9/attachment.html>


More information about the OpenStack-dev mailing list