Return an array of hashes representing this +type+'s providers, each
 containing :name and :doc.
193832
def provider_doc(type)
      providers = []

      type.providers.sort.each do |prov|
        providers.push(:name => prov, :doc => type.provider(prov).doc)
      end

      providers
    end
1131275
def provide_plugs(self, plug_name_map):
    """"""
    return {name: self._plugs_by_type[cls] for name, cls in plug_name_map}
873750
def get_composite_template(server_template_ids, signers, files)
      composite_array = []
      server_template_ids.each_with_index do |template_id, idx|
        server_template_hash = {
            sequence: (idx+1).to_s,
            templateId: template_id,
            templateRoles: get_template_roles(signers),
        }
        templates_hash = {
          serverTemplates: [server_template_hash],
          inlineTemplates: get_inline_signers(signers, (idx+1).to_s)
        }
        if files
          document_hash = {
              documentId: (idx+1).to_s,
              name: "#{files[idx][:name] if files[idx]}"
          }
          templates_hash[:document] = document_hash
        end
        composite_array << templates_hash
      end
      composite_array
    end
377076
def get_indexes(self, default_indexes=None):
        
        doctype = self.type.get_mapping_type_name()
        indexes = (settings.ES_INDEXES.get(doctype) or
                   settings.ES_INDEXES['default'])
        if isinstance(indexes, six.string_types):
            indexes = [indexes]
        return super(S, self).get_indexes(default_indexes=indexes)
728965
def get_list(self, name):
        ''''''
        normalized_name = normalize_name(name, self._normalize_overrides)
        return self._map[normalized_name]
824996
def get(provider_name, node_type_name)
      name = "#{provider_name}/#{node_type_name}/"
      response = http_get(resource_url(name))
      format_object(response, TYPE)
    end
1009360
def c_hashes(self):
        
        if callable(self.opts.hash_func):
            hashes = [
                '# define {}{} {}\n'.format(
                    self.opts.prefix, name, self.opts.hash_func(name)
                ) for name, dummy_args in self.funcs
            ]
        else:
            hashes = [
                make_c_str(self.opts.prefix + name, name)
                for name, dummy_args in self.funcs
            ]
        if self.name != 'kernel32':
            hashes = [
                make_c_str(self.opts.prefix + self.name, self.name)
            ] + hashes
        return hashes
202507
def GetHashersInformation(cls):
    
    hashers_information = []
    for _, hasher_class in cls.GetHasherClasses():
      description = getattr(hasher_class, 'DESCRIPTION', '')
      hashers_information.append((hasher_class.NAME, description))

    return hashers_information
1232107
def each_match(regex, type, default = nil)
			real_hash.each_key() { |key|
				if (matchinfo = regex.match(key))
					value = fetch(key, type, default)
					if (!value.nil?)
						yield(matchinfo, value)
					end
				end
			}
		end
969473
def build_hash_with_entities(entities_name, entity_name, proc, entities)
      Hash[*entities_name.collect { |name| proc.call(name) == entity_name ? [name, entities] : [name, []] }.flatten(1)]
    end
975964
IndexWriter getIndexWriterForProviders( Set<String> providerNames ) {
        List<IndexProvider> reindexProviders = new LinkedList<>();
        for (IndexProvider provider : providers.values()) {
            if (providerNames.contains(provider.getName())) {
                reindexProviders.add(provider);
            }
        }
        return CompositeIndexWriter.create(reindexProviders);
    }
770710
def _get_hash(self, name, operation, create=False):
        
        return self._get_by_type(name, operation, create, b'hash', {})
1169784
def load_tags
      Hash[@grit_repo.tags.map { |b| [b.name, b.commit.id] }]
    end
587391
def get_all_importing_namespace_hashes( self ):
        
        cur = self.db.cursor()
        namespace_hashes = namedb_get_all_importing_namespace_hashes( cur, self.lastblock )
        return namespace_hashes
1331946
def service_name(doc):
    """"""
    for service_id, service in doc.get('services', {}).items():
        service['id'] = service_id
        service['organisation_id'] = doc['_id']

        name = service.get('name', None)
        if name:
            yield name, service
671257
def map_providers(self, query='list_nodes', cached=False):
        '''
        
        '''
        if cached is True and query in self.__cached_provider_queries:
            return self.__cached_provider_queries[query]

        pmap = {}
        for alias, drivers in six.iteritems(self.opts['providers']):
            for driver, details in six.iteritems(drivers):
                fun = '{0}.{1}'.format(driver, query)
                if fun not in self.clouds:
                    log.error('Public cloud provider %s is not available', driver)
                    continue
                if alias not in pmap:
                    pmap[alias] = {}

                try:
                    with salt.utils.context.func_globals_inject(
                        self.clouds[fun],
                        __active_provider_name__=':'.join([alias, driver])
                    ):
                        pmap[alias][driver] = self.clouds[fun]()
                except Exception as err:
                    log.debug(
                        'Failed to execute \'%s()\' while querying for '
                        'running nodes: %s', fun, err,
                        exc_info_on_loglevel=logging.DEBUG
                    )
                    # Failed to communicate with the provider, don't list any
                    # nodes
                    pmap[alias][driver] = []
        self.__cached_provider_queries[query] = pmap
        return pmap
1170958
def to_hash
      characteristics.inject({}) do |memo, (k, v)|
        memo[k] = v.value
        memo
      end
    end