Merge lp:~fu-wei/lava-dispatcher/multinode into lp:lava-dispatcher/multinode

Proposed by Fu Wei
Status: Merged
Approved by: Neil Williams
Approved revision: no longer in the source branch.
Merged at revision: 656
Proposed branch: lp:~fu-wei/lava-dispatcher/multinode
Merge into: lp:lava-dispatcher/multinode
Diff against target: 28 lines (+9/-2)
1 file modified
lava_dispatcher/signals/__init__.py (+9/-2)
To merge this branch: bzr merge lp:~fu-wei/lava-dispatcher/multinode
Reviewer Review Type Date Requested Status
Neil Williams Pending
Review via email: mp+172813@code.launchpad.net

Description of the change

Fix return message format problem of lava-wait and do some preparation for lava-wait-all

To post a comment you must log in.
lp:~fu-wei/lava-dispatcher/multinode updated
656. By Neil Williams

Fu Wei 2013-07-03 Fix return message format problem of lava-wait and do some prepare for lava-wait-all

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_dispatcher/signals/__init__.py'
2--- lava_dispatcher/signals/__init__.py 2013-07-03 10:44:31 +0000
3+++ lava_dispatcher/signals/__init__.py 2013-07-03 13:15:33 +0000
4@@ -206,7 +206,10 @@
5 msg={"request": "lava_wait", "messageID": message_id, "message": None}
6 reply = self.context.transport(json.dumps(msg))
7 logging.debug("Node transport replied with %s" % reply)
8- self.connection.sendline("<LAVA_WAIT_COMPLETE> %s" % json.dumps(reply))
9+ message_str = ""
10+ for key, value in reply[0].items():
11+ message_str += " %s=%s" % (key, value)
12+ self.connection.sendline("<LAVA_WAIT_COMPLETE%s>" % message_str)
13
14 def _on_WAIT_ALL(self, message_id, role=None):
15 if not self.connection:
16@@ -216,7 +219,11 @@
17 msg={"request": "lava_wait_all", "messageID": message_id, "role": role}
18 reply = self.context.transport(json.dumps(msg))
19 logging.debug("Node transport replied with %s" % reply)
20- self.connection.sendline("<LAVA_WAIT_ALL_COMPLETE> %s" % json.dumps(reply))
21+ message_str = ""
22+ #FIXME:this function is Incomplete,we need get target info from reply
23+ for key, value in reply[0].items():
24+ message_str += " %s:%s=%s" % ("target", key, value)
25+ self.connection.sendline("<LAVA_WAIT_ALL_COMPLETE%s>" % message_str)
26
27 def postprocess_bundle(self, bundle):
28 for test_run in bundle['test_runs']:

Subscribers

People subscribed via source and target branches

to status/vote changes: