'Check if vdisk is mapped.
If map, return True and lun id.
If not map, return False and expected lun id.'

def _is_vdisk_map(self, vdisk_name, connector):

    LOG.debug('enter:    _is_vdisk_map:    %(src)s.', {'src': vdisk_name})
    map_flag = False
    result_lun = '-1'
    host_name = self._get_host_from_connector(connector)
    if (host_name is None):
        return (map_flag, int(result_lun))
    mapping_data = self._get_hostvdisk_mappings(host_name)
    if (vdisk_name in mapping_data):
        map_flag = True
        result_lun = mapping_data[vdisk_name]['SCSI_id']
    else:
        lun_used = [int(v['SCSI_id']) for v in mapping_data.values()]
        lun_used.sort()
        result_lun = 1
        for lun_id in lun_used:
            if (result_lun < lun_id):
                break
            elif (result_lun == lun_id):
                result_lun += 1
    LOG.debug('leave:    _is_vdisk_map:    %(src)s    mapped    %(map_flag)s    %(result_lun)s.', {'src': vdisk_name, 'map_flag': six.text_type(map_flag), 'result_lun': result_lun})
    return (map_flag, int(result_lun))
