<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Sep 7, 2013 at 3:22 AM, David Kranz <span dir="ltr"><<a href="mailto:dkranz@redhat.com" target="_blank">dkranz@redhat.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="im">On 09/04/2013 09:11 AM, Zhu Bo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hi,<br>
I'm working on bp:nova-v3-tests in tempest. The nova tests in tempest mostly have been ported into v3 and sent off.<br>
but we got some feedbacks that there was mass code duplication and suggested to do this by inheritance.<br>
So I have sent another patch to do this by inheritance. But in this way, another issue is not easy to drop v2 client and tests.<br>
I want to get more feedbacks about this blue-print to make sure we do this in the right way, which is the better one or is there<br>
another better way? I'd appreciate every suggestion and comment.<br>
<br>
the first way to do this in separate files:<br>
<a href="https://review.openstack.org/#/c/39609/" target="_blank">https://review.openstack.org/#<u></u>/c/39609/</a> and <a href="https://review.openstack.org/#/c/39621/6" target="_blank">https://review.openstack.org/#<u></u>/c/39621/6</a><br>
<br>
the second way to do this by inheritance.<br>
<a href="https://review.openstack.org/#/c/44876/" target="_blank">https://review.openstack.org/#<u></u>/c/44876/</a><br>
<br>
Thanks & Best Regards<br>
<br>
Ivan<br>
<br>
</blockquote></div>
Ivan, I took a look at this. My first thought was that subclassing would be good because it could avoid code duplication. But when I looked at the patch I saw that although there are subclasses, most of the changes are version "ifs" inside the base class code. IMO that gives us the worst of both worlds and we would be better off just copying as we did with the new image api. It is not great, but I think that is the least of evils here. Any one else have a different view?<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div><br></div><div>I agree. The copy and modify technique for V3 is the lesser of two evils..<br><br></div><div>Chris<br></div></div></div></div>