'Creates vifs for an instance.'

def _create_vifs(self, instance, vm_ref, network_info):

    LOG.debug('Creating    vifs', instance=instance)
    vif_refs = []
    self._session.call_xenapi('VM.get_domid', vm_ref)
    for (device, vif) in enumerate(network_info):
        LOG.debug('Create    VIF    %s', vif, instance=instance)
        vif_ref = self.vif_driver.plug(instance, vif, vm_ref=vm_ref, device=device)
        vif_refs.append(vif_ref)
    LOG.debug('Created    the    vif_refs:    %(vifs)s    for    VM    name:    %(name)s', {'vifs': vif_refs, 'name': instance['name']}, instance=instance)
