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. <div>
<br><div>For instance this is the output from dir(virDomain) from the fake_libvirt:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
['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']</blockquote>
<div><br></div><div>and below from the real libvirt:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
['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']</blockquote>
<div><br></div><div>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</div>
<br><div class="gmail_quote">On Mon, Jun 25, 2012 at 4:43 PM, Leander Bessa Beernaert <span dir="ltr"><<a href="mailto:leanderbb@gmail.com" target="_blank">leanderbb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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: <a href="http://paste.openstack.org/show/18754/" target="_blank">http://paste.openstack.org/show/18754/</a>. >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.<div class="HOEnZb">
<div class="h5"><br>
<br><div class="gmail_quote">On Mon, Jun 25, 2012 at 4:01 PM, Sean Dague <span dir="ltr"><<a href="mailto:sdague@linux.vnet.ibm.com" target="_blank">sdague@linux.vnet.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>On 06/25/2012 10:41 AM, Leander Bessa Beernaert wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I'm working on the diagnostics method for libvirt. I've<br>
successfully managed to test it while running it manually and with<br>
devstack. However, the test case in test_virt_drivers.py fails since it<br>
supplies a different data type to the method.<br>
<br>
Could it be possible that there's a certain mismatch between the two or<br>
that this particular method accepts multiple sorts of data-types?<br>
</blockquote>
<br></div></div>
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.<span><font color="#888888"><br>
<br>
-Sean<br>
<br>
-- <br>
Sean Dague<br>
IBM Linux Technology Center<br>
email: <a href="mailto:sdague@linux.vnet.ibm.com" target="_blank">sdague@linux.vnet.ibm.com</a><br>
alt-email: <a href="mailto:sldague@us.ibm.com" target="_blank">sldague@us.ibm.com</a></font></span><div><div><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~<u></u>openstack</a><br>
Post to : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~<u></u>openstack</a><br>
More help : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/<u></u>ListHelp</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br></div></div>