Resolve a list of Providers.
498809
function resolveReflectiveProviders(providers) {
	        var normalized = _normalizeProviders(providers, []);
	        var resolved = normalized.map(resolveReflectiveProvider);
	        return MapWrapper.values(mergeResolvedReflectiveProviders(resolved, new Map()));
	    }
163615
def set_providers(self, *providers):
        """"""
        if self.providers:
            self.clear()
        for provider in providers:
            self.add(provider)
731007
function resolveAddresses(provider, value, paramType) {
    if (Array.isArray(paramType)) {
        var promises_1 = [];
        paramType.forEach(function (paramType, index) {
            var v = null;
            if (Array.isArray(value)) {
                v = value[index];
            }
            else {
                v = value[paramType.name];
            }
            promises_1.push(resolveAddresses(provider, v, paramType));
        });
        return Promise.all(promises_1);
    }
    if (paramType.type === 'address') {
        return provider.resolveName(value);
    }
    if (paramType.type === 'tuple') {
        return resolveAddresses(provider, value, paramType.components);
    }
    // Strips one level of array indexing off the end to recuse into
    var isArrayMatch = paramType.type.match(/(.*)(\[[0-9]*\]$)/);
    if (isArrayMatch) {
        if (!Array.isArray(value)) {
            throw new Error('invalid value for array');
        }
        var promises = [];
        var subParamType = {
            components: paramType.components,
            type: isArrayMatch[1],
        };
        value.forEach(function (v) {
            promises.push(resolveAddresses(provider, v, subParamType));
        });
        return Promise.all(promises);
    }
    return Promise.resolve(value);
}
1240428
def get_provider(self, provider):
        """"""
        if self.provider is not None:
            return self.provider
        return providers.by_id(provider)
389939
@Override
	public void registerOsgiProviders (Collection<Object> providers) throws FhirConfigurationException {
		if (null == providers) {
			throw new NullPointerException("FHIR Provider list cannot be null");
		}
		try {
			super.registerProviders(providers);
			for (Object provider : providers) {
				log.trace("registered provider. class ["+provider.getClass().getName()+"]");
				this.serverProviders.add(provider);
			}
		} catch (Exception e) {
			log.error("Error registering FHIR Providers", e);
			throw new FhirConfigurationException("Error registering FHIR Providers", e);
		}
	}
880412
synchronized public List<ParserProvider> getAllProviders(boolean sort) {
    List<ParserProvider> providers = new ArrayList<>();
    for(ParserProvider pp : loader) {
      providers.add(pp);
    }
    if (sort) {
      Collections.sort(providers, PARSER_PROVIDER_COMPARATOR);
    }
    return providers;
  }
957259
def __filter_non_working_providers(self):
        '''
        
        '''
        for alias, drivers in six.iteritems(self.opts['providers'].copy()):
            for driver in drivers.copy():
                fun = '{0}.get_configured_provider'.format(driver)
                if fun not in self.clouds:
                    # Mis-configured provider that got removed?
                    log.warning(
                        'The cloud driver, \'%s\', configured under the '
                        '\'%s\' cloud provider alias, could not be loaded. '
                        'Please check your provider configuration files and '
                        'ensure all required dependencies are installed '
                        'for the \'%s\' driver.\n'
                        'In rare cases, this could indicate the \'%s()\' '
                        'function could not be found.\nRemoving \'%s\' from '
                        'the available providers list',
                        driver, alias, driver, fun, driver
                    )
                    self.opts['providers'][alias].pop(driver)

                    if alias not in self.opts['providers']:
                        continue

                    if not self.opts['providers'][alias]:
                        self.opts['providers'].pop(alias)
                    continue

                with salt.utils.context.func_globals_inject(
                    self.clouds[fun],
                    __active_provider_name__=':'.join([alias, driver])
                ):
                    if self.clouds[fun]() is False:
                        log.warning(
                            'The cloud driver, \'%s\', configured under the '
                            '\'%s\' cloud provider alias is not properly '
                            'configured. Removing it from the available '
                            'providers list.', driver, alias
                        )
                        self.opts['providers'][alias].pop(driver)

            if alias not in self.opts['providers']:
                continue

            if not self.opts['providers'][alias]:
                self.opts['providers'].pop(alias)
867829
def provider_list(self, lookup='all'):
        '''
        
        '''
        data = {}
        lookups = self.lookup_providers(lookup)
        if not lookups:
            return data

        for alias, driver in lookups:
            if alias not in data:
                data[alias] = {}
            if driver not in data[alias]:
                data[alias][driver] = {}
        return data
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
1108541
def _get_enabled():
    """"""
    providers = Provider.objects.all()
    return [p for p in providers if p.enabled()]
531527
private List<RequestHandler2> resolveRequestHandlers() {
        return (requestHandlers == null) ? new ArrayList<RequestHandler2>() :
                new ArrayList<RequestHandler2>(requestHandlers);
    }
44406
private static List<String> resolveValues(final Iterable<? extends String> values) {
        final List<String> valuesList = new ArrayList<String>();

        for(final String value : values) {
            Validate.notNull(value, "One of the specified values was null");
            valuesList.add(value);
        }

        return valuesList;
    }
932403
def find_providers(self, reqt):
        
        matcher = self.get_matcher(reqt)
        name = matcher.key   # case-insensitive
        result = set()
        provided = self.provided
        if name in provided:
            for version, provider in provided[name]:
                try:
                    match = matcher.match(version)
                except UnsupportedVersionError:
                    match = False

                if match:
                    result.add(provider)
                    break
        return result
20210
def do_resolve(self, definitions):
        
        filtered = []
        for p in self.ports:
            ref = qualify(p.binding, self.root, definitions.tns)
            binding = definitions.bindings.get(ref)
            if binding is None:
                raise Exception("binding '%s', not-found" % (p.binding,))
            if binding.soap is None:
                log.debug("binding '%s' - not a SOAP binding, discarded",
                    binding.name)
                continue
            # After we have been resolved, our caller will expect that the
            # binding we are referencing has been fully constructed, i.e.
            # resolved, as well. The only scenario where the operations binding
            # might possibly not have already resolved its references, and
            # where this explicit resolve() call is required, is if we are
            # dealing with a recursive WSDL import chain.
            binding.resolve(definitions)
            p.binding = binding
            filtered.append(p)
        self.ports = filtered
271887
def _resources(p):
    """"""
    if p.resources:
        click.echo(",".join(p.resources))
    else:
        click.echo(f"Provider '{p.name}' does not have resource helpers")
1295948
public static Optional<MultifactorAuthenticationProvider> resolveProvider(final Map<String, MultifactorAuthenticationProvider> providers,
                                                                              final String requestMfaMethod) {
        return resolveProvider(providers, Stream.of(requestMfaMethod).collect(Collectors.toList()));
    }
331524
public List<T> resolveConflicts(List<T> values) {
        if(values.size() > 1)
            return values;
        else
            return Collections.singletonList(values.get(0));
    }