def do_request(self, method, action, body=None,
                   headers=None, params=None):

        # Ensure we have a tenant id
        if not self.tenant:
            raise Exception(_("Tenant ID not set"))

        # Add format and tenant_id
        action += ".%s" % self.format
        action = Client.action_prefix + action
        action = action.replace('{tenant_id}', self.tenant)

        if type(params) is dict:
            action += '?' + urllib.urlencode(params)

        try:
            connection_type = self.get_connection_type()
            headers = headers or {"Content-Type":
                                      "application/%s" % self.format}

            # Open connection and send request, handling SSL certs
            certs = {'key_file': self.key_file, 'cert_file': self.cert_file}
            certs = dict((x, certs[x]) for x in certs if certs[x] != None)

            if self.use_ssl and len(certs):
                c = connection_type(self.host, self.port, **certs)
            else:
                c = connection_type(self.host, self.port)

            if self.logger:
                self.logger.debug(
                    _("Quantum Client Request:\n%(method)s %(action)s\n" %
                                    locals()))
                if body:
                    self.logger.debug(body)

            c.request(method, action, body, headers)
            res = c.getresponse()
            status_code = self.get_status_code(res)
            data = res.read()

            if self.logger:
                self.logger.debug("Quantum Client Reply (code = %s) :\n %s" \
                        % (str(status_code), data))

            if status_code == httplib.NOT_FOUND:
                raise QuantumNotFoundException(
                    _("Quantum entity not found: %s" % data))

            if status_code in (httplib.OK,
                               httplib.CREATED,
                               httplib.ACCEPTED,
                               httplib.NO_CONTENT):
                if data is not None and len(data):
                    return self.deserialize(data, status_code)
            else:
                raise QuantumServerException(
                      _("Server %(status_code)s error: %(data)s"
                                        % locals()))

        except (socket.error, IOError), e:
            raise QuantumIOException(_("Unable to connect to "
                              "server. Got error: %s" % e))
Sets the left table for this join clause. If no table is specified, the first table
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/network/quantum/client.py/Client.do_request--crossover with--dataset/ETHPy150Open ambitioninc/django-query-builder/querybuilder/query.py/Join.set_left_table