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)
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) : image(cls, session, instance_id, vdi_ref):
@classmethod
def fake_lookup_
# 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)