def getIndexName(strTableName, index):
    """ If an index name is given, use it otherwise,
    use idx_<tablename>_<colNames>
    """
    strIndexName = index.getAttribute("name")
    if strIndexName and len(strIndexName) > 0:
        return strIndexName
    
    cols = index.getAttribute("columns").split(',')
    cols = [col.strip() for col in cols ] # Remove spaces
    
    strIndexName = "idx_" + strTableName + '_'.join([col.strip() for col in cols])
    
    return strIndexName