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/ and
https://review.openstack.org/#/c/39621/6
the second way to do this by inheritance.
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?
-David
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev