I split this out for easier testing with mock vs mox really. There is nothing really special about them. We really need to add a clean layer between call_xenapi and the rest of the code, its turning into a mess. Some time we inline the call, sometimes we pull the call out. We need to decide what we want to do. I vote we slowly pull them out, then create a new layer.

I plan on pushing all these patches, as is, upstream, as soon as icehouse opens.