qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1610837 - in /qpid/dispatch/trunk/tests: system_test.py system_tests_broker.py
Date Tue, 15 Jul 2014 20:23:03 GMT
Author: aconway
Date: Tue Jul 15 20:23:03 2014
New Revision: 1610837

URL: http://svn.apache.org/r1610837
Log:
NO-JIRA: system_test.py rename "agent" as "management" for management proxy.

Modified:
    qpid/dispatch/trunk/tests/system_test.py
    qpid/dispatch/trunk/tests/system_tests_broker.py

Modified: qpid/dispatch/trunk/tests/system_test.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_test.py?rev=1610837&r1=1610836&r2=1610837&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_test.py (original)
+++ qpid/dispatch/trunk/tests/system_test.py Tue Jul 15 20:23:03 2014
@@ -318,20 +318,20 @@ class Qdrouterd(Process):
             pyinclude = os.path.join(os.environ['QPID_DISPATCH_HOME'], 'python')
         super(Qdrouterd, self).__init__(
             name, ['qdrouterd', '-c', config.write(name), '-I', pyinclude], expect=Process.RUNNING)
-        self._agent = None
+        self._management = None
         if wait:
             self.wait_ready()
 
     @property
-    def agent(self):
-        """Return an management Agent for this router"""
-        if not self._agent:
-            self._agent = Node(self.addresses[0])
-        return self._agent
+    def management(self):
+        """Return an management agent proxy for this router"""
+        if not self._management:
+            self._management = Node(self.addresses[0])
+        return self._management
 
     def teardown(self):
-        if self._agent:
-            self._agent.stop()
+        if self._management:
+            self._management.stop()
         super(Qdrouterd, self).teardown()
 
     @property
@@ -352,7 +352,7 @@ class Qdrouterd(Process):
     def is_connected(self, port, host='0.0.0.0'):
         """If router has a connection to host:port return the management info.
         Otherwise return None"""
-        connections = self.agent.query('org.apache.qpid.dispatch.connection').result_maps
+        connections = self.management.query('org.apache.qpid.dispatch.connection').result_maps
         for c in connections:
             if c['name'] == '%s:%s'%(host, port):
                 return c
@@ -367,7 +367,7 @@ class Qdrouterd(Process):
         """
         def check():
             # FIXME aconway 2014-06-12: this should be a request by name, not a query.
-            addrs = self.agent.query(
+            addrs = self.management.query(
                 type='org.apache.qpid.dispatch.router.address',
                 attribute_names=['name', 'subscriberCount', 'remoteCount']).result_maps
             # FIXME aconway 2014-06-12: endswith check is because of M0/L prefixes
@@ -409,7 +409,7 @@ class Qpidd(Process):
             name, ['qpidd', '--config', self.config.write(name)], expect=Process.RUNNING)
         self.port = self.config['port'] or 5672
         self.address = "127.0.0.1:%s"%self.port
-        self._agent = None
+        self._management = None
         if wait:
             self.wait_ready()
 
@@ -420,13 +420,13 @@ class Qpidd(Process):
         return qm.Connection.establish(self.address)
 
     @property
-    def agent(self, **kwargs):
-        """Get the management agent for this broker"""
+    def management(self, **kwargs):
+        """Get the management agent proxy for this broker"""
         if not qpidtoollibs:
             raise Exception("No qpidtoollibs module available")
-        if not self._agent:
-            self._agent = qpidtoollibs.BrokerAgent(self.qm_connect(), **kwargs)
-        return self._agent
+        if not self._management:
+            self._management = qpidtoollibs.BrokerAgent(self.qm_connect(), **kwargs)
+        return self._management
 
     def wait_ready(self):
         wait_port(self.port)

Modified: qpid/dispatch/trunk/tests/system_tests_broker.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_broker.py?rev=1610837&r1=1610836&r2=1610837&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_tests_broker.py (original)
+++ qpid/dispatch/trunk/tests/system_tests_broker.py Tue Jul 15 20:23:03 2014
@@ -76,7 +76,7 @@ class DistributedQueueTest(system_test.T
             msgr.flush()
             self.assertEqual(r, messages)
 
-            qs = [q.agent.getQueue(self.testq) for q in self.qpidds]
+            qs = [q.management.getQueue(self.testq) for q in self.qpidds]
             enq = sum(q.msgTotalEnqueues for q in qs)
             deq = sum(q.msgTotalDequeues for q in qs)
             self.assertEquals((enq, deq), (len(r), len(r)))
@@ -87,7 +87,7 @@ class DistributedQueueTest(system_test.T
             """Create a distributed queue with N routers and N brokers.
             Each router is connected to all the brokers."""
             for q in self.qpidds:
-                q.agent.addQueue(self.testq)
+                q.management.addQueue(self.testq)
 
             def router(i):
                 """Create router<i> with waypoints to each broker."""



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message