Comment 6 for bug 723621

Revision history for this message
Rick Harris (rconradharris) wrote :

Hi Salvatore:

I ended up stubbing out `lookup_image` entirely (rather than the inner `_is_vdi_pv` function). Here's the code in tests/xenapi/stubs.py:

def stubout_lookup_image(stubs):
    @classmethod
    def fake_lookup_image(cls, session, instance_id, vdi_ref):
        # NOTE(sirp): pretending each image is paravirtualized for now
        is_pv = True
        return is_pv

    stubs.Set(vm_utils.VMHelper, 'lookup_image', fake_lookup_image)