sregistry/main/google_storage/build.py
def list_templates(self, name=None):
    '''list templates in the builder bundle library. If a name is provided,
       look it up

       Parameters
       ==========
       name: the name of a template to look up
    '''
    configs = self._get_templates()
    rows = []

    # DETAIL: The user wants to retrieve a particular configuration
    if name:
        matches = self._load_templates(name)
        bot.debug('Found %s matches for %s' %(len(matches), name))
        for match in matches:
            print(json.dumps(match, indent=4, sort_keys=True))

    # LISTING: If we don't have a specific name, just show all
    else:
        for config in configs['data']:
            rows.append([config['name']])
        bot.table(rows)
def list_templates(self, name=None):
    '''list templates in the builder bundle library. If a name is provided,
       look it up

       Parameters
       ==========
       name: the name of a template to look up
    '''
    configs = self._get_templates()
    rows = []

    # DETAIL: The user wants to retrieve a particular configuration
    if name:
        matches = self._load_templates(name)
        bot.debug('Found %s matches for %s' %(len(matches), name))
        for match in matches:
            print(json.dumps(match, indent=4, sort_keys=True))

    # LISTING: If we don't have a specific name, just show all
    else:
        for config in configs['data']:
            rows.append([config['name']])
        bot.table(rows)
def list_templates ( self , name = None ) : configs = self . _get_templates ( ) rows = [ ] # DETAIL: The user wants to retrieve a particular configuration if name : matches = self . _load_templates ( name ) bot . debug ( 'Found %s matches for %s' % ( len ( matches ) , name ) ) for match in matches : print ( json . dumps ( match , indent = 4 , sort_keys = True ) ) # LISTING: If we don't have a specific name, just show all else : for config in configs [ 'data' ] : rows . append ( [ config [ 'name' ] ] ) bot . table ( rows )
list templates in the builder bundle library. If a name is provided,
       look it up

       Parameters
       ==========
       name: the name of a template to look up
list templates in the builder bundle library . If a name is provided look it up