def execute(self, http_method, path, params=None, data=None, headers=None):
        """Submit an HTTP request

        :param http_method: GET, POST, PUT, DELETE
        :param path: The path of the resource.
        :param params: Key-value parameter data.
        :param data: The data to attach to the body of the request.
        :param headers: The headers to set for this request.

        :return: The result of urllib.request.urlopen()
        """
        # Prepare URL and params
        url = self._make_url(path, params)
        if ("GET", "DELETE") in http_method:
            if data is not None:
                LOG.warning(_LW("{method} method does not pass any data. "
                                "Path {path}").format(method=http_method,
                                                      path=path))
                data = None

        # Setup the request
        request = urllib.request.Request(url, data)
        # Hack/workaround because urllib2 only does GET and POST
        request.get_method = lambda: http_method

        headers = self._get_headers(headers)
        for k, v in headers.items():
            request.add_header(k, v)

        # Call it
        LOG.debug("Method: {method}, URL: {url}".format(method=http_method,
                                                        url=url))
        try:
            return self._opener.open(request)
        except urllib.error.HTTPError as ex:
            message = six.text_type(ex)
            try:
                json_body = json.loads(message)
                message = json_body['message']
            except (ValueError, KeyError):
                pass    # Ignore json parsing error
            raise self._exc_class(message)
dataset/ETHPy150Open openstack/sahara/sahara/plugins/cdh/client/http_client.py/HttpClient.execute/swapped operands of `in`