Files
python-ganttclient/nova/tests/xenapi
Ewan Mellor c5955b9c04 Refactor a few things inside the xenapi unit tests.
There were a couple of places where basically the same code was being
used to create a simulated VDI record -- these have been brought together
into _make_fake_vdi.

fake_fetch_image was stubbing out parse_xmlrpc_value, which looks like it
was a workaround for the fact that the task result wasn't being populated
properly.  I've fixed the latter, and removed the former.  This moved the
JSON handling into xenapi.fake.

There were a couple of implementations of host_call_plugin, which contained
a lot of duplicated code.  In particular, they both made a simulated VDI
record, even when the plugin function being called didn't require that.
I have brought the two implementations together into fake.SessionBase, with
overrides in the subclasses for those things that are specific to a given
test.  I have also made the baseclass strict about flagging unsimulated
plugin calls, and added explicit handling for agent.version, and a couple
of methods from glance and migration.

Change-Id: Idc3a872870ae15165747a04ecd1b48e889bd90fd
2011-11-26 14:22:30 -08:00
..
2010-12-23 02:09:50 +00:00