sregistry/main/hub/query.py
def search_collection(self, query):
    '''collection search will list all containers for a specific
    collection. We assume query is the name of a collection'''

    query = query.lower().strip('/')
    q = parse_image_name(remove_uri(query), defaults=False)
    
    # Workaround for now - the Singularity Hub search endpoind needs fixing
    containers = self.list(quiet=True)

    rows = []
    for result in containers:
        if re.search(query, result[1]):
            rows.append(result)

    if len(rows) > 0:
        bot.table(rows)
    else:
        bot.info('No containers found.')    

    return rows
def search_collection(self, query):
    '''collection search will list all containers for a specific
    collection. We assume query is the name of a collection'''

    query = query.lower().strip('/')
    q = parse_image_name(remove_uri(query), defaults=False)
    
    # Workaround for now - the Singularity Hub search endpoind needs fixing
    containers = self.list(quiet=True)

    rows = []
    for result in containers:
        if re.search(query, result[1]):
            rows.append(result)

    if len(rows) > 0:
        bot.table(rows)
    else:
        bot.info('No containers found.')    

    return rows
collection search will list all containers for a specific
    collection. We assume query is the name of a collection