On 2015/3/7 0:10, Eric Blake wrote:
On 02/25/2015 12:04 AM, zhanghailiang wrote:

+++ b/qmp-commands.hx
@@ -753,6 +753,25 @@ Example:
   EQMP

       {
+        .name       = "colo_lost_heartbeat",

...but documented incorrectly (this should use '-' to match the command
name in the .json file, not '_')


Er, yes, you are right, here it should be 'colo-lost-heartbeat' in
qmp-commands.hx,
but 'colo_lost_heartbeat' in hmp-commands.hx, it is a little confused
for me,
why it should be like this?

Historical madness.  HMP has traditionally used '_' (and relied on
tab-completion to allow users to skip having to use the shift key),
while QMP has traditionally used '-' (in all but the oldest interfaces).


Got it.


i will fix it.

+        .args_type  = "",
+        .mhandler.cmd_new = qmp_marshal_input_colo_lost_heartbeat,
+    },
+
+SQMP
+colo_lost_heartbeat
+--------------------
+
+Tell COLO that heartbeat is lost, a failover or takeover is needed.
+
+Example:
+
+-> { "execute": "colo_lost_heartbeat" }
+<- { "return": {} }

This example won't work unless you fix the spelling.


Should here also be changed to 'colo-lost-heartbeat' ?

Yes.


OK, thanks.


Reply via email to