You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2008/10/23 21:07:05 UTC
svn commit: r707449 - in /incubator/qpid/trunk/qpid/python:
qpid/management.py qpid/managementdata.py tests_0-10/management.py
Author: tross
Date: Thu Oct 23 12:07:05 2008
New Revision: 707449
URL: http://svn.apache.org/viewvc?rev=707449&view=rev
Log:
Marked old python management API as obsolete. Updated 0-10 tests to use new qmfconsole API
Modified:
incubator/qpid/trunk/qpid/python/qpid/management.py
incubator/qpid/trunk/qpid/python/qpid/managementdata.py
incubator/qpid/trunk/qpid/python/tests_0-10/management.py
Modified: incubator/qpid/trunk/qpid/python/qpid/management.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/management.py?rev=707449&r1=707448&r2=707449&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/management.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/management.py Thu Oct 23 12:07:05 2008
@@ -17,6 +17,10 @@
# under the License.
#
+###############################################################################
+## This file is being obsoleted by qpid/qmfconsole.py
+###############################################################################
+
"""
Management API for Qpid
"""
Modified: incubator/qpid/trunk/qpid/python/qpid/managementdata.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/managementdata.py?rev=707449&r1=707448&r2=707449&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/managementdata.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/managementdata.py Thu Oct 23 12:07:05 2008
@@ -19,6 +19,11 @@
# under the License.
#
+
+###############################################################################
+## This file is being obsoleted by qpid/qmfconsole.py
+###############################################################################
+
import qpid
import re
import socket
Modified: incubator/qpid/trunk/qpid/python/tests_0-10/management.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests_0-10/management.py?rev=707449&r1=707448&r2=707449&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests_0-10/management.py (original)
+++ incubator/qpid/trunk/qpid/python/tests_0-10/management.py Thu Oct 23 12:07:05 2008
@@ -72,39 +72,25 @@
self.assertEqual (res.body, body)
def test_system_object (self):
- session = self.session
-
- mc = managementClient (session.spec)
- mch = mc.addChannel (session)
-
- mc.syncWaitForStable (mch)
- systems = mc.syncGetObjects (mch, "system")
+ self.startQmf()
+ systems = self.qmf.getObjects(_class="system")
self.assertEqual (len (systems), 1)
- mc.removeChannel (mch)
def test_self_session_id (self):
- session = self.session
-
- mc = managementClient (session.spec)
- mch = mc.addChannel (session)
+ self.startQmf()
+ sessionId = self.qmf_broker.getSessionId()
+ brokerSessions = self.qmf.getObjects(_class="session")
- info = mc.syncWaitForStable (mch)
- brokerSessions = mc.syncGetObjects (mch, "session")
found = False
for bs in brokerSessions:
- if bs.name == info.sessionId:
+ if bs.name == sessionId:
found = True
self.assertEqual (found, True)
- mc.removeChannel (mch)
def test_standard_exchanges (self):
- session = self.session
-
- mc = managementClient (session.spec)
- mch = mc.addChannel (session)
+ self.startQmf()
- mc.syncWaitForStable (mch)
- exchanges = mc.syncGetObjects (mch, "exchange")
+ exchanges = self.qmf.getObjects(_class="exchange")
exchange = self.findExchange (exchanges, "")
self.assertEqual (exchange.type, "direct")
exchange = self.findExchange (exchanges, "amq.direct")
@@ -117,7 +103,6 @@
self.assertEqual (exchange.type, "headers")
exchange = self.findExchange (exchanges, "qpid.management")
self.assertEqual (exchange.type, "topic")
- mc.removeChannel (mch)
def findExchange (self, exchanges, name):
for exchange in exchanges: