Return a list of all configured adapters and their versions.
427044
function list() {
    var adapters = [];
    _.each(adapterConfig, function(config, adapter) {
        var modulePath = adapterModulePath(adapter, config);
        var version, installPath, moduleName;

        var isBuiltin = BUILTIN_ADAPTERS.indexOf(adapter) !== -1;
        var loaded = true;
        if (isBuiltin) {
            version = juttleVersion;
            installPath = Module._resolveFilename(modulePath, module);
            moduleName = '(builtin)';
        } else {
            try {
                var packagePath = path.join(modulePath, 'package');
                var pkg = require(packagePath);
                installPath = path.dirname(Module._resolveFilename(packagePath, module));
                version = pkg.version || '(unknown)';
                moduleName = pkg.name;
            } catch (err) {
                installPath = '(unable to load adapter)';
                version = '(unknown)';
                moduleName = '(unknown)';
                loaded = false;
            }
        }
        adapters.push({adapter: adapter, builtin: isBuiltin, module: moduleName, version: version, path: installPath, loaded: loaded});
    });
    return adapters;
}
695466
def search_adapter_info(wid, flavour=None):
    
    t = (type(wid), flavour)
    if t in __memoize__:
        return __memoize__[t]

    for w in __def_adapter:
        if (isinstance(wid, w[WIDGET]) and flavour == w[FLAVOUR]):
            __memoize__[t] = w
            return w

    raise TypeError("Adapter type " + str(t) + " not found among supported adapters")
963818
def versions(self, version=None):
        
        try:
            versions = [Version(self, c) for c in self._commits()]
        except Exception, e:
            log.debug('No versions exist')
            return []
        if version is not None and versions:
            try:
                versions = versions[version]
            except IndexError:
                raise VersionError('Version %s does not exist' % version)
        return versions
976619
def get_versions(self):

		'''
		
		'''

		# get all versions
		versions_response = self.repo.api.http_request('GET', '%s/fcr:versions' % self.uri)

		# parse response
		versions_graph = self.repo.api.parse_rdf_payload(versions_response.content, versions_response.headers)

		# loop through fedora.hasVersion
		for version_uri in versions_graph.objects(self.uri, self.rdf.prefixes.fedora.hasVersion):

			# get label
			version_label = versions_graph.value(version_uri, self.rdf.prefixes.fedora.hasVersionLabel, None).toPython()

			# affix version
			self._affix_version(version_uri, version_label)
306386
def settings(self):
        
        if self._settings is None:
            self._settings = SettingsList(self._version, )
        return self._settings
252478
def versions_request(self):
        """"""
        ret = self.handle_api_exceptions('GET', '', api_ver='')
        return [str_dict(x) for x in ret.json()]
1329192
def to_versions(self):
        
        versions = []
        for bound in self.bounds:
            if bound.lower.inclusive and bound.upper.inclusive \
                    and (bound.lower.version == bound.upper.version):
                versions.append(bound.lower.version)

        return versions or None
563402
def list_pkgs(versions_as_list=False, **kwargs):
    '''
    
    '''
    versions_as_list = salt.utils.data.is_true(versions_as_list)
    # not yet implemented or not applicable
    if any([salt.utils.data.is_true(kwargs.get(x))
            for x in ('removed', 'purge_desired')]):
        return {}

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
            __salt__['pkg_resource.stringify'](ret)
            return ret

    ret = {}
    pkgs = _vartree().dbapi.cpv_all()
    for cpv in pkgs:
        __salt__['pkg_resource.add_pkg'](ret,
                                         _cpv_to_cp(cpv),
                                         _cpv_to_version(cpv))
    __salt__['pkg_resource.sort_pkglist'](ret)
    __context__['pkg.list_pkgs'] = copy.deepcopy(ret)
    if not versions_as_list:
        __salt__['pkg_resource.stringify'](ret)
    return ret
1135210
def list_pkgs(versions_as_list=False, **kwargs):
    '''
    
    '''
    versions_as_list = salt.utils.data.is_true(versions_as_list)
    # not yet implemented or not applicable
    if any([salt.utils.data.is_true(kwargs.get(x))
            for x in ('removed', 'purge_desired')]):
        return {}

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
            __salt__['pkg_resource.stringify'](ret)
            return ret

    pkgin = _check_pkgin()
    ret = {}

    out = __salt__['cmd.run'](
        [pkgin, 'ls'] if pkgin else ['pkg_info'],
        output_loglevel='trace')

    for line in out.splitlines():
        try:
            # Some versions of pkgin check isatty unfortunately
            # this results in cases where a ' ' or ';' can be used
            pkg, ver = re.split('[; ]', line, 1)[0].rsplit('-', 1)
        except ValueError:
            continue
        __salt__['pkg_resource.add_pkg'](ret, pkg, ver)

    __salt__['pkg_resource.sort_pkglist'](ret)
    __context__['pkg.list_pkgs'] = copy.deepcopy(ret)
    if not versions_as_list:
        __salt__['pkg_resource.stringify'](ret)
    return ret
1244560
def versions(self):
        
        if self._version_manager is None:
            self._version_manager = VersionManager(session=self._session)
        return self._version_manager
198465
def get_versions(self):
        

        if not self.object_id:
            return []
        url = self.build_url(
            self._endpoints.get('versions').format(id=self.object_id))

        response = self.con.get(url)
        if not response:
            return []

        data = response.json()

        # Everything received from cloud must be passed as self._cloud_data_key
        return [DriveItemVersion(parent=self, **{self._cloud_data_key: item})
                for item in data.get('value', [])]
490512
def pkg_version_list(self, pkg_id):
        '''
        
        '''
        pkg_data = self.__reg_software.get(pkg_id, None)
        if not pkg_data:
            return []

        if isinstance(pkg_data, list):
            # raw data is 'pkgid': [sorted version list]
            return pkg_data  # already sorted oldest to newest

        # Must be a dict or OrderDict, and contain full details
        installed_versions = list(pkg_data.get('version').keys())
        return sorted(installed_versions, key=cmp_to_key(self.__oldest_to_latest_version))
335424
def list_pkgs(versions_as_list=False, **kwargs):
    '''
    
    '''
    versions_as_list = salt.utils.data.is_true(versions_as_list)
    # not yet implemented or not applicable
    if any([salt.utils.data.is_true(kwargs.get(x))
            for x in ('removed', 'purge_desired')]):
        return {}

    if 'pkg.list_pkgs' in __context__:
        if versions_as_list:
            return __context__['pkg.list_pkgs']
        else:
            ret = copy.deepcopy(__context__['pkg.list_pkgs'])
            __salt__['pkg_resource.stringify'](ret)
            return ret

    cmd = ['apk', 'info', '-v']
    ret = {}
    out = __salt__['cmd.run'](cmd, output_loglevel='trace', python_shell=False)
    for line in salt.utils.itertools.split(out, '\n'):
        pkg_version = '-'.join(line.split('-')[-2:])
        pkg_name = '-'.join(line.split('-')[:-2])
        __salt__['pkg_resource.add_pkg'](ret, pkg_name, pkg_version)

    __salt__['pkg_resource.sort_pkglist'](ret)
    __context__['pkg.list_pkgs'] = copy.deepcopy(ret)
    if not versions_as_list:
        __salt__['pkg_resource.stringify'](ret)
    return ret
115571
def asset_versions(self):
        
        if self._asset_versions is None:
            self._asset_versions = AssetVersionList(
                self._version,
                service_sid=self._solution['service_sid'],
                asset_sid=self._solution['sid'],
            )
        return self._asset_versions
732493
def python_version_matchers():
    """"""
    version = sys.version_info
    patterns = [
        "{0}",
        "{0}{1}",
        "{0}.{1}",
    ]
    matchers = [
        pattern.format(*version)
        for pattern in patterns
    ] + [None]
    return set(matchers)
1236064
def all_versions(req):
    """"""
    import requests
    url = "https://pypi.python.org/pypi/" + req + "/json"
    return tuple(requests.get(url).json()["releases"].keys())
209930
def ports(self):
        
        # We do here some lazy loading.
        if not self._ports:
            family = self.get_property('adapter-family')
            try:
                port_type = self.port_type_by_family[family]
            except KeyError:
                port_type = None
            self._ports = PortManager(self, port_type)
        return self._ports