Get a list of all links to be included with replica sets.
430452
def all_replica_set_links(rs_id, rel_to=None):
    """"""
    return [
        replica_set_link(rel, rs_id, self_rel=(rel == rel_to))
        for rel in (
            'get-replica-set-info',
            'delete-replica-set', 'replica-set-command',
            'get-replica-set-members', 'add-replica-set-member',
            'get-replica-set-secondaries', 'get-replica-set-primary',
            'get-replica-set-arbiters', 'get-replica-set-hidden-members',
            'get-replica-set-passive-members', 'get-replica-set-servers'
        )
    ]
589862
def get_links(self, **kw):
        

        links = [a for a in dir(self) if isinstance(getattr(self, a), Model)
                 and not a.startswith('_model')]

        return [
            {
                'field': l,
                'mdl': getattr(self, l).__class__,
            } for l in links
        ]
422270
def all(self, archived=False, limit=None, page=None):
        """"""
        path = partial(_path, self.adapter)
        if not archived:
            path = _path(self.adapter)
        else:
            path = _path(self.adapter, 'archived')
        return self._get(path, limit=limit, page=page)
1250965
def get_link_pages(links):
        
        link_pages = []
        i = 0
        while i < len(links):
            link_page = []
            while i < len(links) and len(link_page) < 10:
                link_page.append(links[i])
                i += 1
            link_pages.append(link_page)
        return link_pages
181928
def links(self):
        
        link_dict = {'self': self.resource_uri()}
        for relationship in inspect(  # pylint: disable=maybe-no-member
                self.__class__).relationships:
            if 'collection' not in relationship.key:
                instance = getattr(self, relationship.key)
                if instance:
                    link_dict[str(relationship.key)] = instance.resource_uri()
        return link_dict
202335
def _get_replica_set_members(self, selector):
        """"""
        # Implemented here in Topology instead of MongoClient, so it can lock.
        with self._lock:
            topology_type = self._description.topology_type
            if topology_type not in (TOPOLOGY_TYPE.ReplicaSetWithPrimary,
                                     TOPOLOGY_TYPE.ReplicaSetNoPrimary):
                return set()

            return set([sd.address for sd in selector(self._new_selection())])
346832
def all_resource_urls(query):
    '''  '''
    urls = []
    next = True
    while next:
        response = requests.get(query)
        json_data = json.loads(response.content)
        for resource in json_data['results']:
            urls.append(resource['url'])
        if bool(json_data['next']):
            query = json_data['next']
        else:
            next = False
    return urls
1229289
def get_repos(self):
        
        url_parameters = dict()

        return github.PaginatedList.PaginatedList(
            contentClass=github.Repository.Repository,
            requester=self._requester,
            firstUrl="/installation/repositories",
            firstParams=url_parameters,
            headers=INTEGRATION_PREVIEW_HEADERS,
            list_item='repositories'
        )
63972
def get_links(rlinks):
    
    if rlinks is None:
        return
    links = []
    for item in rlinks:
        if 'url' in item:
            links.append(item['url'])
        if 'title' in item and 'ns' in item:
            if item['ns'] == 0:  # articles only
                links.append(item['title'])
    return sorted(links) if links else None
962910
def _get_all(cls, parent_id=None, grandparent_id=None):
        """"""
        client = cls._get_client()
        endpoint = cls._endpoint.format(resource_id="",
                                        parent_id=parent_id or "",
                                        grandparent_id=grandparent_id or "")
        resources = []
        while True:
            response = client.get_resource(endpoint)
            for raw_data in response.get("value", []):
                raw_data["parentResourceID"] = parent_id
                raw_data["grandParentResourceID"] = grandparent_id
                resources.append(cls.from_raw_data(raw_data))
            endpoint = response.get("nextLink")
            if not endpoint:
                break
        return resources
703364
def links(self):
        """"""
        ret = []
        linkheader = self.getheader('link')
        if not linkheader:
            return ret
        for i in linkheader.split(','):
            try:
                url, params = i.split(';', 1)
            except ValueError:
                url, params = i, ''
            link = {}
            link['url'] = url.strip('''<> '"''')
            for param in params.split(';'):
                try:
                    k, v = param.split('=')
                except ValueError:
                    break
                link[k.strip(''' '"''')] = v.strip(''' '"''')
            ret.append(link)
        return ret
889973
def links(self) -> _Links:
        """"""
        return list(set(x.text for x in self.xpath('//link')))
50045
def process_links(self, links):
        
        links_list = []
        for link in links:
            if os.path.splitext(link)[1][1:].strip().lower() in self.format_list:
                links_list.append(link)
        return links_list
924707
def _get_all_attributes(network):
    
    attrs = network.attributes
    for n in network.nodes:
        attrs.extend(n.attributes)
    for l in network.links:
        attrs.extend(l.attributes)
    for g in network.resourcegroups:
        attrs.extend(g.attributes)

    return attrs
330138
def _get_links(self,):
        
        res = ''
        if self.links:
            for l in self.links:
                res += ' links = ' + str(l[0]) + '\n'
                if l[0].child_nodes:
                    for chld in l[0].child_nodes:
                        res += '   child = ' + str(chld) + '\n'
                if l[0].links:
                    for lnk in l[0].links:
                        res += '   sublink = ' + str(lnk[0]) + '\n'
        else:
            res += ' links = None\n'
            
        return res
1060833
@JsonIgnore
	public List<Link> getLinks() {

		String url = this.url;

		if (url == null) {
			return Links.NONE.toList();
		}

		return Optional.ofNullable(this.rel) //
				.map(rels -> rels.stream() //
						.map(rel -> new Link(url, rel)) //
						.collect(Collectors.toList())) //
				.orElse(Collections.emptyList());
	}
728302
def get_replicas(self, keyspace, key):
        
        t = self.token_map
        if not t:
            return []
        try:
            return t.get_replicas(keyspace, t.token_class.from_key(key))
        except NoMurmur3:
            return []