Repository: qpid-dispatch
Updated Branches:
  refs/heads/master e7be39c5b -> 456f618d8


DISPATCH-561 Add support for qdstat and qdmanage


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/456f618d
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/456f618d
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/456f618d

Branch: refs/heads/master
Commit: 456f618d88066029108cb8f325108885725ffdf7
Parents: e7be39c
Author: Ernest Allen <[email protected]>
Authored: Fri Nov 18 14:26:37 2016 -0500
Committer: Ernest Allen <[email protected]>
Committed: Fri Nov 18 14:26:37 2016 -0500

----------------------------------------------------------------------
 console/test/fake.py | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/456f618d/console/test/fake.py
----------------------------------------------------------------------
diff --git a/console/test/fake.py b/console/test/fake.py
index 8e5ff1b..532d549 100755
--- a/console/test/fake.py
+++ b/console/test/fake.py
@@ -82,13 +82,23 @@ class Manager(object):
         return onlyfiles
 
     def QUERY(self, request):
-        node = request.address
-        nid = node.split('/')[2]
+        #pdb.set_trace()
+        if not getattr(request, "address"):
+            nodes = self.GET_MGMT_NODES(request)
+            node = nodes[0]
+        else:
+            node = request.address
+        print "node is"
+        pprint (node)
+        nid = node.split('/')[-2]
         fullentity = request.properties["entityType"]
         entity = fullentity[len("org.apache.qpid.dispatch"):]
         if self.verbose:
             pprint("nid is " + nid + " entity is " + entity)
-        requestedAttrs = request.body["attributeNames"]
+        if not "arrtibuteNmaes" in request.body:
+            requestedAttrs = []
+        else:
+            requestedAttrs = request.body["attributeNames"]
         if not os.path.isfile(self.base + self.topology + "/" + nid + ".json"):
             return {"results": [], "attributeNames": requestedAttrs}
         with open(self.base + self.topology + "/" + nid + ".json") as fp:
@@ -289,7 +299,8 @@ class MockRouter(MessagingHandler):
     def on_message(self, event):
         ret = self.manager.operation(event.message.properties["operation"], 
event.message)
         m = Message(address=event.message.reply_to, body=ret,
-            correlation_id=event.message.correlation_id)
+            correlation_id=event.message.correlation_id,
+            properties={"statusCode": 200} )
         self.senders[event.message.reply_to].send(m)
 
 parser = optparse.OptionParser(usage="usage: %prog [options]")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to