<div dir="ltr">Hi Jay,<div><br></div><div>Sure, that is understood. In fact such refactoring could be a big change so I'd split it to two or more patches.</div><div>Hope this will not overlap with ongoing neutron API tests development.</div>
<div><br></div><div>Thanks,</div><div>Eugene.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Dec 14, 2013 at 7:01 PM, Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sat, 2013-12-14 at 15:26 +0400, Eugene Nikanorov wrote:<br>
> Hi tempest folks,<br>
><br>
> While adding new API tests for Neutron I found out that network client<br>
> used in tempest could be improved in at least two ways:<br>
> 1) code duplication between xml and json versions could be removed<br>
> 2) client API could be made more flexible and similar to real neutron<br>
> client API.<br>
> E.g. instead of accepting fixed subset of properties of the resource,<br>
> methods could accept full dict with resource description.<br>
><br>
> Implementing this two points will also require some changes in the<br>
> tests: for example, instead of calling<br>
>  network_client.create_network(name)<br>
> test should call:<br>
>  network_data = {'name': name, 'property2': property, ...}<br>
>  network_client.create_network(network_data)<br>
><br>
> Those both items require quite a bit of work and I'm working on such<br>
> improvement right now.<br>
> My personal motivation for this is that I hate to add new client<br>
> methods by copy-pasting existing and<br>
> hardcoding stuff in them (and btw, I need to do it for both xml and<br>
> json versions)<br>
><br>
> So before committing more than two hours on this, I wanted to ask if<br>
> such kind of change is desirable?<br>
> If so, I'm going to present a sequence of patches that will implement<br>
> this plan.<br>
<br>
</div></div>Hi Eugene!<br>
<br>
It's best to keep refactoring patches separate from any patches that add<br>
functionality or new tests to Tempest. I think the above improvements<br>
would be a welcome change, but it's easier for reviewers if that<br>
refactoring patch is all in one patch and not mixed in with new tests or<br>
added functionality.<br>
<br>
All the best,<br>
-jay<br>
<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>
</blockquote></div><br></div>