Fix formatting of TransportURL.parse() docs

Change-Id: I0b2cf7b1e76bd9151957ddaaaaca8d9e11cf1ed5
This commit is contained in:
Mark McLoughlin 2014-06-26 06:50:56 +01:00
parent 3f9fc44bc6
commit da2abaaa06
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