Beispiel #1
0
    def _get_transport(self, request):
        """Gets a transport and caches its instance

        This method gets a transport instance based on
        the request's endpoint and caches that for later
        use. The transport instance is invalidated whenever
        a session expires.

        :param request: The request to use to load the
            transport instance.
        :type request: `transport.request.Request`
        """

        trans = transport.get_transport_for(request,
                                            options=self.conf)
        return (trans or self.transport)
Beispiel #2
0
    def _get_transport(self, request):
        """Gets a transport and caches its instance

        This method gets a transport instance based on
        the request's endpoint and caches that for later
        use. The transport instance is invalidated whenever
        a session expires.

        :param request: The request to use to load the
            transport instance.
        :type request: `transport.request.Request`
        """

        trans = transport.get_transport_for(request,
                                            options=self.conf)
        return (trans or self.transport)
Beispiel #3
0
 def transport(self):
     """Gets a transport based the api url and version."""
     return transport.get_transport_for(self.api_url,
                                        self.api_version)
Beispiel #4
0
 def transport(self):
     """Gets a transport based the api url and version."""
     return transport.get_transport_for(self.api_url,
                                        self.api_version)