Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1090022

Summary: [Selectors] Python client does not support selectors
Product: Red Hat Enterprise MRG Reporter: Zdenek Kraus <zkraus>
Component: python-qpidAssignee: Ernie <eallen>
Status: NEW --- QA Contact: Messaging QE <messaging-qe-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 3.0CC: gsim, iboverma, jross, mcressma
Target Milestone: 3.3Keywords: Improvement
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Zdenek Kraus 2014-04-22 12:06:25 UTC
Description of problem:
When selectors are supplied to python client, it fails with illegal key.


Version-Release number of selected component (if applicable):
python-qpid-0.22-13.el6

How reproducible:
100%


Steps to Reproduce:
1. ./drain "q;{create:always, link:{selector:\"a = TRUE\"}}"


Actual results:
[1]
Traceback (most recent call last):
  File "./drain", line 81, in <module>
    rcv = ssn.receiver(addr)
  File "<string>", line 6, in receiver
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 633, in receiver
    raise e
qpid.messaging.exceptions.InvalidOption: error in options: link: selector: illegal key

Expected results:
[1]
selector will be applied in broker

Additional info:

Comment 1 Gordon Sim 2014-04-22 19:39:30 UTC
Though the python client doesn't support the 'shortcut' form, you can still specify it as a value for 'x-apache-selector' in the arguments for x-subscribe, e.g.

  ./drain "q;{create:always, link:{x-subscribe:{arguments:{'x-apache-selector':\"a = TRUE\"}}}}"

Comment 2 Zdenek Kraus 2014-04-23 05:18:05 UTC
Thank you, I will run tests with the 'x-apache-selector', but I really would like to have all clients use the same simple name 'selector', and IMO also others would like it too as well. We should keep it so unified as it could be.