'Function to validate input volumes and return list of ids and luns.'

def _get_resource_lun_tuple(self, resources, resType, baseResUri, tenantname, projectname, blockTypeName):

    copyEntries = []
    volumeObject = volume.Volume(self.ipaddr, self.port)
    for copy in resources:
        copyParam = []
        try:
            copyParam = copy.split(':')
        except Exception:
            raise common.CoprHdError(common.CoprHdError.CMD_LINE_ERR, (_('Please    provide    valid    format    volume:    lun    for    parameter    %s') % resType))
        copy = dict()
        if (not len(copyParam)):
            raise common.CoprHdError(common.CoprHdError.CMD_LINE_ERR, (_('Please    provide    at    least    one    volume    for    parameter    %s') % resType))
        if (resType == 'volumes'):
            full_project_name = ((tenantname + '/') + projectname)
            copy['id'] = volumeObject.volume_query(full_project_name, copyParam[0])
        if (len(copyParam) > 1):
            copy['lun'] = copyParam[1]
        copyEntries.append(copy)
    return copyEntries
