Merge "Fix formatting of TransportURL.parse() docs"

This commit is contained in:
Jenkins 2014-06-27 22:36:04 +00:00 committed by Gerrit Code Review
commit 944b947fb8
1 changed files with 13 additions and 13 deletions

View File

@ -331,7 +331,7 @@ class TransportURL(object):
def parse(cls, conf, url, aliases=None):
"""Parse an url.
Assuming a URL takes the form of:
Assuming a URL takes the form of::
transport://user:pass@host1:port[,hostN:portN]/virtual_host
@ -341,25 +341,25 @@ class TransportURL(object):
* It is first split by ',' in order to support multiple hosts
* The last parsed username and password will be propagated to the rest
of hosts specified:
of hosts specified::
user:passwd@host1:port1,host2:port2
user:pass@host1:port1,host2:port2
[
{"username": "user", "password": "passwd", "host": "host1:port1"},
{"username": "user", "password": "passwd", "host": "host2:port2"}
]
[
{"username": "user", "password": "pass", "host": "host1:port1"},
{"username": "user", "password": "pass", "host": "host2:port2"}
]
* In order to avoid the above propagation, it is possible to alter the
order in which the hosts are specified or specify a set of fake
credentials using ",:@host2:port2"
credentials using ",:@host2:port2"::
user:passwd@host1:port1,:@host2:port2
user:pass@host1:port1,:@host2:port2
[
{"username": "user", "password": "passwd", "host": "host1:port1"},
{"username": "", "password": "", "host": "host2:port2"}
]
[
{"username": "user", "password": "pass", "host": "host1:port1"},
{"username": "", "password": "", "host": "host2:port2"}
]
:param conf: a ConfigOpts instance
:type conf: oslo.config.cfg.ConfigOpts