On 12 March 2013 19:14, Dimitris Aragiorgis <[email protected]> wrote:
> * Bernardo Dal Seno <[email protected]> [2013-03-12 17:05:26 +0100]:
>
>> On 12 March 2013 15:51, Helga Velroyen <[email protected]> wrote:
>> > Hi!
>> >
>> >
>> >> this patch is a fix on top of the last one. I hope this covers all the
>> >> issues you mentioned (sorry for the lint errors).
>> >>
>> >> May I ask why AquireInstance() returns an inst with _template None? This
>> >> way I have to manually set the template inside the test (via
>> >> qa_config.SetInstanceTemplate). I used qa_config.get("os") to get the
>> >> support os. Correct?
>>
>> Dimitris, I think the problem here is that you are writing new
>> functions to create and delete instances instead of using those in
>> qa_instance. If I haven't misunderstood what you are doing, you should
>> add a function in the ganeti-qa.py file that creates the instance,
>> launches the network tests in qa_network, and then removes the
>> instance. You can select any of the allowed disk template (if the
>> actual template doesn't matter for you).
>>
>
> Hello Bernardo,
>
> Thanks a lot for pointing this out. My problem is that I try to test all
> corner cases for networks including the ones related to instances. One
> way to go would be to extend qa_instance to include nics with networks
> (again there I should create/connect networks) but I decided not to mess
> up existing qa.  On the other hand I need more that one instances with
> different nic configurations. So launching one instance and then running
> the network qa is impossible. For the time being I believe I should go
> with Helga's suggestions and in the future try to merge the instance
> related tests in qa_instance.
>
> Does this sound good?

I think that adding a parameter to qa_instance.TestInstanceAddXxx() so
that qa_instance._DiskTest() can add all the needed network options is
still a better choice. With the appropriate default, it shouldn't be
invasive. You can create more than one instance in your tests, and do
whatever setup you need before creating any instance.

Bernardo

Reply via email to