Add docstring for get_notification_transport
This was previously undocumented. Most of the information was taken from the docstring for get_transport Change-Id: I92652f4de9dd1e59ae5c3f9ce39e5ee808f24c7d
This commit is contained in:
parent
4eef58c5d8
commit
a011cb2448
@ -138,6 +138,31 @@ class Driver(object):
|
|||||||
|
|
||||||
def get_notification_transport(conf, url=None,
|
def get_notification_transport(conf, url=None,
|
||||||
allowed_remote_exmods=None, aliases=None):
|
allowed_remote_exmods=None, aliases=None):
|
||||||
|
"""A factory method for Transport objects for notifications.
|
||||||
|
|
||||||
|
This method should be used for notifications, in case notifications are
|
||||||
|
being sent over a different message bus than normal messaging
|
||||||
|
functionality; for example, using a different driver, or with different
|
||||||
|
access permissions.
|
||||||
|
|
||||||
|
If no transport URL is provided, the URL in the notifications section of
|
||||||
|
the config file will be used. If that URL is also absent, the same
|
||||||
|
transport as specified in the messaging section will be used.
|
||||||
|
|
||||||
|
If a transport URL is provided, then this function works exactly the same
|
||||||
|
as get_transport.
|
||||||
|
|
||||||
|
:param conf: the user configuration
|
||||||
|
:type conf: cfg.ConfigOpts
|
||||||
|
:param url: a transport URL
|
||||||
|
:type url: str or TransportURL
|
||||||
|
:param allowed_remote_exmods: a list of modules which a client using this
|
||||||
|
transport will deserialize remote exceptions
|
||||||
|
from
|
||||||
|
:type allowed_remote_exmods: list
|
||||||
|
:param aliases: A map of transport alias to transport name
|
||||||
|
:type aliases: dict
|
||||||
|
"""
|
||||||
conf.register_opts(_notifier_opts,
|
conf.register_opts(_notifier_opts,
|
||||||
group='oslo_messaging_notifications')
|
group='oslo_messaging_notifications')
|
||||||
if url is None:
|
if url is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user