Include docstrings in published docs

Change-Id: Icdfb0535b26162d39c3af683b7729b5e834d89b9
This commit is contained in:
Mark McLoughlin 2013-07-10 09:31:45 +01:00
parent 3e8c891d67
commit 837aa03c43
10 changed files with 92 additions and 10 deletions

18
doc/source/exceptions.rst Normal file
View File

@ -0,0 +1,18 @@
----------
Exceptions
----------
.. currentmodule:: oslo.messaging
.. autoexception:: ClientSendError
.. autoexception:: DriverLoadFailure
.. autoexception:: ExecutorLoadFailure
.. autoexception:: InvalidTransportURL
.. autoexception:: MessagingException
.. autoexception:: MessagingTimeout
.. autoexception:: MessagingServerError
.. autoexception:: NoSuchMethod
.. autoexception:: RPCDispatcherError
.. autoexception:: RPCVersionCapError
.. autoexception:: ServerListenError
.. autoexception:: UnsupportedVersion

View File

@ -5,12 +5,18 @@ The Oslo messaging API supports RPC and notifications over a number of
different messsaging transports.
Contents
--------
========
.. toctree::
:maxdepth: 1
api/autoindex
transport
target
server
rpcclient
notifier
serializer
exceptions
Release Notes
=============

8
doc/source/notifier.rst Normal file
View File

@ -0,0 +1,8 @@
--------
Notifier
--------
.. currentmodule:: oslo.messaging
.. autoclass:: Notifier
:members:

8
doc/source/rpcclient.rst Normal file
View File

@ -0,0 +1,8 @@
----------
RPC Client
----------
.. currentmodule:: oslo.messaging
.. autoclass:: RPCClient
:members:

10
doc/source/serializer.rst Normal file
View File

@ -0,0 +1,10 @@
----------
Serializer
----------
.. currentmodule:: oslo.messaging
.. autoclass:: Serializer
:members:
.. autoclass:: NoOpSerializer

14
doc/source/server.rst Normal file
View File

@ -0,0 +1,14 @@
------
Server
------
.. automodule:: oslo.messaging.rpc.server
.. currentmodule:: oslo.messaging
.. autofunction:: get_rpc_server
.. autoclass:: RPCDispatcher
.. autoclass:: MessageHandlingServer
:members:

7
doc/source/target.rst Normal file
View File

@ -0,0 +1,7 @@
------
Target
------
.. currentmodule:: oslo.messaging
.. autoclass:: Target

11
doc/source/transport.rst Normal file
View File

@ -0,0 +1,11 @@
---------
Transport
---------
.. currentmodule:: oslo.messaging
.. autofunction:: get_transport
.. autoclass:: Transport
.. autofunction:: set_transport_defaults

View File

@ -13,11 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
__all__ = ['get_rpc_server']
from oslo.messaging.rpc import dispatcher as rpc_dispatcher
from oslo.messaging import server as msg_server
"""
An RPC server exposes a number of endpoints, each of which contain a set of
methods which may be invoked remotely by clients over a given transport.
@ -25,7 +20,7 @@ methods which may be invoked remotely by clients over a given transport.
To create an RPC server, you supply a transport, target and a list of
endpoints.
A transport can be obtained simply by calling the get_transport() method:
A transport can be obtained simply by calling the get_transport() method::
transport = messaging.get_transport(conf)
@ -48,7 +43,7 @@ complete.
An RPC server class is provided for each supported I/O handling framework.
Currently BlockingRPCServer and eventlet.RPCServer are available.
A simple example of an RPC server with multiple endpoints might be:
A simple example of an RPC server with multiple endpoints might be::
from oslo.config import cfg
from oslo import messaging
@ -94,6 +89,11 @@ return values from the methods. By supplying a serializer object, a server can
deserialize arguments from - serialize return values to - primitive types.
"""
__all__ = ['get_rpc_server']
from oslo.messaging.rpc import dispatcher as rpc_dispatcher
from oslo.messaging import server as msg_server
def get_rpc_server(transport, target, endpoints,
executor='blocking', serializer=None):

View File

@ -22,7 +22,7 @@ class Target(object):
should be sent or what messages a server is listening for.
Different subsets of the information encapsulated in a Target object is
relevant to various aspects of the API::
relevant to various aspects of the API:
creating a server:
topic and server is required; exchange is optional