summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-02 12:58:42 +0000
committerGerrit Code Review <review@openstack.org>2017-06-02 12:58:42 +0000
commit8b44bfd5388dea0d6e2083c7a3502949fbe887d9 (patch)
tree04753a6c045cf6f828c5f206036fbe554cbc29c3
parentd46f3cfdf9697b736f777ebab7ccceda7994ec33 (diff)
parentc7d880c33a39f5d9a343931e288ad7bf3fa5cf13 (diff)
downloadoslo-messaging-8b44bfd5388dea0d6e2083c7a3502949fbe887d9.tar.gz
Merge "Clean up the TransportURL documentation"5.26.0
-rw-r--r--oslo_messaging/notify/notifier.py2
-rw-r--r--oslo_messaging/rpc/transport.py2
-rw-r--r--oslo_messaging/transport.py43
3 files changed, 38 insertions, 9 deletions
diff --git a/oslo_messaging/notify/notifier.py b/oslo_messaging/notify/notifier.py
index a544c7a..7774dea 100644
--- a/oslo_messaging/notify/notifier.py
+++ b/oslo_messaging/notify/notifier.py
@@ -158,7 +158,7 @@ def get_notification_transport(conf, url=None,
:param conf: the user configuration
:type conf: cfg.ConfigOpts
- :param url: a transport URL
+ :param url: a transport URL, see :py:class:`transport.TransportURL`
:type url: str or TransportURL
:param allowed_remote_exmods: a list of modules which a client using this
transport will deserialize remote exceptions
diff --git a/oslo_messaging/rpc/transport.py b/oslo_messaging/rpc/transport.py
index 06a7c38..e3abe32 100644
--- a/oslo_messaging/rpc/transport.py
+++ b/oslo_messaging/rpc/transport.py
@@ -36,7 +36,7 @@ def get_rpc_transport(conf, url=None,
:param conf: the user configuration
:type conf: cfg.ConfigOpts
- :param url: a transport URL
+ :param url: a transport URL, see :py:class:`transport.TransportURL`
:type url: str or TransportURL
:param allowed_remote_exmods: a list of modules which a client using this
transport will deserialize remote exceptions
diff --git a/oslo_messaging/transport.py b/oslo_messaging/transport.py
index 040cea7..f00c901 100644
--- a/oslo_messaging/transport.py
+++ b/oslo_messaging/transport.py
@@ -219,7 +219,7 @@ def get_transport(conf, url=None, allowed_remote_exmods=None, aliases=None):
:param conf: the user configuration
:type conf: cfg.ConfigOpts
- :param url: a transport URL
+ :param url: a transport URL, see :py:class:`transport.TransportURL`
:type url: str or TransportURL
:param allowed_remote_exmods: a list of modules which a client using this
transport will deserialize remote exceptions
@@ -267,12 +267,40 @@ class TransportURL(object):
Transport URLs take the form::
- transport://user:pass@host:port[,userN:passN@hostN:portN]/virtual_host?query
+ scheme://[user:pass@]host:port[,[userN:passN@]hostN:portN]/virtual_host?query
- i.e. the scheme selects the transport driver, you may include multiple
- hosts in netloc, the path part is a "virtual host" partition path and
- the query part contains some driver-specific options which may override
- corresponding values from a static configuration.
+ where:
+
+ scheme
+ Specifies the transport driver to use. Typically this is `rabbit` for the
+ RabbitMQ broker. See the documentation for other available transport
+ drivers.
+
+ [user:pass@]host:port
+ Specifies the network location of the broker. `user` and `pass` are the
+ optional username and password used for authentication with the broker.
+
+ `user` and `pass` may contain any of the following ASCII characters:
+ * Alphabetic (a-z and A-Z)
+ * Numeric (0-9)
+ * Special characters: & = $ - _ . + ! * ( )
+
+ `user` may include at most one `@` character for compatibility with some
+ implementations of SASL.
+
+ All other characters in `user` and `pass` must be encoded via '%nn'
+
+ You may include multiple different network locations separated by commas.
+ The client will connect to any of the available locations and will
+ automatically fail over to another should the connection fail.
+
+ virtual_host
+ Specifies the "virtual host" within the broker. Support for virtual hosts
+ is specific to the message bus used.
+
+ query
+ Permits passing driver-specific options which override the corresponding
+ values from the configuration file.
:param conf: a ConfigOpts instance
:type conf: oslo.config.cfg.ConfigOpts
@@ -402,7 +430,8 @@ class TransportURL(object):
'Parameter aliases is deprecated for removal.')
@classmethod
def parse(cls, conf, url=None, aliases=None):
- """Parse an url.
+ """Parse a URL as defined by :py:class:`TransportURL` and return a
+ TransportURL object.
Assuming a URL takes the form of::