Bug 452546
| Summary: | No way to determine if session/connection is established | ||
|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Robert Rati <rrati> |
| Component: | python-qpid | Assignee: | Rafael H. Schloming <rafaels> |
| Status: | CLOSED ERRATA | QA Contact: | Frantisek Reznicek <freznice> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 1.0 | CC: | esammons, freznice, tross |
| Target Milestone: | 1.3 | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
The Messaging Client Python API now provides the connection.opened, connection.closed, and session.closed API calls, for programmatically determining when connections or sessions are open or closed.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-10-14 15:58:08 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
Robert Rati
2008-06-23 17:18:44 UTC
The feature was implemented to the python's low level API connection.opened connection.closed and session.closed tested on RHEL4.8 / 5.5 i386 / x86_64 on python-qpid-0.7.946106-14.el4/5 All above properties are functional. -> VERIFIED P.S. Python's high level API contains: connection.opened and session.closed Additional info (testing approach): [root@mrg-qe-03 ~]# python Python 2.3.4 (#1, Jul 16 2009, 07:03:37) [GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import qpid; >>> from qpid.connection import Connection; >>> from qpid.util import connect >>> from qpid.datatypes import Message, RangedSet, uuid4 >>> >>> def conn_stat (c): ... #print c; ... print c.opened; ... print c.closed; ... >>> def sess_stat (s): ... print s; ... print s.closed; ... >>> socket = None; >>> socket = connect('localhost', 5672); >>> connection = Connection(sock=socket); >>> conn_stat(connection); False False >>> connection.start(); >>> conn_stat(connection); True False >>> session = connection.session(str(uuid4())); >>> sess_stat(session); <Session: 64f90f0a-f9cc-764a-8230-7d4d5e1d5ba5, 127.0.0.1:46735[1]> <bound method Session.closed of <Session: 64f90f0a-f9cc-764a-8230-7d4d5e1d5ba5, 127.0.0.1:46735[1]>> >>> session.close(timeout=10); >>> sess_stat(session); <Session: 64f90f0a-f9cc-764a-8230-7d4d5e1d5ba5, None> <bound method Session.closed of <Session: 64f90f0a-f9cc-764a-8230-7d4d5e1d5ba5, None>> >>> connection.close(); >>> conn_stat(connection); False True >>>
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
The Messaging Client Python API now provides the connection.opened, connection.closed, and session.closed API calls, for programmatically determining when connections or sessions are open or closed.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0773.html |