Get the valid RepoManagers for this location.
485725
def get_valid_managers(cls, location):
		
		def by_priority_attr(c):
			return getattr(c, 'priority', 0)
		classes = sorted(
			iter_subclasses(cls), key=by_priority_attr,
			reverse=True)
		all_managers = (c(location) for c in classes)
		return (mgr for mgr in all_managers if mgr.is_valid())
985371
def get_applicable_values(self):
        """"""
        return [v for v in self._values if v.is_active and not v.is_all_results]
873247
def collections(self):
        """"""
        # if cache server is configured, load collection from there
        if self.cache:
            return self.cache.get(
                self.app.config['COLLECTIONS_CACHE_KEY'])
823460
def get_groups(self):
        ''''''
        resp = self._post('general-retrievelocations', 'locations')
        final_resp = []
        if resp['groupinfo']:
            for group in resp['groupinfo']:
                final_resp.append(Group(
                    name=group.get('name'),
                    inventory_id=group.get('id')
                ))
        return final_resp
516709
def get_repos(self, since=github.GithubObject.NotSet):
        
        assert since is github.GithubObject.NotSet or isinstance(since, (int, long)), since
        url_parameters = dict()
        if since is not github.GithubObject.NotSet:
            url_parameters["since"] = since
        return github.PaginatedList.PaginatedList(
            github.Repository.Repository,
            self.__requester,
            "/repositories",
            url_parameters
        )
1225624
def _get_repos(self):
        
        result = {}
        for xmlpath in self.installed:
            repo = RepositorySettings(self, xmlpath)
            result[repo.name.lower()] = repo

        return result
272986
def get_items(self):
        
        uids = self.get_uids()
        if not uids:
            return [SuperModel(self.context)]
        items = map(lambda uid: SuperModel(uid), uids)
        return self._resolve_number_of_copies(items)
1236662
def get_suggested_repositories(self):
        
        if self.suggested_repositories is None:
            # Procure repositories to suggest to user.
            repository_set = list()
            for term_count in range(5, 2, -1):
                query = self.__get_query_for_repos(term_count=term_count)
                repository_set.extend(self.__get_repos_for_query(query))

            # Remove repositories authenticated user is already interested in.
            catchy_repos = GitSuggest.minus(
                repository_set, self.user_starred_repositories
            )

            # Filter out repositories with too long descriptions. This is a
            # measure to weed out spammy repositories.
            filtered_repos = []

            if len(catchy_repos) > 0:
                for repo in catchy_repos:
                    if (
                        repo is not None
                        and repo.description is not None
                        and len(repo.description) <= GitSuggest.MAX_DESC_LEN
                    ):
                        filtered_repos.append(repo)

            # Present the repositories, highly starred to not starred.
            filtered_repos = sorted(
                filtered_repos,
                key=attrgetter("stargazers_count"),
                reverse=True,
            )

            self.suggested_repositories = GitSuggest.get_unique_repositories(
                filtered_repos
            )

        # Return an iterator to help user fetch the repository listing.
        for repository in self.suggested_repositories:
            yield repository
623104
def repositories(doc):
    """"""
    for repository_id, repo in doc.get('repositories', {}).items():
        repo['id'] = repository_id
        repo['organisation_id'] = doc['_id']

        yield repository_id, repo
1120105
@SuppressWarnings("unchecked")
    public <REPO extends I_CmsRepository> List<REPO> getRepositories(Class<REPO> cls) {

        List<REPO> result = new ArrayList<REPO>();
        for (I_CmsRepository repo : m_repositoryMap.values()) {
            if (cls.isInstance(repo)) {
                result.add((REPO)repo);
            }
        }
        return result;
    }
980350
def iterrepos(self):
        
        for repo, items in self.repo_items_hash.iteritems():
            if items:
                yield (repo, items)
51330
def find_usedby(self, depslock_file_path, property_validate=True):
        
        if depslock_file_path is None:
            self._raw = [self._params]
            self._raw[0]['repo'] = None
            self._raw[0]['server'] = None
        else:
            self._raw = [x for x in self._downloader.common_parser.iter_packages_params(depslock_file_path)]
        self.packages = self._downloader.get_usedby_packages({'raw': self._raw},
                                                             property_validate=property_validate)
1237423
def active_repositories(doc):
    """"""
    if doc.get('state') != 'deactivated':
        for repository_id, repo in doc.get('repositories', {}).items():
            if repo.get('state') != 'deactivated':
                repo['id'] = repository_id
                repo['organisation_id'] = doc['_id']

                yield repository_id, repo
648115
def validators(self):
        """"""
        if not hasattr(self, "_validators"):
            self._validators = ValidatorList(self)
        return self._validators
128656
def grab_sub_repo(repositories, repos):
    
    for i, repo in enumerate(repositories):
        if repos in repo:
            sub = repositories[i].replace(repos, "")
            repositories[i] = repos
            return sub
    return ""
938168
def replicas(self):
        
        params = {
            "f" : "json",

        }
        url = self._url + "/replicas"
        return self._get(url, params,
                         securityHandler=self._securityHandler,
                         proxy_url=self._proxy_url,
                         proxy_port=self._proxy_port)
899086
def validate_replicas(self, data):
        """"""
        environment = data.get('environment')
        if environment and environment.replicas:
            validate_replicas(data.get('framework'), environment.replicas)