'return iscsi lun properties.'

def get_lun(self, pool, project, lun):

    svc = ((((('/api/storage/v1/pools/' + pool) + '/projects/') + project) + '/luns/') + lun)
    ret = self.rclient.get(svc)
    if (ret.status == restclient.Status.NOT_FOUND):
        LOG.warning('LUN    with    name    %(lun)s    not    found    in    project    %(project)s,    pool    %(pool)s.', {'lun': lun, 'project': project, 'pool': pool})
        raise exception.VolumeNotFound(volume_id=lun)
    elif (ret.status != restclient.Status.OK):
        exception_msg = (_('Error    Getting    Volume:    %(lun)s    on    Pool:    %(pool)s    Project:    %(project)s    Return    code:    %(ret.status)d    Message:    %(ret.data)s.') % {'lun': lun, 'pool': pool, 'project': project, 'ret.status': ret.status, 'ret.data': ret.data})
        LOG.error(exception_msg)
        raise exception.VolumeBackendAPIException(data=exception_msg)
    val = json.loads(ret.data)
    def _listify(item):
        return (item if isinstance(item, list) else [item])
    initiatorgroup = _listify(val['lun']['initiatorgroup'])
    number = _listify(val['lun']['assignednumber'])
    if ('com.sun.ms.vss.hg.maskAll' in initiatorgroup):
        initiatorgroup = []
        number = []
    ret = {'name': val['lun']['name'], 'guid': val['lun']['lunguid'], 'number': number, 'initiatorgroup': initiatorgroup, 'size': val['lun']['volsize'], 'nodestroy': val['lun']['nodestroy'], 'targetgroup': val['lun']['targetgroup']}
    if ('origin' in val['lun']):
        ret.update({'origin': val['lun']['origin']})
    if ('custom:image_id' in val['lun']):
        ret.update({'image_id': val['lun']['custom:image_id']})
        ret.update({'updated_at': val['lun']['custom:updated_at']})
    if ('custom:cinder_managed' in val['lun']):
        ret.update({'cinder_managed': val['lun']['custom:cinder_managed']})
    return ret
