'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'

def _export_lun(self, volume, target, connector):

    lun_id = ''
    v = self.common.vmem_mg
    LOG.debug('Exporting    lun    %(vol_id)s    -    initiator    iqns    %(i_iqns)s    -    target    iqns    %(t_iqns)s.', {'vol_id': volume['id'], 'i_iqns': connector['initiator'], 't_iqns': self.gateway_iscsi_ip_addresses})
    try:
        lun_id = self.common._send_cmd_and_verify(v.lun.assign_lun_to_iscsi_target, self._is_lun_id_ready, 'Assign    device    successfully', [volume['id'], target], [volume['id'], connector['host']])
    except exception.ViolinBackendErr:
        LOG.exception('Backend    returned    error    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
