Bug 430114

Summary: AMQP XML path hard coded in python examples.
Product: Red Hat Enterprise MRG Reporter: Alan Conway <aconway>
Component: python-qpidAssignee: Rafael H. Schloming <rafaels>
Status: CLOSED CURRENTRELEASE QA Contact: Kim van der Riet <kim.vdriet>
Severity: low Docs Contact:
Priority: low    
Version: betaCC: iboverma, mkudlej, tross
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-21 16:53:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alan Conway 2008-01-24 16:38:28 UTC
Description of problem:


The python examples hard-code the spec location like this:

amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"

This is ugly. Customers should not even have to know of the existence of the XML
file, and hard coding it makes it impossible to run clients if qpid is installed
anywhere other than /usr/share/amqp (e.g. it could be in /usr/local/share)

I'd suggest that the spec file should not be specified at all in code, but
should be defaulted from
 - An environment variable (useful for us and others testing in a mulit-qpid
environment)
 - The python search path: our installer can substitute the actual installed
location in a small .py file that gets installed on the standard python path.
 - /usr/share/amqp if nothing else works.

Comment 1 Alan Conway 2008-02-12 20:42:38 UTC
This also prevents us correctly automating python example interop tests.
Currently they work only if amqp.xml is installed in the hard coded
/usr/share... location.

Comment 2 Alan Conway 2008-05-16 15:32:32 UTC
rafaels made the required change to the python client, I removed the
redundant code from the demos.

Comment 4 Martin Kudlej 2009-04-22 08:51:43 UTC
Tested on RHEL 5.3 i386/x86_64 python-qpid-0.5.752581-1.el5

I moved /usr/share/amqp/ to /root/amqp, I changed configuration of /usr/lib/python2.4/site-packages/qpid_config.py and /usr/lib/python2.4/site-packages/qpid/qpid_config.py and I removed *.pyo and *.pyc files. All rhm-docs tests worked fine with this changed configuration. -->VERIFIED