diff --git a/oslo_messaging/notify/notifier.py b/oslo_messaging/notify/notifier.py index af42569d8..1840d559a 100644 --- a/oslo_messaging/notify/notifier.py +++ b/oslo_messaging/notify/notifier.py @@ -138,6 +138,31 @@ class Driver(object): def get_notification_transport(conf, url=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, group='oslo_messaging_notifications') if url is None: