Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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 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 want to put methods into the fake driver that are *called* by the OpenStack code. If you are calling methods on the VirDomain with your new diagnostics code, then yes, you will need to implement corresponding fake methods in the fake driver. All the best, -jay __**_ Mailing list: https://launchpad.net/~**openstackhttps://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~**openstackhttps://launchpad.net/~openstack More help : https://help.launchpad.net/**ListHelphttps://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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: ['UUIDString', 'XMLDesc', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_connection', '_def', '_has_saved_state', '_parse_definition', '_snapshots', '_state', '_transient', 'attachDevice', 'blockStats', 'create', 'createWithFlags', 'destroy', 'detachDevice', 'hasManagedSaveImage', 'info', 'interfaceStats', 'isActive', 'managedSave', 'managedSaveRemove', 'name', 'reset', 'resume', 'shutdown', 'snapshotCreateXML', 'suspend', 'undefine'] and below from the real libvirt: ['ID', 'OSType', 'UUID', 'UUIDString', 'XMLDesc', '__del__', '__doc__', '__init__', '__module__', '_conn', '_o', 'abortJob', 'attachDevice', 'attachDeviceFlags', 'autostart', 'blkioParameters', 'blockInfo', 'blockIoTune', 'blockJobAbort', 'blockJobInfo', 'blockJobSetSpeed', 'blockPeek', 'blockPull', 'blockResize', 'blockStats', 'blockStatsFlags', 'connect', 'controlInfo', 'coreDump', 'create', 'createWithFlags', 'destroy', 'destroyFlags', 'detachDevice', 'detachDeviceFlags', 'hasCurrentSnapshot', 'hasManagedSaveImage', 'info', 'injectNMI', 'interfaceStats', 'isActive', 'isPersistent', 'isUpdated', 'jobInfo', 'managedSave', 'managedSaveRemove', 'maxMemory', 'maxVcpus', 'memoryParameters', 'memoryPeek', 'memoryStats', 'migrate', 'migrate2', 'migrateGetMaxSpeed', 'migrateSetMaxDowntime', 'migrateSetMaxSpeed', 'migrateToURI', 'migrateToURI2', 'name', 'openConsole', 'openGraphics', 'pinVcpu', 'pinVcpuFlags', 'reboot', 'reset', 'resume', 'revertToSnapshot', 'save', 'saveFlags', 'schedulerParameters', 'schedulerParametersFlags', 'schedulerType', 'screenshot', 'sendKey', 'setAutostart', 'setBlkioParameters', 'setBlockIoTune', 'setMaxMemory', 'setMemory', 'setMemoryFlags', 'setMemoryParameters', 'setSchedulerParameters', 'setSchedulerParametersFlags', 'setVcpus', 'setVcpusFlags', 'shutdown', 'snapshotCreateXML', 'snapshotCurrent', 'snapshotListNames', 'snapshotLookupByName', 'snapshotNum', 'state', 'suspend', 'undefine', 'undefineFlags', 'updateDeviceFlags', 'vcpuPinInfo', 'vcpus', 'vcpusFlags'] 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 On Mon, Jun 25, 2012 at 4:43 PM, Leander Bessa Beernaert leande...@gmail.com wrote: 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 than the one i'm currently receiving. Now, i'm unsure which data type i should except from the get_diagnostics method. On Mon, Jun 25, 2012 at 4:01 PM, Sean Dague sda...@linux.vnet.ibm.comwrote: 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 method. Could it be possible that there's a certain mismatch between the two or that this particular method accepts multiple sorts of data-types? Can you be more specific with the issue? I've been in that code recently, so I might be able to help sort this out. -Sean -- Sean Dague IBM Linux Technology Center email: sda...@linux.vnet.ibm.com alt-email: slda...@us.ibm.com __**_ Mailing list: https://launchpad.net/~**openstackhttps://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~**openstackhttps://launchpad.net/~openstack More help : https://help.launchpad.net/**ListHelphttps://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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 want to put methods into the fake driver that are *called* by the OpenStack code. If you are calling methods on the VirDomain with your new diagnostics code, then yes, you will need to implement corresponding fake methods in the fake driver. All the best, -jay ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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 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: ['UUIDString', 'XMLDesc', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_connection', '_def', '_has_saved_state', '_parse_definition', '_snapshots', '_state', '_transient', 'attachDevice', 'blockStats', 'create', 'createWithFlags', 'destroy', 'detachDevice', 'hasManagedSaveImage', 'info', 'interfaceStats', 'isActive', 'managedSave', 'managedSaveRemove', 'name', 'reset', 'resume', 'shutdown', 'snapshotCreateXML', 'suspend', 'undefine'] and below from the real libvirt: ['ID', 'OSType', 'UUID', 'UUIDString', 'XMLDesc', '__del__', '__doc__', '__init__', '__module__', '_conn', '_o', 'abortJob', 'attachDevice', 'attachDeviceFlags', 'autostart', 'blkioParameters', 'blockInfo', 'blockIoTune', 'blockJobAbort', 'blockJobInfo', 'blockJobSetSpeed', 'blockPeek', 'blockPull', 'blockResize', 'blockStats', 'blockStatsFlags', 'connect', 'controlInfo', 'coreDump', 'create', 'createWithFlags', 'destroy', 'destroyFlags', 'detachDevice', 'detachDeviceFlags', 'hasCurrentSnapshot', 'hasManagedSaveImage', 'info', 'injectNMI', 'interfaceStats', 'isActive', 'isPersistent', 'isUpdated', 'jobInfo', 'managedSave', 'managedSaveRemove', 'maxMemory', 'maxVcpus', 'memoryParameters', 'memoryPeek', 'memoryStats', 'migrate', 'migrate2', 'migrateGetMaxSpeed', 'migrateSetMaxDowntime', 'migrateSetMaxSpeed', 'migrateToURI', 'migrateToURI2', 'name', 'openConsole', 'openGraphics', 'pinVcpu', 'pinVcpuFlags', 'reboot', 'reset', 'resume', 'revertToSnapshot', 'save', 'saveFlags', 'schedulerParameters', 'schedulerParametersFlags', 'schedulerType', 'screenshot', 'sendKey', 'setAutostart', 'setBlkioParameters', 'setBlockIoTune', 'setMaxMemory', 'setMemory', 'setMemoryFlags', 'setMemoryParameters', 'setSchedulerParameters', 'setSchedulerParametersFlags', 'setVcpus', 'setVcpusFlags', 'shutdown', 'snapshotCreateXML', 'snapshotCurrent', 'snapshotListNames', 'snapshotLookupByName', 'snapshotNum', 'state', 'suspend', 'undefine', 'undefineFlags', 'updateDeviceFlags', 'vcpuPinInfo', 'vcpus', 'vcpusFlags'] 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 On Mon, Jun 25, 2012 at 4:43 PM, Leander Bessa Beernaert leande...@gmail.com wrote: 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 than the one i'm currently receiving. Now, i'm unsure which data type i should except from the get_diagnostics method. On Mon, Jun 25, 2012 at 4:01 PM, Sean Dague sda...@linux.vnet.ibm.com wrote: 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 method. Could it be possible that there's a certain mismatch between the two or that this particular method accepts multiple sorts of data-types? Can you be more specific with the issue? I've been in that code recently, so I might be able to help sort this out. -Sean -- Sean Dague IBM Linux Technology Center email: sda...@linux.vnet.ibm.com alt-email: slda...@us.ibm.com ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help :
[Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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 mismatch between the two or that this particular method accepts multiple sorts of data-types? Regards, Leander ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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): instance_ref, network_info = self._get_running_instance() self.connection.get_diagnostics(instance_ref['name']) On Mon, Jun 25, 2012 at 3:41 PM, Leander Bessa Beernaert leande...@gmail.com 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 method. Could it be possible that there's a certain mismatch between the two or that this particular method accepts multiple sorts of data-types? Regards, Leander ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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 = self._lookup_by_name(instance['name']) return diagnostics.get_diagnostics(dom) *and this the test method*: def test_get_diagnostics(self): instance_ref, network_info = self._get_running_instance() self.connection.get_diagnostics(instance_ref['name']) On Mon, Jun 25, 2012 at 3:41 PM, Leander Bessa Beernaert leande...@gmail.com mailto:leande...@gmail.com 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 method. Could it be possible that there's a certain mismatch between the two or that this particular method accepts multiple sorts of data-types? Regards, Leander ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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 method. Could it be possible that there's a certain mismatch between the two or that this particular method accepts multiple sorts of data-types? Can you be more specific with the issue? I've been in that code recently, so I might be able to help sort this out. -Sean -- Sean Dague IBM Linux Technology Center email: sda...@linux.vnet.ibm.com alt-email: slda...@us.ibm.com ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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, 2012 at 4:10 PM, Jay Pipes jaypi...@gmail.com wrote: 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 = self._lookup_by_name(instance[**'name']) return diagnostics.get_diagnostics(**dom) *and this the test method*: def test_get_diagnostics(self): instance_ref, network_info = self._get_running_instance() self.connection.get_**diagnostics(instance_ref['**name']) On Mon, Jun 25, 2012 at 3:41 PM, Leander Bessa Beernaert leande...@gmail.com mailto:leande...@gmail.com 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 method. Could it be possible that there's a certain mismatch between the two or that this particular method accepts multiple sorts of data-types? Regards, Leander __**_ Mailing list: https://launchpad.net/~**openstackhttps://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~**openstackhttps://launchpad.net/~openstack More help : https://help.launchpad.net/**ListHelphttps://help.launchpad.net/ListHelp __**_ Mailing list: https://launchpad.net/~**openstackhttps://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~**openstackhttps://launchpad.net/~openstack More help : https://help.launchpad.net/**ListHelphttps://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] [OpenStack][Nova] Possible inconsistency between devstack/nova execution and test_virt_drivers.py
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 than the one i'm currently receiving. Now, i'm unsure which data type i should except from the get_diagnostics method. On Mon, Jun 25, 2012 at 4:01 PM, Sean Dague sda...@linux.vnet.ibm.comwrote: 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 method. Could it be possible that there's a certain mismatch between the two or that this particular method accepts multiple sorts of data-types? Can you be more specific with the issue? I've been in that code recently, so I might be able to help sort this out. -Sean -- Sean Dague IBM Linux Technology Center email: sda...@linux.vnet.ibm.com alt-email: slda...@us.ibm.com __**_ Mailing list: https://launchpad.net/~**openstackhttps://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~**openstackhttps://launchpad.net/~openstack More help : https://help.launchpad.net/**ListHelphttps://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp