Bug 507828 - unable add broker in python qmf with URL which contains password
unable add broker in python qmf with URL which contains password
Status: CLOSED NOTABUG
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid (Show other bugs)
1.1.1
All Linux
low Severity medium
: 1.3
: ---
Assigned To: Ted Ross
Martin Kudlej
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-24 09:02 EDT by Martin Kudlej
Modified: 2009-10-06 12:17 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-27 11:27:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Kudlej 2009-06-24 09:02:06 EDT
Description of problem:
Session.addBroker target could be "amqp://guest:guest@localhost:5672" acording http://qpid.apache.org/connection-url-format.html but if I try to run this short example, it doesn't work:
#!/usr/bin/env python

import qpid
from qmf.console import Session

try:
  qmf_session = Session();
  broker = qmf_session.addBroker("amqp://guest:guest@localhost:5672", 10);
except Exception, e:
  raise "Cannot connect to the broker. %s" % e

"amqp://localhost", "amqp://localhost:5672", "amqp://guest@localhost:5672" work fine.

Version-Release number of selected component (if applicable):
python-qpid-0.5.752581-3.el5

How reproducible:
100%

Steps to Reproduce:
Run example.
  
Actual results:
Example doesn't add broker to session.

Expected results:
Example adds broker to session.
Comment 1 Ted Ross 2009-08-25 17:35:13 EDT
The documentation link above refers to Java documentation, not Python.

I believe that these URL formats should be the same across languages.  Which should we use?  Is this a bug in the Python API or the Java documentation?
Comment 2 Ted Ross 2009-08-27 11:27:49 EDT
The format for passwords in the Python API calls for using a slash ('/') between the username and password, not a colon (':') as was tried.

The referenced documentation is for the Java API which has some differences, unfortunately including the URL format.

-Ted

Note You need to log in before you can comment on or make changes to this bug.