def set_vif_host_backend_hw_veb(conf, net_type, devname, vlan, tapname=None):
 conf.net_type = net_type
 if (net_type == 'direct'):
  conf.source_mode = 'passthrough'
  conf.source_dev = pci_utils.get_ifname_by_pci_address(devname)
  conf.driver_name = 'vhost'
 else:
  conf.source_dev = devname
  conf.model = None
  conf.vlan = vlan
 if tapname:
  conf.target_dev = tapname

def set_vif_host_backend_hw_veb ( conf , net_type , devname , vlan , tapname = None ) : conf . net_type = net_type if ( net_type == 'direct' ) : conf . source_mode = 'passthrough' conf . source_dev = pci_utils . get_ifname_by_pci_address ( devname ) conf . driver_name = 'vhost' else : conf . source_dev = devname conf . model = None conf . vlan = vlan if tapname : conf . target_dev = tapname
populate a libvirtconfigguestinterface instance with host backend details for an device that supports hardware virtual ethernet bridge .