Make 'links' between elements, like a host got a services list
        with all its services in it

        :return: None
11109
def linkify(self):
        

        self.services.optimize_service_search(self.hosts)

        # First linkify myself like for some global commands
        self.linkify_one_command_with_commands(self.commands, 'host_perfdata_command')
        self.linkify_one_command_with_commands(self.commands, 'service_perfdata_command')
        self.linkify_one_command_with_commands(self.commands, 'global_host_event_handler')
        self.linkify_one_command_with_commands(self.commands, 'global_service_event_handler')

        # link hosts with timeperiods and commands
        self.hosts.linkify(self.timeperiods, self.commands,
                           self.contacts, self.realms,
                           self.resultmodulations, self.businessimpactmodulations,
                           self.escalations, self.hostgroups,
                           self.checkmodulations, self.macromodulations)

        self.hostsextinfo.merge(self.hosts)

        # Do the simplify AFTER explode groups
        # link hostgroups with hosts
        self.hostgroups.linkify(self.hosts, self.realms, self.forced_realms_hostgroups)

        # link services with other objects
        self.services.linkify(self.hosts, self.commands,
                              self.timeperiods, self.contacts,
                              self.resultmodulations, self.businessimpactmodulations,
                              self.escalations, self.servicegroups,
                              self.checkmodulations, self.macromodulations)

        self.servicesextinfo.merge(self.services)

        # link servicegroups members with services
        self.servicegroups.linkify(self.hosts, self.services)

        # link notificationways with timeperiods and commands
        self.notificationways.linkify(self.timeperiods, self.commands)

        # link notificationways with timeperiods and commands
        self.checkmodulations.linkify(self.timeperiods, self.commands)

        # Link with timeperiods
        self.macromodulations.linkify(self.timeperiods)

        # link contacgroups with contacts
        self.contactgroups.linkify(self.contacts)

        # link contacts with timeperiods and commands
        self.contacts.linkify(self.commands, self.notificationways)

        # link timeperiods with timeperiods (exclude part)
        self.timeperiods.linkify()

        self.servicedependencies.linkify(self.hosts, self.services,
                                         self.timeperiods)

        self.hostdependencies.linkify(self.hosts, self.timeperiods)
        self.resultmodulations.linkify(self.timeperiods)

        self.businessimpactmodulations.linkify(self.timeperiods)

        self.escalations.linkify(self.timeperiods, self.contacts,
                                 self.services, self.hosts)

        # Link all satellite links with modules
        self.schedulers.linkify(self.modules)
        self.brokers.linkify(self.modules)
        self.receivers.linkify(self.modules)
        self.reactionners.linkify(self.modules)
        self.pollers.linkify(self.modules)

        # Ok, now update all realms with back links of satellites
        satellites = {}
        for sat in self.schedulers:
            satellites[sat.uuid] = sat
        for sat in self.pollers:
            satellites[sat.uuid] = sat
        for sat in self.reactionners:
            satellites[sat.uuid] = sat
        for sat in self.receivers:
            satellites[sat.uuid] = sat
        for sat in self.brokers:
            satellites[sat.uuid] = sat
        self.realms.prepare_satellites(satellites)
928841
def get_services(cls, request=None):
        
        return {service['name']: reverse(service['list_view'], request=request)
                for service in cls._registry.values()}
1214379
def _build_connstr(host, port, bucket):
    
    hostlist = []
    if isinstance(host, (tuple, list)):
        for curhost in host:
            if isinstance(curhost, (list, tuple)):
                hostlist.append(_fmthost(*curhost))
            else:
                hostlist.append(curhost)
    else:
        hostlist.append(_fmthost(host, port))

    return 'http://{0}/{1}'.format(','.join(hostlist), bucket)
64351
def links(self):
        
        if not self._responses:
            return None
        if 'Link' in self._responses[-1].headers:
            links = []
            for l in headers.parse_link(self._responses[-1].headers['Link']):
                link = {'target': l.target}
                link.update({k: v for (k, v) in l.parameters})
                links.append(link)
            return links
69945
def normalize_urls(urls):
    """"""
    _urls = []
    if isinstance(urls, list):
        if urls:
            if isinstance(urls[0], list):
                # multiple connections (list of the lists)
                _urls = urls
            elif isinstance(urls[0], str):
                # single connections (make it list of the lists)
                _urls = [urls]
        else:
            raise RuntimeError("No target host url provided.")
    elif isinstance(urls, str):
        _urls = [[urls]]
    return _urls
188647
def links
      @links ||= @schema.links.map do |link|
        if link.method && link.href
          Link.new(link)
        end
      end.compact
    end
681376
def __process_url_wrapper_elements(self, elements):
        
        urls = ''
        for url_wrapper, articles in elements:
            urls += self.__create_url_node_for_content(
                url_wrapper,
                'others',
                url=urljoin(self.url_site, url_wrapper.url),
                modification_time=self.__get_date_key(sorted(articles, key=self.__get_date_key, reverse=True)[0])
            )
        return urls
846960
def get_all_hosts(resource_root, view=None):
  
  return call(resource_root.get, HOSTS_PATH, ApiHost, True,
          params=view and dict(view=view) or None)
1188120
def links(self):
        
        headers = self.headers or {}
        header = headers.get('link')
        li = {}
        if header:
            links = parse_header_links(header)
            for link in links:
                key = link.get('rel') or link.get('url')
                li[key] = link
        return li
816677
def _get_links(self, response):
        
        html_text = response.text.encode('utf-8')
        doc = document_fromstring(html_text)
        links = []
        for e in doc.cssselect('a'):
            links.append(e.get('href'))
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
249456
def _get_link_pages(page, per_page, count, page_url):
    # type: (int, int, int, str) -> Dict[str, str]
    
    current_page = _page_arg(page)
    links = {}
    end = page * per_page

    if page > 1:
        links['prev'] = page_url.replace(current_page, _page_arg(page - 1))

    if end < count:
        links['next'] = page_url.replace(current_page, _page_arg(page + 1))

    if per_page < count:
        links['first'] = page_url.replace(current_page, _page_arg(1))
        links['last'] = page_url.replace(current_page, _page_arg((count + per_page - 1) // per_page))

    return links
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
765072
def _make_links_from(self, body):
        ''''''
        ld = utils.CurieDict(self._core.default_curie, {})
        for rel, link in body.get('_links', {}).items():
            if rel != 'curies':
                if isinstance(link, list):
                    ld[rel] = utils.LinkList(
                        (self._navigator_or_thunk(lnk), lnk) for lnk in link)
                else:
                    ld[rel] = self._navigator_or_thunk(link)
        return ld
853319
function(href)
    {
        var _this = this;

        return Q.nfcall(request, href).then(function(data) {
            var $ = cheerio.load(data);

            var serviceName =
	            $('.collection')
		            .first()
		            .text()
		            .trim()
		            .replace(/\./g, '');
            var serviceDescription =
                $('h1').nextAll('p').first().text();

            _this.services.push(serviceName);

            var ret = {
                serviceName: serviceName,
                description: serviceDescription,
                methods: []
            };

            // Extract method information
            $('.full_method').each(function() {
                var $el         = $(this);
                var collection  = $el.find('.collection')
                    .text().replace('.','').trim();
                var method      = $el.find('.method').text().trim();
                var description = $el.nextAll('p').first().text();
                var $table      = $el.nextAll('table.table-striped').first();

                var methodInfo = {
                    name: method,
                    description: description,
                    params: []
                };

                // Fix for documentation not having api keys
                if (serviceName == 'DiscountService')
                    methodInfo.params.push('apiKey');

                // iterate over all the paramters
                $table.find('tbody tr').each(function() {
                    var td = $(this).find('td').first().text().trim();

                    if (td != 'Key' && td != 'privateKey' && td != 'key')
                        methodInfo.params.push(td);
                    else
                        methodInfo.params.push('apiKey');
                });

                ret.methods.push(methodInfo);
            });

            return ret;
        });
    }
74936
def join_all(self, *parts):
        
        url = util.join_all(self.domain, *parts)
        return url
426244
def links(tself, group=None):
    ''''''
    pr = ProviderRun(tself, group)
    pr.run()
    return mark_safe(pr.getvalue())