Merge "Wrap lines at the appropriate length and use native sphinx constructs"

This commit is contained in:
Jenkins 2014-05-28 19:18:50 +00:00 committed by Gerrit Code Review
commit 56635b082a

@ -1,15 +1,16 @@
Transport Transport
========= =========
Class ``openstack.transport.Transport`` is a subclass of ``requests.Session`` that Class ``openstack.transport.Transport`` is a subclass of ``requests.Session``
adds some features that are common in OpenStack APIs or can be globally controlled that adds some features that are common in OpenStack APIs or can be globally
by an application. Its use is incredibly similar to ``requests.Session`` such controlled by an application. Its use is incredibly similar to
that we only will cover the differences in detail here. ``requests.Session`` such that we only will cover the differences in detail
here.
Transport object Transport object
---------------- ----------------
Class ``openstack.transport.Transport(user_agent=None, verify=True, redirect=DEFAULT_REDIRECT_LIMIT, ...)`` .. class:: openstack.transport.Transport(user_agent=None, verify=True, redirect=DEFAULT_REDIRECT_LIMIT)
Create a new ``Transport`` object. In addition to those listed below, all Create a new ``Transport`` object. In addition to those listed below, all
arguments available to ``requests.Session`` are available here: arguments available to ``requests.Session`` are available here:
@ -23,13 +24,15 @@ arguments available to ``requests.Session`` are available here:
Method ``Transport.request(method, url, redirect=None, **kwargs)`` Method ``Transport.request(method, url, redirect=None, **kwargs)``
Perform an HTTP request. The following arguments differ from ``requests.Session``: Perform an HTTP request. The following arguments differ from
``requests.Session``:
* redirect - (integer) The maximum number of redirections followed in a request. * redirect - (integer) The maximum number of redirections followed in a
(boolean) No redirections if False, ``requests.Session`` handles redirection request. (boolean) No redirections if False, ``requests.Session`` handles
if True. (default: ``openstack.transport.DEFAULT_REDIRECT_LIMIT``) redirection if True. (default:
* json - Request body to be encoded as JSON. Overwrites ``data`` argument if present. ``openstack.transport.DEFAULT_REDIRECT_LIMIT``)
(default: ``None``) * json - Request body to be encoded as JSON. Overwrites ``data`` argument if
present. (default: ``None``)
* user_agent - Set the default ``User-Agent`` header (default: ``None``) * user_agent - Set the default ``User-Agent`` header (default: ``None``)
Examples Examples
@ -108,5 +111,6 @@ the ``User-Agent`` header is as follows:
* If the ``user_agent`` argument is included in the ``request()`` call use it * If the ``user_agent`` argument is included in the ``request()`` call use it
* Else if ``User-Agent`` is set in the headers dict use it * Else if ``User-Agent`` is set in the headers dict use it
* Else if ``user_agent`` argument is included in the ``Transport`` construction use it * Else if ``user_agent`` argument is included in the ``Transport`` construction
use it
* Else use ``transport.DEFAULT_USER_AGENT`` * Else use ``transport.DEFAULT_USER_AGENT``