'Create the path between the server and the LDEV and return LUN.'

def map_ldev(self, targets, ldev):

    (port, gid) = targets['list'][0]
    lun = self._run_add_lun(ldev, port, gid)
    targets['lun'][port] = True
    for (port, gid) in targets['list'][1:]:
        try:
            lun2 = self._run_add_lun(ldev, port, gid, lun=lun)
            if (lun2 is not None):
                targets['lun'][port] = True
        except exception.VSPError:
            utils.output_log(MSG.MAP_LDEV_FAILED, ldev=ldev, port=port, id=gid, lun=lun)
    return lun
