On Thu, 2010-10-07 at 19:30 -0300, Luiz Capitulino wrote:
> The is_responsive() method in QMPMonitor class uses the query-version
> command to check if the monitor is alive and the same method in the
> HumanMonitor class uses the help command.
> 
> This commit changes both classes to use the status command instead,
> so that:
> 
>  o The QEMU's response is shorter when using the Human Monitor. The
>    help command output is 70 lines long, which makes it a bit
>    expansive for a single ping
> 
>  o is_responsive() can be extended to check if QEMU is running
> 
>  o My logs won't be flooded with help's output :-)

This looks good to me, applied:


> Signed-off-by: Luiz Capitulino <[email protected]>
> ---
>  client/tests/kvm/kvm_monitor.py |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests/kvm/kvm_monitor.py
> index 9a66388..8c92413 100644
> --- a/client/tests/kvm/kvm_monitor.py
> +++ b/client/tests/kvm/kvm_monitor.py
> @@ -243,7 +243,7 @@ class HumanMonitor(Monitor):
>          @return: True if responsive, False otherwise
>          """
>          try:
> -            self._get_command_output("help")
> +            self._get_command_output("info status")
>              return True
>          except MonitorError:
>              return False
> @@ -548,7 +548,7 @@ class QMPMonitor(Monitor):
>          @return: True if responsive, False otherwise
>          """
>          try:
> -            self._get_command_output("query-version")
> +            self._get_command_output("query-status")
>              return True
>          except MonitorError:
>              return False


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to