Documentation anomaly in TransportURL parse classmethod

Bug #1355684 reported by RedBaron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.messaging
Fix Released
Low
Oleksii Zamiatin

Bug Description

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. Otherwise no authentication credentials are set for that host. The test cases in the test_url.py file are also written keeping that behaviour in mind.

>>> TransportURL.parse(oslo.config.cfg.ConfigOpts(),"rabbit://admin:pass@127.0.0.1:5672,127.0.0.2:5672//")
<TransportURL transport='rabbit', virtual_host='/', hosts=[<TransportHost hostname='127.0.0.1', port=5672, username='admin', password='pass'>, <TransportHost hostname='127.0.0.2', port=5672>]>

>>> TransportURL.parse(oslo.config.cfg.ConfigOpts(),"rabbit://admin:pass@127.0.0.1:5672,admin:pass@127.0.0.2:5672//")
<TransportURL transport='rabbit', virtual_host='/', hosts=[<TransportHost hostname='127.0.0.1', port=5672, username='admin', password='pass'>, <TransportHost hostname='127.0.0.2', port=5672, username='admin', password='pass'>]>

One out of code+tests or documentation needs to be changed.

Tags: docs
description: updated
summary: - Documentation anomaly in TranportURL parse classmethod
+ Documentation anomaly in TransportURL parse classmethod
Changed in oslo.messaging:
importance: Undecided → Low
status: New → Confirmed
Changed in oslo.messaging:
assignee: nobody → Oleksii Zamiatin (ozamiatin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

Fix proposed to branch: master
Review: https://review.openstack.org/131812

Changed in oslo.messaging:
status: Confirmed → In Progress
Revision history for this message
Oleksii Zamiatin (ozamiatin) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/131812
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=f74014a7dbec7ce3e28e8e1e1271a540c80bcce3
Submitter: Jenkins
Branch: master

commit f74014a7dbec7ce3e28e8e1e1271a540c80bcce3
Author: Oleksii Zamiatin <email address hidden>
Date: Wed Oct 29 18:14:00 2014 +0200

    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

Changed in oslo.messaging:
status: In Progress → Fix Committed
Mehdi Abaakouk (sileht)
Changed in oslo.messaging:
milestone: none → 1.5.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.