Update extra_headers param docstring
extra_headers is a boolean value that indicates if headers should
be updated by get_headers() or not.
Remove unnecessary copy operation.
Change-Id: If6b37879b7d0af960765159db369a32dff481aef
diff --git a/tempest/lib/common/rest_client.py b/tempest/lib/common/rest_client.py
index 7d2eda0..d001d27 100644
--- a/tempest/lib/common/rest_client.py
+++ b/tempest/lib/common/rest_client.py
@@ -248,10 +248,10 @@
:param str url: the relative url to send the post request to
:param dict body: the request body
:param dict headers: The headers to use for the request
- :param dict extra_headers: If the headers returned by the get_headers()
- method are to be used but additional headers
- are needed in the request pass them in as a
- dict
+ :param bool extra_headers: Boolean value than indicates if the headers
+ returned by the get_headers() method are to
+ be used but additional headers are needed in
+ the request pass them in as a dict.
:return: a tuple with the first entry containing the response headers
and the second the response body
:rtype: tuple
@@ -263,10 +263,10 @@
:param str url: the relative url to send the post request to
:param dict headers: The headers to use for the request
- :param dict extra_headers: If the headers returned by the get_headers()
- method are to be used but additional headers
- are needed in the request pass them in as a
- dict
+ :param bool extra_headers: Boolean value than indicates if the headers
+ returned by the get_headers() method are to
+ be used but additional headers are needed in
+ the request pass them in as a dict.
:return: a tuple with the first entry containing the response headers
and the second the response body
:rtype: tuple
@@ -279,10 +279,10 @@
:param str url: the relative url to send the post request to
:param dict headers: The headers to use for the request
:param dict body: the request body
- :param dict extra_headers: If the headers returned by the get_headers()
- method are to be used but additional headers
- are needed in the request pass them in as a
- dict
+ :param bool extra_headers: Boolean value than indicates if the headers
+ returned by the get_headers() method are to
+ be used but additional headers are needed in
+ the request pass them in as a dict.
:return: a tuple with the first entry containing the response headers
and the second the response body
:rtype: tuple
@@ -295,10 +295,10 @@
:param str url: the relative url to send the post request to
:param dict body: the request body
:param dict headers: The headers to use for the request
- :param dict extra_headers: If the headers returned by the get_headers()
- method are to be used but additional headers
- are needed in the request pass them in as a
- dict
+ :param bool extra_headers: Boolean value than indicates if the headers
+ returned by the get_headers() method are to
+ be used but additional headers are needed in
+ the request pass them in as a dict.
:return: a tuple with the first entry containing the response headers
and the second the response body
:rtype: tuple
@@ -311,10 +311,10 @@
:param str url: the relative url to send the post request to
:param dict body: the request body
:param dict headers: The headers to use for the request
- :param dict extra_headers: If the headers returned by the get_headers()
- method are to be used but additional headers
- are needed in the request pass them in as a
- dict
+ :param bool extra_headers: Boolean value than indicates if the headers
+ returned by the get_headers() method are to
+ be used but additional headers are needed in
+ the request pass them in as a dict.
:return: a tuple with the first entry containing the response headers
and the second the response body
:rtype: tuple
@@ -326,10 +326,10 @@
:param str url: the relative url to send the post request to
:param dict headers: The headers to use for the request
- :param dict extra_headers: If the headers returned by the get_headers()
- method are to be used but additional headers
- are needed in the request pass them in as a
- dict
+ :param bool extra_headers: Boolean value than indicates if the headers
+ returned by the get_headers() method are to
+ be used but additional headers are needed in
+ the request pass them in as a dict.
:return: a tuple with the first entry containing the response headers
and the second the response body
:rtype: tuple
@@ -341,10 +341,10 @@
:param str url: the relative url to send the post request to
:param dict headers: The headers to use for the request
- :param dict extra_headers: If the headers returned by the get_headers()
- method are to be used but additional headers
- are needed in the request pass them in as a
- dict
+ :param bool extra_headers: Boolean value than indicates if the headers
+ returned by the get_headers() method are to
+ be used but additional headers are needed in
+ the request pass them in as a dict.
:return: a tuple with the first entry containing the response headers
and the second the response body
:rtype: tuple
@@ -576,10 +576,10 @@
:param str method: The HTTP verb to use for the request
:param str url: Relative url to send the request to
- :param dict extra_headers: If specified without the headers kwarg the
- headers sent with the request will be the
- combination from the get_headers() method
- and this kwarg
+ :param bool extra_headers: Boolean value than indicates if the headers
+ returned by the get_headers() method are to
+ be used but additional headers are needed in
+ the request pass them in as a dict.
:param dict headers: Headers to use for the request if none are
specifed the headers returned from the
get_headers() method are used. If the request
@@ -620,7 +620,6 @@
headers = self.get_headers()
elif extra_headers:
try:
- headers = headers.copy()
headers.update(self.get_headers())
except (ValueError, TypeError):
headers = self.get_headers()