From f74014a7dbec7ce3e28e8e1e1271a540c80bcce3 Mon Sep 17 00:00:00 2001
From: Oleksii Zamiatin <ozamiatin@mirantis.com>
Date: Wed, 29 Oct 2014 18:14:00 +0200
Subject: [PATCH] Documentation anomaly in TransportURL parse classmethod

The documentation for the classmethod `parse` states that

    The last parsed username and password will be propagated to the rest
    of hosts specified::
    user:pass@host1:port1,host2:port2
    [
    {"username": "user", "password": "pass", "host": "host1:port1"},
    {"username": "user", "password": "pass", "host": "host2:port2"}
    ]

However, in practice one needs to specify the usernames and passwords
individually with every host.

DocImpact: Documentation needs to be changed due anomaly in TransportURL
parse classmethod.

Change-Id: I1a9e07e0380a0d6f7d00731df93c9ba01ae20e0e
Closes-Bug: #1355684
---
 oslo/messaging/transport.py | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/oslo/messaging/transport.py b/oslo/messaging/transport.py
index 9c9844b06..dc820c093 100644
--- a/oslo/messaging/transport.py
+++ b/oslo/messaging/transport.py
@@ -340,25 +340,14 @@ class TransportURL(object):
         Netloc is parsed following the sequence bellow:
 
         * 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::
+        * Username and password should be specified for each host, in
+          case of lack of specification they will be omitted::
 
             user:pass@host1:port1,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"::
-
-            user:pass@host1:port1,:@host2:port2
-
-            [
-              {"username": "user", "password": "pass", "host": "host1:port1"},
-              {"username": "", "password": "", "host": "host2:port2"}
+              {"host": "host2:port2"}
             ]
 
         :param conf: a ConfigOpts instance