summaryrefslogtreecommitdiff
path: root/qpid/tools
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2013-03-13 18:34:58 +0000
committerTed Ross <tross@apache.org>2013-03-13 18:34:58 +0000
commit89eadd5da45b77e8c6eba79cffacc222334a13f7 (patch)
tree64efa8188ce7c2f1d98376d8e437c0bcae91f0ea /qpid/tools
parenta5fe06779d2c196ea954fc91a79dcba18203e38e (diff)
downloadqpid-python-89eadd5da45b77e8c6eba79cffacc222334a13f7.tar.gz
QPID-4559 - Added handling of the queue-delete preconditions in the qmf broker method.
Patch contributed by Ernie Allen. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1456081 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/tools')
-rwxr-xr-xqpid/tools/src/py/qpid-config3
-rw-r--r--qpid/tools/src/py/qpidtoollibs/broker.py9
2 files changed, 9 insertions, 3 deletions
diff --git a/qpid/tools/src/py/qpid-config b/qpid/tools/src/py/qpid-config
index 2bab892c95..66567d0246 100755
--- a/qpid/tools/src/py/qpid-config
+++ b/qpid/tools/src/py/qpid-config
@@ -624,7 +624,8 @@ class BrokerManager:
if len(args) < 1:
Usage()
qname = args[0]
- self.broker.delQueue(qname)
+ self.broker.delQueue(qname, if_empty=config._if_empty, if_unused=config._if_unused)
+
def Bind(self, args):
diff --git a/qpid/tools/src/py/qpidtoollibs/broker.py b/qpid/tools/src/py/qpidtoollibs/broker.py
index ea31aeabb0..d8b75c3c60 100644
--- a/qpid/tools/src/py/qpidtoollibs/broker.py
+++ b/qpid/tools/src/py/qpidtoollibs/broker.py
@@ -250,8 +250,13 @@ class BrokerAgent(object):
'strict': True}
self._method('create', args)
- def delQueue(self, name):
- args = {'type': 'queue', 'name': name}
+ def delQueue(self, name, if_empty=True, if_unused=True):
+ options = {'if_empty': if_empty,
+ 'if_unused': if_unused}
+
+ args = {'type': 'queue',
+ 'name': name,
+ 'options': options}
self._method('delete', args)
def bind(self, exchange, queue, key, options={}, **kwargs):