Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-28 Thread Leander Bessa Beernaert
Ok. I will add the required methods to the fakelbvirt. Regards, Leander On Wed, Jun 27, 2012 at 4:50 PM, Jay Pipes jaypi...@gmail.com wrote: On 06/27/2012 10:17 AM, Leander Bessa Beernaert wrote: snip How do I proceed now? Should i ate the required methods to the fake_libvirt? Do note

Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-27 Thread Leander Bessa Beernaert
I've been looking at the implementation of the tests and i the fake_libvirt is a bit incomplete and lacks a lot of methods. This lack of methods causes my diagnostics code to fail the test since an error is produced. For instance this is the output from dir(virDomain) from the fake_libvirt:

Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-27 Thread Jay Pipes
On 06/27/2012 10:17 AM, Leander Bessa Beernaert wrote: snip How do I proceed now? Should i ate the required methods to the fake_libvirt? Do note that i dont have the latest libvirt installed and am therefore missing another set of crucial methods which i can't test. :s No. In general, you only

Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-27 Thread Vishvananda Ishaya
We generally add methods to the fake as they are needed by the implementation. You should probably add the needed methods and return fake values. Vish On Jun 27, 2012, at 7:17 AM, Leander Bessa Beernaert wrote: I've been looking at the implementation of the tests and i the fake_libvirt is a

[Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-25 Thread Leander Bessa Beernaert
Hello, I'm working on the diagnostics method for libvirt. I've successfully managed to test it while running it manually and with devstack. However, the test case in test_virt_drivers.py fails since it supplies a different data type to the method. Could it be possible that there's a certain

Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-25 Thread Leander Bessa Beernaert
Sorry, forgot to add the code: *This is my method (this worked with devstack):* def get_diagnostics(self, instance): dom = self._lookup_by_name(instance['name']) return diagnostics.get_diagnostics(dom) *and this the test method*: def test_get_diagnostics(self):

Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-25 Thread Jay Pipes
You are not returning the data in the test method, whereas you are in the real method :) -jay On 06/25/2012 10:44 AM, Leander Bessa Beernaert wrote: Sorry, forgot to add the code: *This is my method (this worked with devstack):* def get_diagnostics(self, instance): dom =

Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-25 Thread Sean Dague
On 06/25/2012 10:41 AM, Leander Bessa Beernaert wrote: Hello, I'm working on the diagnostics method for libvirt. I've successfully managed to test it while running it manually and with devstack. However, the test case in test_virt_drivers.py fails since it supplies a different data type to the

Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-25 Thread Leander Bessa Beernaert
I would like to add that I did not implement the test method, it was already there. Also it supplies a different set of data than the one i received when working with devstack. Which of the data types should i assume to be correct, the one from devstack or the one from the test? On Mon, Jun 25,

Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py

2012-06-25 Thread Leander Bessa Beernaert
I've implemented a diagnostics method for libvirt. The code works perfectly with the devstack installation. However, when i run the test from run_tests.sh this happens: http://paste.openstack.org/show/18754/. From what i've been told from the irc channel, the data supplied by the test is different