Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 587671 - qpid python client (low level api) "Connection instance has no attribute 'spec'"
qpid python client (low level api) "Connection instance has no attribute 'spec'"
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid (Show other bugs)
All Linux
high Severity medium
: 1.3
: ---
Assigned To: Rafael H. Schloming
MRG Quality Engineering
Depends On: 600256
  Show dependency treegraph
Reported: 2010-04-30 10:15 EDT by Frantisek Reznicek
Modified: 2015-11-15 20:12 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-07-14 14:01:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
The testing client (functional on qpid 0.5 version) (2.84 KB, application/x-tbz)
2010-04-30 10:15 EDT, Frantisek Reznicek
no flags Details

  None (edit)
Description Frantisek Reznicek 2010-04-30 10:15:19 EDT
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
  # 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'

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):

How reproducible:

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 10:52:49 EDT
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 04:41:24 EDT
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 05:53:57 EDT
BZ raised for release note: https://bugzilla.redhat.com/show_bug.cgi?id=600256

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