sregistry/main/registry/query.py
def search(self, query=None, args=None):
    '''query a Singularity registry for a list of images. 
     If query is None, collections are listed. 

    EXAMPLE QUERIES:

    [empty]             list all collections in registry
    vsoch               do a general search for the expression "vsoch"
    vsoch/              list all containers in collection vsoch
    /dinosaur           list containers across collections called "dinosaur"
    vsoch/dinosaur      list details of container vsoch/dinosaur
                          tag "latest" is used by default, and then the most recent
    vsoch/dinosaur:tag  list details for specific container
    
    '''

    if query is not None:

        # List all containers in collection query/
        if query.endswith('/'):  # collection search
            return self._collection_search(query)

        # List containers across collections called /query
        elif query.startswith('/'):  
            return self._container_search(query, across_collections=True)

        # List details of a specific collection container
        elif "/" in query or ":" in query:
            return self._container_search(query)

        # Search collections across all fields
        return self._collection_search(query=query)


    # Search collections across all fields
    return self._search_all()
def search(self, query=None, args=None):
    '''query a Singularity registry for a list of images. 
     If query is None, collections are listed. 

    EXAMPLE QUERIES:

    [empty]             list all collections in registry
    vsoch               do a general search for the expression "vsoch"
    vsoch/              list all containers in collection vsoch
    /dinosaur           list containers across collections called "dinosaur"
    vsoch/dinosaur      list details of container vsoch/dinosaur
                          tag "latest" is used by default, and then the most recent
    vsoch/dinosaur:tag  list details for specific container
    
    '''

    if query is not None:

        # List all containers in collection query/
        if query.endswith('/'):  # collection search
            return self._collection_search(query)

        # List containers across collections called /query
        elif query.startswith('/'):  
            return self._container_search(query, across_collections=True)

        # List details of a specific collection container
        elif "/" in query or ":" in query:
            return self._container_search(query)

        # Search collections across all fields
        return self._collection_search(query=query)


    # Search collections across all fields
    return self._search_all()
def search ( self , query = None , args = None ) : if query is not None : # List all containers in collection query/ if query . endswith ( '/' ) : # collection search return self . _collection_search ( query ) # List containers across collections called /query elif query . startswith ( '/' ) : return self . _container_search ( query , across_collections = True ) # List details of a specific collection container elif "/" in query or ":" in query : return self . _container_search ( query ) # Search collections across all fields return self . _collection_search ( query = query ) # Search collections across all fields return self . _search_all ( )
query a Singularity registry for a list of images. 
     If query is None, collections are listed. 

    EXAMPLE QUERIES:

    [empty]             list all collections in registry
    vsoch               do a general search for the expression "vsoch"
    vsoch/              list all containers in collection vsoch
    /dinosaur           list containers across collections called "dinosaur"
    vsoch/dinosaur      list details of container vsoch/dinosaur
                          tag "latest" is used by default, and then the most recent
    vsoch/dinosaur:tag  list details for specific container
query a Singularity registry for a list of images . If query is None collections are listed .