Actual main route of CTS APIs. Transfer typical requests through the ?request=REQUESTNAME route

        :return: Response
969569
def r_cts(self):
        
        _request = request.args.get("request", None)
        if _request is not None:
            try:
                if _request.lower() == "getcapabilities":
                    return self._get_capabilities(
                        urn=request.args.get("urn", None)
                    )
                elif _request.lower() == "getpassage":
                    return self._get_passage(
                        urn=request.args.get("urn", None)
                    )
                elif _request.lower() == "getpassageplus":
                    return self._get_passage_plus(
                        urn=request.args.get("urn", None)
                    )
                elif _request.lower() == "getlabel":
                    return self._get_label(
                        urn=request.args.get("urn", None)
                    )
                elif _request.lower() == "getfirsturn":
                    return self._get_first_urn(
                        urn=request.args.get("urn", None)
                    )
                elif _request.lower() == "getprevnexturn":
                    return self._get_prev_next(
                        urn=request.args.get("urn", None)
                    )
                elif _request.lower() == "getvalidreff":
                    return self._get_valid_reff(
                        urn=request.args.get("urn", None),
                        level=request.args.get("level", 1, type=int)
                    )
            except NautilusError as E:
                return self.cts_error(error_name=E.__class__.__name__, message=E.__doc__)
        return self.cts_error(MissingParameter.__name__, message=MissingParameter.__doc__)
121807
def get_url(self, routename, **kargs):
        
        scriptname = request.environ.get('SCRIPT_NAME', '').strip('/') + '/'
        location = self.router.build(routename, **kargs).lstrip('/')
        return urljoin(urljoin('/', scriptname), location)
1273996
def _route(self):
        '''  '''
        self._app.route('/',
                        method='GET',
                        callback=self._get_logger_list)
        self._app.route('/stats',
                        method='GET',
                        callback=self._fetch_handler_stats)
        self._app.route('/<name>/start',
                        method='POST',
                        callback=self._add_logger_by_name)
        self._app.route('/<name>/stop',
                        method='DELETE',
                        callback=self._stop_logger_by_name)
        self._app.route('/<name>/config',
                        method='GET',
                        callback=self._get_logger_conf)
        self._app.route('/<name>/rotate',
                        method='POST',
                        callback=self._rotate_capturer_log)
602292
def routing(name, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('routing', **{
        'name': name,
        'locator': ctx.locator,
    })
294652
def get(self, request):
        '''
        '''
        data = {}
        for router in self.routes:
            data[router.name] = request.absolute_uri(router.path())
        return Json(data).http_response(request)
352054
def request(self, url, method="GET", params=None, headers=None, is_signed=True):
        
        params = params or {}
        headers = headers or {}
        
        if is_signed:
            params.update(self.get_signing_params())
        
        if method.upper() == "GET":
            url = '%s?%s' % (url, urllib.urlencode(params))
            return self.client().request(url, method=method, headers=headers)
        return self.client().request(url, method, body=urllib.urlencode(params), headers=headers)
1048060
def route(self, environ, start_response):
        
        urls = self.url_map.bind_to_environ(environ)
        request = WsgiRequest(environ)
        try:
            endpoint, args = urls.match()
        except HTTPException as e:
            return self.error(e.code, request)(environ, start_response)
        else:
            procedure = getattr(self, endpoint)
            response = procedure(request, args)
            return response(environ, start_response)
649030
def request(self, action, data={}, headers={}, method='GET'):
        
        headers = {
            "Authorization": "Bearer " + self.token,
            "Content-Type": "application/json",
            "X-Version": "1",
            "Accept": "application/json"
        }

        return Transport.request(self, action, data, headers, method)
1156572
def access_route(self):
        
        if "HTTP_X_FORWARDED_FOR" in self.environ:
            addr = self.environ["HTTP_X_FORWARDED_FOR"].split(",")
            return self.list_storage_class([x.strip() for x in addr])
        elif "REMOTE_ADDR" in self.environ:
            return self.list_storage_class([self.environ["REMOTE_ADDR"]])
        return self.list_storage_class()
757916
def _route(self, attr, args, kwargs, **fkwargs):
        
        key = get_key(args, kwargs)

        return [crc32(str(key)) % len(self.cluster)]
293003
def _route(self, attr, args, kwargs, **fkwargs):
        
        return self.cluster.hosts.keys()
370705
def _assemble_and_send_request(self):
        

        client = self.client
        # Fire off the query.
        return client.service.track(
                WebAuthenticationDetail=self.WebAuthenticationDetail,
                ClientDetail=self.ClientDetail,
                TransactionDetail=self.TransactionDetail,
                Version=self.VersionId,
                SelectionDetails=self.SelectionDetails,
                ProcessingOptions=self.ProcessingOptions)
305198
def request(self, result_limit, result_start, filters=None, params=None):
        
        return self.tc_requests.request(
            self.api_type,
            self.api_sub_type,
            result_limit,
            result_start,
            owner=self.owner,
            filters=filters,
            params=params,
        )
731062
def get_requests_request_name(self, request_name):
        
        query_parameters = {}
        if request_name is not None:
            query_parameters['requestName'] = self._serialize.query('request_name', request_name, 'str')
        response = self._send(http_method='GET',
                              location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52',
                              version='5.0-preview.1',
                              query_parameters=query_parameters)
        return self._deserialize('Request', response)
1220670
def route(self, data):
        
        if isinstance(data, (dict, list)):
            requests = data
        else:
            requests = json.loads(data)
        if not isinstance(requests, list):
            requests = [requests]
        responses = []
        for request in requests:
            responses.append(self.call(request))
        if len(responses) == 1:
            return json.dumps(responses[0])
        return json.dumps(responses)
433424
def register_routes(self):
        
        routes = self.flatten_urls(self.urls)
        self.controllers = {}
        controller_names = set()

        for route in routes:
            cname = route['endpoint'].split('.')[0]
            controller_names.add(cname)

        for cname in controller_names:
            attr = getattr(self.mcontrollers, cname)
            instance = attr(request, response)
            self.controllers[cname] = instance

        for route in routes:
            cname, aname = route['endpoint'].split('.')
            action = getattr(self.controllers[cname], aname)
            self.wsgi.route(route['url'], route['methods'], action)
628381
def scope_url
      opts  = {}
      route = route(scope)
      opts[:format] = request_format unless skip_format?

      config = Rails.application.config

      # Monkey Patch
      if config.respond_to?(:relative_url_root) && config.relative_url_root.present?
        opts[:script_name] = config.relative_url_root
      end
      # EO Monkey Patch

      router_name = Devise.mappings[scope].router_name || Devise.available_router_name
      context = send(router_name)

      if context.respond_to?(route)
        context.send(route, opts)
      elsif respond_to?(:root_url)
        root_url(opts)
      else
        "/"
      end
    end