diff options
| author | Ted Ross <tross@apache.org> | 2013-03-13 18:34:58 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2013-03-13 18:34:58 +0000 |
| commit | f685c194c28ecfbcdadd3ba2af2a5a2977ebf268 (patch) | |
| tree | fdb3c1af92e6d5086cf1fa2b6f56cfa6b9f33142 /tools/src | |
| parent | 1c0cc0cdef1bfd674955897deaff12a88cef4cbb (diff) | |
| download | qpid-python-f685c194c28ecfbcdadd3ba2af2a5a2977ebf268.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/qpid@1456081 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools/src')
| -rwxr-xr-x | tools/src/py/qpid-config | 3 | ||||
| -rw-r--r-- | tools/src/py/qpidtoollibs/broker.py | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tools/src/py/qpid-config b/tools/src/py/qpid-config index 2bab892c95..66567d0246 100755 --- a/tools/src/py/qpid-config +++ b/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/tools/src/py/qpidtoollibs/broker.py b/tools/src/py/qpidtoollibs/broker.py index ea31aeabb0..d8b75c3c60 100644 --- a/tools/src/py/qpidtoollibs/broker.py +++ b/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): |
