def set_stubs(test):
 test.stub_out('nova.virt.vmwareapi.network_util.get_network_with_the_name', fake.fake_get_network)
 test.stub_out('nova.virt.vmwareapi.images.upload_image_stream_optimized', fake.fake_upload_image)
 test.stub_out('nova.virt.vmwareapi.images.fetch_image', fake.fake_fetch_image)
 test.stub_out('nova.virt.vmwareapi.driver.VMwareAPISession.vim', fake_vim_prop)
 test.stub_out('nova.virt.vmwareapi.driver.VMwareAPISession._is_vim_object', fake_is_vim_object)
 if CONF.use_neutron:
  test.stub_out('nova.network.neutronv2.api.API.update_instance_vnic_index', (lambda *args, **kwargs: None))

def set_stubs ( test ) : test . stub_out ( 'nova.virt.vmwareapi.network_util.get_network_with_the_name' , fake . fake_get_network ) test . stub_out ( 'nova.virt.vmwareapi.images.upload_image_stream_optimized' , fake . fake_upload_image ) test . stub_out ( 'nova.virt.vmwareapi.images.fetch_image' , fake . fake_fetch_image ) test . stub_out ( 'nova.virt.vmwareapi.driver.VMwareAPISession.vim' , fake_vim_prop ) test . stub_out ( 'nova.virt.vmwareapi.driver.VMwareAPISession._is_vim_object' , fake_is_vim_object ) if CONF . use_neutron : test . stub_out ( 'nova.network.neutronv2.api.API.update_instance_vnic_index' , ( lambda * args , ** kwargs : None ) )
set the stubs .