QPID-2261: fix path to modules.

git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qmfv2@902894 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/qpid/python/qmf2/__init__.py b/qpid/python/qmf2/__init__.py
new file mode 100644
index 0000000..31d5a2e
--- /dev/null
+++ b/qpid/python/qmf2/__init__.py
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
diff --git a/qpid/python/qmf2/tests/agent_discovery.py b/qpid/python/qmf2/tests/agent_discovery.py
index 19ed79c..3c530cc 100644
--- a/qpid/python/qmf2/tests/agent_discovery.py
+++ b/qpid/python/qmf2/tests/agent_discovery.py
@@ -25,7 +25,7 @@
 import qmf2.agent
 
 
-class _testNotifier(qmf.qmfCommon.Notifier):
+class _testNotifier(qmf2.common.Notifier):
     def __init__(self):
         self._event = Event()
 
@@ -48,7 +48,7 @@
     def __init__(self, name, heartbeat):
         Thread.__init__(self)
         self.notifier = _testNotifier()
-        self.agent = qmf.qmfAgent.Agent(name,
+        self.agent = qmf2.agent.Agent(name,
                            _notifier=self.notifier,
                            _heartbeat_interval=heartbeat)
         # No database needed for this test
@@ -118,7 +118,7 @@
         # wait
         # expect agent add for agent1 and agent2
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -133,7 +133,7 @@
         while wi and not (agent1_found and agent2_found):
             if wi.get_type() == wi.AGENT_ADDED:
                 agent = wi.get_params().get("agent")
-                if not agent or not isinstance(agent, qmf.qmfConsole.Agent):
+                if not agent or not isinstance(agent, qmf2.console.Agent):
                     self.fail("Unexpected workitem from agent")
                 else:
                     if agent.get_name() == "agent1":
@@ -159,7 +159,7 @@
         # wait until timeout
         # expect agent add for agent1 only
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -168,10 +168,10 @@
         self.conn.connect()
         self.console.addConnection(self.conn)
 
-        query = qmf.qmfCommon.QmfQuery.create_predicate(
-                           qmf.qmfCommon.QmfQuery.TARGET_AGENT,
-                           qmf.qmfCommon.QmfQueryPredicate({qmf.qmfCommon.QmfQuery.CMP_EQ:
-                                 [qmf.qmfCommon.QmfQuery.KEY_AGENT_NAME, "agent1"]}))
+        query = qmf2.common.QmfQuery.create_predicate(
+                           qmf2.common.QmfQuery.TARGET_AGENT,
+                           qmf2.common.QmfQueryPredicate({qmf2.common.QmfQuery.CMP_EQ:
+                                 [qmf2.common.QmfQuery.KEY_AGENT_NAME, "agent1"]}))
         self.console.enable_agent_discovery(query)
 
         agent1_found = agent2_found = False
@@ -179,7 +179,7 @@
         while wi:
             if wi.get_type() == wi.AGENT_ADDED:
                 agent = wi.get_params().get("agent")
-                if not agent or not isinstance(agent, qmf.qmfConsole.Agent):
+                if not agent or not isinstance(agent, qmf2.console.Agent):
                     self.fail("Unexpected workitem from agent")
                 else:
                     if agent.get_name() == "agent1":
@@ -203,7 +203,7 @@
         # stop agent1, expect timeout notification
         # stop agent2, expect timeout notification
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=2)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -218,7 +218,7 @@
         while wi and not (agent1_found and agent2_found):
             if wi.get_type() == wi.AGENT_ADDED:
                 agent = wi.get_params().get("agent")
-                if not agent or not isinstance(agent, qmf.qmfConsole.Agent):
+                if not agent or not isinstance(agent, qmf2.console.Agent):
                     self.fail("Unexpected workitem from agent")
                 else:
                     if agent.get_name() == "agent1":
@@ -246,7 +246,7 @@
         while wi is not None:
             if wi.get_type() == wi.AGENT_DELETED:
                 agent = wi.get_params().get("agent")
-                if not agent or not isinstance(agent, qmf.qmfConsole.Agent):
+                if not agent or not isinstance(agent, qmf2.console.Agent):
                     self.fail("Unexpected workitem from agent")
                 else:
                     if agent.get_name() == "agent1":
@@ -272,7 +272,7 @@
         while wi is not None:
             if wi.get_type() == wi.AGENT_DELETED:
                 agent = wi.get_params().get("agent")
-                if not agent or not isinstance(agent, qmf.qmfConsole.Agent):
+                if not agent or not isinstance(agent, qmf2.console.Agent):
                     self.fail("Unexpected workitem from agent")
                 else:
                     if agent.get_name() == "agent2":
@@ -297,7 +297,7 @@
         # find agent-none, expect failure
         # find agent2, expect success
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier)
+        self.console = qmf2.console.Console(notifier=self.notifier)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
                                               self.broker.user,
diff --git a/qpid/python/qmf2/tests/basic_method.py b/qpid/python/qmf2/tests/basic_method.py
index c5098b5..a054a76 100644
--- a/qpid/python/qmf2/tests/basic_method.py
+++ b/qpid/python/qmf2/tests/basic_method.py
@@ -228,8 +228,8 @@
         # synchronous query for all objects in schema
         # method call on each object
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
-                                              agent_timeout=3)
+        self.console = qmf2.console.Console(notifier=self.notifier,
+                                            agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
                                               self.broker.user,
@@ -254,7 +254,7 @@
                 mr = obj.invoke_method( "set_meth", {"arg_int": -99,
                                                      "arg_str": "Now set!"},
                                         _timeout=3)
-                self.assertTrue(isinstance(mr, qmf.qmfConsole.MethodResult))
+                self.assertTrue(isinstance(mr, qmf2.console.MethodResult))
                 self.assertTrue(mr.succeeded())
                 self.assertTrue(mr.get_argument("code") == 0)
 
@@ -278,7 +278,7 @@
         # invalid method call on each object
         #  - should throw a ValueError
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -315,7 +315,7 @@
         # synchronous query for a managed object
         # method call on each object
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -340,7 +340,7 @@
                                     "arg2": "Now set!",
                                     "arg3": 1966},
                                    _timeout=3)
-            self.assertTrue(isinstance(mr, qmf.qmfConsole.MethodResult))
+            self.assertTrue(isinstance(mr, qmf2.console.MethodResult))
             self.assertTrue(mr.succeeded())
             self.assertTrue(mr.get_argument("code") == 0)
             # @todo refresh and verify changes
diff --git a/qpid/python/qmf2/tests/basic_query.py b/qpid/python/qmf2/tests/basic_query.py
index 46dc87f..2009f5c 100644
--- a/qpid/python/qmf2/tests/basic_query.py
+++ b/qpid/python/qmf2/tests/basic_query.py
@@ -174,7 +174,7 @@
         # synchronous query for all objects by id
         # verify known object ids are returned
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -206,7 +206,7 @@
         # synchronous query for each objects
         # verify objects and schemas are correct
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -248,7 +248,7 @@
         # find agents
         # synchronous query all package names
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -276,7 +276,7 @@
         # find agents
         # synchronous query for all schema by package name
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -310,7 +310,7 @@
         # find agents
         # synchronous query for all schema by package name
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
diff --git a/qpid/python/qmf2/tests/events.py b/qpid/python/qmf2/tests/events.py
index 8ce534c..b2d9347 100644
--- a/qpid/python/qmf2/tests/events.py
+++ b/qpid/python/qmf2/tests/events.py
@@ -144,8 +144,8 @@
         # find agents
 
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
-                                              agent_timeout=3)
+        self.console = qmf2.console.Console(notifier=self.notifier,
+                                            agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
                                               self.broker.user,
@@ -169,7 +169,7 @@
                 self.assertTrue(event.get_value("prop-1") > 0)
 
                 agent = wi.get_params().get("agent")
-                if not agent or not isinstance(agent, qmf.qmfConsole.Agent):
+                if not agent or not isinstance(agent, qmf2.console.Agent):
                     self.fail("Unexpected workitem from agent")
                 else:
                     if agent.get_name() == "agent1":
diff --git a/qpid/python/qmf2/tests/obj_gets.py b/qpid/python/qmf2/tests/obj_gets.py
index e585754..9287fc7 100644
--- a/qpid/python/qmf2/tests/obj_gets.py
+++ b/qpid/python/qmf2/tests/obj_gets.py
@@ -203,7 +203,7 @@
         # synchronous query for all objects by id
         # verify known object ids are returned
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -261,7 +261,7 @@
         # synchronous query for all objects by id
         # verify known object ids are returned
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,
@@ -333,7 +333,7 @@
         # synchronous query for all objects by id
         # verify known object ids are returned
         self.notifier = _testNotifier()
-        self.console = qmf.qmfConsole.Console(notifier=self.notifier,
+        self.console = qmf2.console.Console(notifier=self.notifier,
                                               agent_timeout=3)
         self.conn = qpid.messaging.Connection(self.broker.host,
                                               self.broker.port,