summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/qpid/delegates.py6
-rw-r--r--python/qpid/messaging/driver.py5
-rw-r--r--python/qpid/messaging/endpoints.py1
3 files changed, 9 insertions, 3 deletions
diff --git a/python/qpid/delegates.py b/python/qpid/delegates.py
index 8dbdc37564..685cf49f54 100644
--- a/python/qpid/delegates.py
+++ b/python/qpid/delegates.py
@@ -159,7 +159,8 @@ class Client(Delegate):
def __init__(self, connection, username=None, password=None,
mechanism=None, heartbeat=None, **kwargs):
Delegate.__init__(self, connection)
-
+ self.client_properties=Client.PROPERTIES.copy()
+ self.client_properties.update(kwargs.get("client_properties",{}))
##
## self.acceptableMechanisms is the list of SASL mechanisms that the client is willing to
## use. If it's None, then any mechanism is acceptable.
@@ -215,7 +216,8 @@ class Client(Delegate):
mech = "ANONYMOUS"
if not mech in mech_list:
raise Closed("No acceptable SASL authentication mechanism available")
- ch.connection_start_ok(client_properties=Client.PROPERTIES, mechanism=mech, response=initial)
+ ch.connection_start_ok(client_properties=self.client_properties,
+ mechanism=mech, response=initial)
def connection_secure(self, ch, secure):
resp = None
diff --git a/python/qpid/messaging/driver.py b/python/qpid/messaging/driver.py
index dda5e38a61..0358659111 100644
--- a/python/qpid/messaging/driver.py
+++ b/python/qpid/messaging/driver.py
@@ -705,7 +705,10 @@ class Engine:
mech, initial = self._sasl.start(" ".join(mechs))
except sasl.SASLError, e:
raise AuthenticationFailure(text=str(e))
- self.write_op(ConnectionStartOk(client_properties=CLIENT_PROPERTIES,
+
+ client_properties = CLIENT_PROPERTIES.copy()
+ client_properties.update(self.connection.client_properties)
+ self.write_op(ConnectionStartOk(client_properties=client_properties,
mechanism=mech, response=initial))
def do_connection_secure(self, secure):
diff --git a/python/qpid/messaging/endpoints.py b/python/qpid/messaging/endpoints.py
index faa382a755..e632c0c5b8 100644
--- a/python/qpid/messaging/endpoints.py
+++ b/python/qpid/messaging/endpoints.py
@@ -170,6 +170,7 @@ class Connection(Endpoint):
self.ssl_keyfile = options.get("ssl_keyfile", None)
self.ssl_certfile = options.get("ssl_certfile", None)
self.ssl_trustfile = options.get("ssl_trustfile", None)
+ self.client_properties = options.get("client_properties", {})
self.options = options