def set_vif_host_backend_direct_config(conf, devname, mode='passthrough'):
 conf.net_type = 'direct'
 conf.source_mode = mode
 conf.source_dev = devname
 conf.model = 'virtio'

def set_vif_host_backend_direct_config ( conf , devname , mode = 'passthrough' ) : conf . net_type = 'direct' conf . source_mode = mode conf . source_dev = devname conf . model = 'virtio'
populate a libvirtconfigguestinterface instance with direct interface .