* [PATCH] kvm_monitor.py: is_responsive(): Use status command
@ 2010-10-07 22:30 Luiz Capitulino
2010-10-08 12:19 ` Lucas Meneghel Rodrigues
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Capitulino @ 2010-10-07 22:30 UTC (permalink / raw)
To: autotest; +Cc: kvm, lmr, ehabkost
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 :-)
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
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
--
1.7.3.1.104.gc752e
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] kvm_monitor.py: is_responsive(): Use status command
2010-10-07 22:30 [PATCH] kvm_monitor.py: is_responsive(): Use status command Luiz Capitulino
@ 2010-10-08 12:19 ` Lucas Meneghel Rodrigues
0 siblings, 0 replies; 2+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-10-08 12:19 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: autotest, ehabkost, kvm
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 <lcapitulino@redhat.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-08 12:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 22:30 [PATCH] kvm_monitor.py: is_responsive(): Use status command Luiz Capitulino
2010-10-08 12:19 ` Lucas Meneghel Rodrigues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox