'Generates the export configuration for the given volume.
:param volume:  volume object provided by the Manager
:param connector:  connector object provided by the Manager
:returns: the LUN ID assigned by the backend'

@utils.synchronized('vmem-export')
def _export_lun(self, volume, connector=None):

    lun_id = ''
    v = self.common.vmem_mg
    if (not connector):
        raise exception.ViolinInvalidBackendConfig(reason=_('No    initiators    found,    cannot    proceed'))
    LOG.debug('Exporting    lun    %(vol_id)s    -    initiator    wwpns    %(i_wwpns)s    -    target    wwpns    %(t_wwpns)s.', {'vol_id': volume['id'], 'i_wwpns': connector['wwpns'], 't_wwpns': self.gateway_fc_wwns})
    try:
        lun_id = self.common._send_cmd_and_verify(v.lun.assign_lun_to_client, self._is_lun_id_ready, 'Assign    SAN    client    successfully', [volume['id'], connector['host'], 'ReadWrite'], [volume['id'], connector['host']])
    except exception.ViolinBackendErr:
        LOG.exception('Backend    returned    err    for    lun    export.')
        raise
    except Exception:
        raise exception.ViolinInvalidBackendConfig(reason=_('LUN    export    failed!'))
    lun_id = self._get_lun_id(volume['id'], connector['host'])
    LOG.info('Exported    lun    %(vol_id)s    on    lun_id    %(lun_id)s.', {'vol_id': volume['id'], 'lun_id': lun_id})
    return lun_id
