summaryrefslogtreecommitdiffstats
path: root/ansible_collections/splunk/es/plugins/httpapi/splunk.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:22 +0000
commit38b7c80217c4e72b1d8988eb1e60bb6e77334114 (patch)
tree356e9fd3762877d07cde52d21e77070aeff7e789 /ansible_collections/splunk/es/plugins/httpapi/splunk.py
parentAdding upstream version 7.7.0+dfsg. (diff)
downloadansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.tar.xz
ansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.zip
Adding upstream version 9.4.0+dfsg.upstream/9.4.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/splunk/es/plugins/httpapi/splunk.py')
-rw-r--r--ansible_collections/splunk/es/plugins/httpapi/splunk.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/ansible_collections/splunk/es/plugins/httpapi/splunk.py b/ansible_collections/splunk/es/plugins/httpapi/splunk.py
index 91f079e06..095a7b71c 100644
--- a/ansible_collections/splunk/es/plugins/httpapi/splunk.py
+++ b/ansible_collections/splunk/es/plugins/httpapi/splunk.py
@@ -3,6 +3,7 @@
from __future__ import absolute_import, division, print_function
+
__metaclass__ = type
DOCUMENTATION = """
@@ -18,13 +19,12 @@ version_added: "1.0.0"
import json
-from ansible.module_utils.basic import to_text
from ansible.errors import AnsibleConnectionFailure
-from ansible.module_utils.six.moves.urllib.error import HTTPError
-from ansible_collections.ansible.netcommon.plugins.plugin_utils.httpapi_base import (
- HttpApiBase,
-)
+from ansible.module_utils.basic import to_text
from ansible.module_utils.connection import ConnectionError
+from ansible.module_utils.six.moves.urllib.error import HTTPError
+from ansible_collections.ansible.netcommon.plugins.plugin_utils.httpapi_base import HttpApiBase
+
BASE_HEADERS = {"Content-Type": "application/json"}
@@ -47,7 +47,8 @@ class HttpApi(HttpApiBase):
return response.getcode(), self._response_to_json(value)
except AnsibleConnectionFailure as e:
self.connection.queue_message(
- "vvv", "AnsibleConnectionFailure: %s" % e
+ "vvv",
+ "AnsibleConnectionFailure: %s" % e,
)
if to_text("Could not connect to") in to_text(e):
raise
@@ -62,8 +63,7 @@ class HttpApi(HttpApiBase):
def _display_request(self, request_method, path):
self.connection.queue_message(
"vvvv",
- "Web Services: %s %s/%s"
- % (request_method, self.connection._url, path),
+ "Web Services: %s %s/%s" % (request_method, self.connection._url, path),
)
def _get_response_value(self, response_data):