diff options
Diffstat (limited to 'extras')
-rwxr-xr-x | extras/qmf/setup.py | 4 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf/console.py | 55 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/__init__.py (renamed from extras/qmf/src/py/qmf2/__init__.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/agent.py (renamed from extras/qmf/src/py/qmf2/agent.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/common.py (renamed from extras/qmf/src/py/qmf2/common.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/console.py (renamed from extras/qmf/src/py/qmf2/console.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/__init__.py (renamed from extras/qmf/src/py/qmf2/tests/__init__.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/agent_discovery.py (renamed from extras/qmf/src/py/qmf2/tests/agent_discovery.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/agent_test.py (renamed from extras/qmf/src/py/qmf2/tests/agent_test.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/async_method.py (renamed from extras/qmf/src/py/qmf2/tests/async_method.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/async_query.py (renamed from extras/qmf/src/py/qmf2/tests/async_query.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/basic_method.py (renamed from extras/qmf/src/py/qmf2/tests/basic_method.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/basic_query.py (renamed from extras/qmf/src/py/qmf2/tests/basic_query.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/console_test.py (renamed from extras/qmf/src/py/qmf2/tests/console_test.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/events.py (renamed from extras/qmf/src/py/qmf2/tests/events.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/multi_response.py (renamed from extras/qmf/src/py/qmf2/tests/multi_response.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/obj_gets.py (renamed from extras/qmf/src/py/qmf2/tests/obj_gets.py) | 0 | ||||
-rw-r--r-- | extras/qmf/src/py/qmf2-prototype/tests/subscriptions.py (renamed from extras/qmf/src/py/qmf2/tests/subscriptions.py) | 0 | ||||
-rwxr-xr-x | extras/sasl/bootstrap | 2 | ||||
-rw-r--r-- | extras/sasl/configure.ac | 1 | ||||
-rw-r--r-- | extras/sasl/python/Makefile.am | 3 | ||||
-rw-r--r-- | extras/sasl/ruby/Makefile.am | 2 | ||||
-rw-r--r-- | extras/sasl/src/Makefile.am | 1 |
23 files changed, 45 insertions, 23 deletions
diff --git a/extras/qmf/setup.py b/extras/qmf/setup.py index 2e3ec7a38e..ae35c42375 100755 --- a/extras/qmf/setup.py +++ b/extras/qmf/setup.py @@ -20,10 +20,10 @@ from distutils.core import setup setup(name="qpid-qmf", - version="0.9", + version="0.13", author="Apache Qpid", author_email="dev@qpid.apache.org", - packages=["qmf", "qmf2", "qmf2.tests"], + packages=["qmf"], package_dir={"": "src/py"}, url="http://qpid.apache.org/", license="Apache Software License", diff --git a/extras/qmf/src/py/qmf/console.py b/extras/qmf/src/py/qmf/console.py index 6f4c11ae15..f0fba2db04 100644 --- a/extras/qmf/src/py/qmf/console.py +++ b/extras/qmf/src/py/qmf/console.py @@ -107,8 +107,8 @@ class Console: # BrokerURL #=================================================================================================== class BrokerURL(URL): - def __init__(self, text): - URL.__init__(self, text) + def __init__(self, *args, **kwargs): + URL.__init__(self, *args, **kwargs) if self.port is None: if self.scheme == URL.AMQPS: self.port = 5671 @@ -122,7 +122,7 @@ class BrokerURL(URL): self.authPass = str(self.password) def name(self): - return self.host + ":" + str(self.port) + return str(self) def match(self, host, port): return socket.getaddrinfo(self.host, self.port)[0][4] == socket.getaddrinfo(host, port)[0][4] @@ -359,8 +359,8 @@ class Object(object): for arg in method.arguments: if arg.dir.find("I") != -1: count += 1 - if count != len(args): - raise Exception("Incorrect number of arguments: expected %d, got %d" % (count, len(args))) + if count != len(args) + len(kwargs): + raise Exception("Incorrect number of arguments: expected %d, got %d" % (count, len(args) + len(kwargs))) if self._agent.isV2: # @@ -372,7 +372,10 @@ class Object(object): argMap = {} for arg in method.arguments: if arg.dir.find("I") != -1: - argMap[arg.name] = args[aIdx] + if aIdx < len(args): + argMap[arg.name] = args[aIdx] + else: + argMap[arg.name] = kwargs[arg.name] aIdx += 1 call['_arguments'] = argMap @@ -439,6 +442,10 @@ class Object(object): else: sync = True + # Remove special "meta" kwargs before handing to _sendMethodRequest() to process + if "_timeout" in kwargs: del kwargs["_timeout"] + if "_async" in kwargs: del kwargs["_async"] + seq = self._sendMethodRequest(name, args, kwargs, sync, timeout) if seq: if not sync: @@ -638,7 +645,10 @@ class Session: Will raise an exception if the session is not managing the connection and the connection setup to the broker fails. """ - url = BrokerURL(target) + if isinstance(target, BrokerURL): + url = target + else: + url = BrokerURL(target) broker = Broker(self, url.host, url.port, mechanisms, url.authName, url.authPass, ssl = url.scheme == URL.AMQPS, connTimeout=timeout) @@ -1211,11 +1221,22 @@ class Session: try: agentName = ah["qmf.agent"] values = content["_values"] - timestamp = values["_timestamp"] - interval = values["_heartbeat_interval"] + + if '_timestamp' in values: + timestamp = values["_timestamp"] + else: + timestamp = values['timestamp'] + + if '_heartbeat_interval' in values: + interval = values['_heartbeat_interval'] + else: + interval = values['heartbeat_interval'] + epoch = 0 if '_epoch' in values: epoch = values['_epoch'] + elif 'epoch' in values: + epoch = values['epoch'] except Exception,e: return @@ -2328,18 +2349,19 @@ class Broker(Thread): def getUrl(self): """ """ - return "%s:%d" % (self.host, self.port) + return BrokerURL(host=self.host, port=self.port) def getFullUrl(self, noAuthIfGuestDefault=True): """ """ - ssl = "" if self.ssl: - ssl = "s" - auth = "%s/%s@" % (self.authUser, self.authPass) + scheme = "amqps" + else: + scheme = "amqp" if self.authUser == "" or \ (noAuthIfGuestDefault and self.authUser == "guest" and self.authPass == "guest"): - auth = "" - return "amqp%s://%s%s:%d" % (ssl, auth, self.host, self.port or 5672) + return BrokerURL(scheme=scheme, host=self.host, port=(self.port or 5672)) + else: + return BrokerURL(scheme=scheme, user=self.authUser, password=self.authPass, host=self.host, port=(self.port or 5672)) def __repr__(self): if self.connected: @@ -2416,7 +2438,7 @@ class Broker(Thread): if uid.__class__ == tuple and len(uid) == 2: self.saslUser = uid[1] else: - self.saslUser = None + self.saslUser = self.authUser # prevent topic queues from filling up (and causing the agents to # disconnect) by discarding the oldest queued messages when full. @@ -3273,6 +3295,7 @@ class Agent: self.lock.acquire() try: self.contextMap.pop(sequence) + self.seqMgr._release(sequence) except KeyError: pass # @todo - shouldn't happen, log a warning. finally: diff --git a/extras/qmf/src/py/qmf2/__init__.py b/extras/qmf/src/py/qmf2-prototype/__init__.py index 31d5a2ef58..31d5a2ef58 100644 --- a/extras/qmf/src/py/qmf2/__init__.py +++ b/extras/qmf/src/py/qmf2-prototype/__init__.py diff --git a/extras/qmf/src/py/qmf2/agent.py b/extras/qmf/src/py/qmf2-prototype/agent.py index 4ec00bd288..4ec00bd288 100644 --- a/extras/qmf/src/py/qmf2/agent.py +++ b/extras/qmf/src/py/qmf2-prototype/agent.py diff --git a/extras/qmf/src/py/qmf2/common.py b/extras/qmf/src/py/qmf2-prototype/common.py index 2e5367f54f..2e5367f54f 100644 --- a/extras/qmf/src/py/qmf2/common.py +++ b/extras/qmf/src/py/qmf2-prototype/common.py diff --git a/extras/qmf/src/py/qmf2/console.py b/extras/qmf/src/py/qmf2-prototype/console.py index 9227835b3f..9227835b3f 100644 --- a/extras/qmf/src/py/qmf2/console.py +++ b/extras/qmf/src/py/qmf2-prototype/console.py diff --git a/extras/qmf/src/py/qmf2/tests/__init__.py b/extras/qmf/src/py/qmf2-prototype/tests/__init__.py index eff9357e1f..eff9357e1f 100644 --- a/extras/qmf/src/py/qmf2/tests/__init__.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/__init__.py diff --git a/extras/qmf/src/py/qmf2/tests/agent_discovery.py b/extras/qmf/src/py/qmf2-prototype/tests/agent_discovery.py index 2c20794aaa..2c20794aaa 100644 --- a/extras/qmf/src/py/qmf2/tests/agent_discovery.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/agent_discovery.py diff --git a/extras/qmf/src/py/qmf2/tests/agent_test.py b/extras/qmf/src/py/qmf2-prototype/tests/agent_test.py index 14d8ada197..14d8ada197 100644 --- a/extras/qmf/src/py/qmf2/tests/agent_test.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/agent_test.py diff --git a/extras/qmf/src/py/qmf2/tests/async_method.py b/extras/qmf/src/py/qmf2-prototype/tests/async_method.py index 2339fc71a9..2339fc71a9 100644 --- a/extras/qmf/src/py/qmf2/tests/async_method.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/async_method.py diff --git a/extras/qmf/src/py/qmf2/tests/async_query.py b/extras/qmf/src/py/qmf2-prototype/tests/async_query.py index b1c01611f7..b1c01611f7 100644 --- a/extras/qmf/src/py/qmf2/tests/async_query.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/async_query.py diff --git a/extras/qmf/src/py/qmf2/tests/basic_method.py b/extras/qmf/src/py/qmf2-prototype/tests/basic_method.py index 8d038bc4c8..8d038bc4c8 100644 --- a/extras/qmf/src/py/qmf2/tests/basic_method.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/basic_method.py diff --git a/extras/qmf/src/py/qmf2/tests/basic_query.py b/extras/qmf/src/py/qmf2-prototype/tests/basic_query.py index 9f5dda6d54..9f5dda6d54 100644 --- a/extras/qmf/src/py/qmf2/tests/basic_query.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/basic_query.py diff --git a/extras/qmf/src/py/qmf2/tests/console_test.py b/extras/qmf/src/py/qmf2-prototype/tests/console_test.py index ac0e064f20..ac0e064f20 100644 --- a/extras/qmf/src/py/qmf2/tests/console_test.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/console_test.py diff --git a/extras/qmf/src/py/qmf2/tests/events.py b/extras/qmf/src/py/qmf2-prototype/tests/events.py index 624c9b3823..624c9b3823 100644 --- a/extras/qmf/src/py/qmf2/tests/events.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/events.py diff --git a/extras/qmf/src/py/qmf2/tests/multi_response.py b/extras/qmf/src/py/qmf2-prototype/tests/multi_response.py index 991fa0114e..991fa0114e 100644 --- a/extras/qmf/src/py/qmf2/tests/multi_response.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/multi_response.py diff --git a/extras/qmf/src/py/qmf2/tests/obj_gets.py b/extras/qmf/src/py/qmf2-prototype/tests/obj_gets.py index 695b096973..695b096973 100644 --- a/extras/qmf/src/py/qmf2/tests/obj_gets.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/obj_gets.py diff --git a/extras/qmf/src/py/qmf2/tests/subscriptions.py b/extras/qmf/src/py/qmf2-prototype/tests/subscriptions.py index 5c39af4b32..5c39af4b32 100644 --- a/extras/qmf/src/py/qmf2/tests/subscriptions.py +++ b/extras/qmf/src/py/qmf2-prototype/tests/subscriptions.py diff --git a/extras/sasl/bootstrap b/extras/sasl/bootstrap index 32085c325d..906e5a71e4 100755 --- a/extras/sasl/bootstrap +++ b/extras/sasl/bootstrap @@ -22,7 +22,7 @@ aclocal -I m4 autoheader libtoolize --automake -automake +automake --add-missing autoconf if [ "$1" = "-build" -o "$1" = "--build" ] ; then diff --git a/extras/sasl/configure.ac b/extras/sasl/configure.ac index bc0fadbb31..206c2f497d 100644 --- a/extras/sasl/configure.ac +++ b/extras/sasl/configure.ac @@ -23,7 +23,6 @@ AC_CONFIG_HEADERS([config.h]) AC_PROG_CC_STDC AM_PROG_CC_C_O AC_PROG_CXX -AC_USE_SYSTEM_EXTENSIONS AC_LANG([C++]) # Check for optional use of help2man diff --git a/extras/sasl/python/Makefile.am b/extras/sasl/python/Makefile.am index 43eef70923..7c61f37cee 100644 --- a/extras/sasl/python/Makefile.am +++ b/extras/sasl/python/Makefile.am @@ -29,8 +29,7 @@ BUILT_SOURCES = $(generated_file_list) $(generated_file_list): python.i $(top_srcdir)/src/saslwrapper.i $(SWIG) -c++ -python -Wall -I/usr/include $(INCLUDES) -o saslwrapper.cpp $(srcdir)/python.i -pylibdir = $(PYTHON_LIB) -python_PYTHON = saslwrapper.py +pyexec_PYTHON = saslwrapper.py pyexec_LTLIBRARIES = _saslwrapper.la _saslwrapper_la_LDFLAGS = -avoid-version -module -shared diff --git a/extras/sasl/ruby/Makefile.am b/extras/sasl/ruby/Makefile.am index da64239323..85fde1085d 100644 --- a/extras/sasl/ruby/Makefile.am +++ b/extras/sasl/ruby/Makefile.am @@ -35,7 +35,7 @@ rubylibarch_LTLIBRARIES = saslwrapper.la saslwrapper_la_LDFLAGS = -avoid-version -module -shared ".$(RUBY_DLEXT)" saslwrapper_la_LIBADD = $(RUBY_LIBS) $(top_builddir)/src/libsaslwrapper.la -lsasl2 -saslwrapper_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) +saslwrapper_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) -fno-strict-aliasing nodist_saslwrapper_la_SOURCES = saslwrapper.cpp CLEANFILES = $(generated_file_list) diff --git a/extras/sasl/src/Makefile.am b/extras/sasl/src/Makefile.am index 25529a3607..c2aa8dd188 100644 --- a/extras/sasl/src/Makefile.am +++ b/extras/sasl/src/Makefile.am @@ -24,6 +24,7 @@ nobase_include_HEADERS = ../include/saslwrapper.h lib_LTLIBRARIES = libsaslwrapper.la libsaslwrapper_la_SOURCES = cyrus/saslwrapper.cpp +libsaslwrapper_la_CXXFLAGS = -fno-strict-aliasing # Library Version Information: # |