[openstack-dev] [qa] How to do nova v3 tests in tempest

Christopher Yeoh cbkyeoh at gmail.com
Mon Sep 9 00:50:11 UTC 2013


On Sat, Sep 7, 2013 at 3:22 AM, David Kranz <dkranz at redhat.com> wrote:

> On 09/04/2013 09:11 AM, Zhu Bo wrote:
>
>> hi,
>>       I'm working on bp:nova-v3-tests in tempest.  The nova tests in
>> tempest mostly have been ported into v3 and sent off.
>> but we got some feedbacks that there was mass code duplication and
>> suggested to do this by inheritance.
>> 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.
>> 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
>> another better way? I'd appreciate every suggestion and comment.
>>
>> the first way to do this in separate files:
>> https://review.openstack.org/#**/c/39609/<https://review.openstack.org/#/c/39609/>and
>> https://review.openstack.org/#**/c/39621/6<https://review.openstack.org/#/c/39621/6>
>>
>> the second way to do this by inheritance.
>> https://review.openstack.org/#**/c/44876/<https://review.openstack.org/#/c/44876/>
>>
>> Thanks & Best Regards
>>
>> Ivan
>>
>>  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?
>
>
I agree. The copy and modify technique for V3 is the lesser of two evils..

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130909/755952b9/attachment.html>


More information about the OpenStack-dev mailing list