Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 587671

Summary: qpid python client (low level api) "Connection instance has no attribute 'spec'"
Product: Red Hat Enterprise MRG Reporter: Frantisek Reznicek <freznice>
Component: python-qpidAssignee: Rafael H. Schloming <rafaels>
Status: CLOSED CURRENTRELEASE QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: DevelopmentCC: esammons, gsim, jross, tross
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-14 18:01:18 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:
Bug Depends On: 600256    
Bug Blocks:    
Attachments:
Description Flags
The testing client (functional on qpid 0.5 version) none

Description Frantisek Reznicek 2010-04-30 14:15:19 UTC
Created attachment 410489 [details]
The testing client (functional on qpid 0.5 version)

Description of problem:

There is observed change in the python low level API between last stable (0.5 qpid release) and current (qpid 0.7 candidate)

Python code snippet:

  if host is None:
      host = "localhost"

  self.sessionID = "rhts_%s.%d_%s_{%s}" % \
              (os.uname()[1], os.getpid(), sid, str(time.localtime()))
  self.conn = Connection( connect(host, port),
                          username=uname, password = passwd )
  # starting connection with timeout
  self.conn.start(timeout=self.timeout)
  # creating session with timeout
  #self.session = self.conn.session(self.sessionID)
  self.session = self.conn.session(name=self.sessionID, timeout=self.timeout)
>>self.mclient = managementClient(self.conn.spec)
  self.mchannel = self.mclient.addChannel(self.session)


Causes following Attribute Error:
Traceback (most recent call last):
  File "bz456272.py", line 125, in ?
    aq.append(AddQueue(i, quid[i]))
  File "bz456272.py", line 42, in __init__
    self.mgr.Connect("localhost", 5672, sid=id)
  File "rhtslib_management.py", line 55, in Connect
    self.mclient = managementClient(self.conn.spec)
AttributeError: Connection instance has no attribute 'spec'

Questions:
1] Could you evaluate the change effect on existing code around (the world)
   and summarize that this change is intended, please?
2] Could you review whether release note will be necessary if change is intended, please?
3] Could you suggest workaround for existing application[s], please?



Version-Release number of selected component (if applicable):
python-qpid-0.7.934605-1.el5
qpid-cpp-client-0.7.935473-1.el5
qpid-cpp-client-devel-0.7.935473-1.el5
qpid-cpp-client-devel-docs-0.7.935473-1.el5
qpid-cpp-client-ssl-0.7.935473-1.el5
qpid-cpp-mrg-debuginfo-0.7.929717-1.el5
qpid-cpp-server-0.7.935473-1.el5
qpid-cpp-server-cluster-0.7.935473-1.el5
qpid-cpp-server-devel-0.7.935473-1.el5
qpid-cpp-server-ssl-0.7.935473-1.el5
qpid-cpp-server-store-0.7.935473-1.el5
qpid-cpp-server-xml-0.7.935473-1.el5
qpid-java-client-0.7.934605-1.el5
qpid-java-common-0.7.934605-1.el5
qpid-tools-0.7.934605-2.el5


How reproducible:
100%

Steps to Reproduce:
1. run broker
2. launch the attached client against the broker
3. see the Attribute error
  
Actual results:
Client does not run, because of slight change in the API.

Expected results:
Client should run (modified or untouched depends on issue review done by devel).

Additional info:

Comment 1 Rafael H. Schloming 2010-05-07 14:52:49 UTC
This is a deliberate change, you can't customize what spec is used anymore. I believe this should work if you simply don't pass the spec to managementClient, i.e. use managementClient() instead.

We should definitely release note this.

Comment 2 Frantisek Reznicek 2010-05-11 08:41:24 UTC
I confirm that suggested change
 - self.mclient = managementClient(self.conn.spec)
 + self.mclient = managementClient()
is currently working on RHEL 4.8 / 5.5 i386 / x86_64 on package set listed above.

I'm keeping bug in it's state, presence of appropriate note in MRG release note is then enough to put in VERI, because as described in above post change is intended.

Comment 3 Gordon Sim 2010-06-04 09:53:57 UTC
BZ raised for release note: https://bugzilla.redhat.com/show_bug.cgi?id=600256