sregistry/main/hub/query.py
def list_all(self, **kwargs):
    '''a "show all" search that doesn't require a query'''

    quiet=False
    if "quiet" in kwargs:
        quiet = kwargs['quiet']

    bot.spinner.start()
    url = '%s/collections/' %self.base
    results = self._paginate_get(url)
    bot.spinner.stop()   

    if len(results) == 0:
        bot.info("No container collections found.")
        sys.exit(1)

    rows = []
    for result in results:
        if "containers" in result:
            if result['id'] not in [37,38,39]:
                for c in result['containers']:
                    rows.append([c['detail'],"%s:%s" %(c['name'],c['tag'])])

    if quiet is False:
        bot.info("Collections")
        bot.table(rows)

    return rows
def list_all(self, **kwargs):
    '''a "show all" search that doesn't require a query'''

    quiet=False
    if "quiet" in kwargs:
        quiet = kwargs['quiet']

    bot.spinner.start()
    url = '%s/collections/' %self.base
    results = self._paginate_get(url)
    bot.spinner.stop()   

    if len(results) == 0:
        bot.info("No container collections found.")
        sys.exit(1)

    rows = []
    for result in results:
        if "containers" in result:
            if result['id'] not in [37,38,39]:
                for c in result['containers']:
                    rows.append([c['detail'],"%s:%s" %(c['name'],c['tag'])])

    if quiet is False:
        bot.info("Collections")
        bot.table(rows)

    return rows
def list_all ( self , * * kwargs ) : quiet = False if "quiet" in kwargs : quiet = kwargs [ 'quiet' ] bot . spinner . start ( ) url = '%s/collections/' % self . base results = self . _paginate_get ( url ) bot . spinner . stop ( ) if len ( results ) == 0 : bot . info ( "No container collections found." ) sys . exit ( 1 ) rows = [ ] for result in results : if "containers" in result : if result [ 'id' ] not in [ 37 , 38 , 39 ] : for c in result [ 'containers' ] : rows . append ( [ c [ 'detail' ] , "%s:%s" % ( c [ 'name' ] , c [ 'tag' ] ) ] ) if quiet is False : bot . info ( "Collections" ) bot . table ( rows ) return rows
a "show all" search that doesn't require a query
a show all search that doesn t require a query