[PATCH 1/2] QMPMonitor: Introduce the get_greeting() method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It returns the QMP's greeting message as sent by the monitor.

Please, note that this commit also changes the QMPMonitor's constructor
to store the full greeting message (it currently stores only its
contents).

This new method is going to be used by the QMP test-suite, which fully
checks the greeting message.

Signed-off-by: Luiz Capitulino <lcapitulino@xxxxxxxxxx>
---
 client/tests/kvm/kvm_monitor.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests/kvm/kvm_monitor.py
index 40be77d..6447cb3 100644
--- a/client/tests/kvm/kvm_monitor.py
+++ b/client/tests/kvm/kvm_monitor.py
@@ -392,7 +392,7 @@ class QMPMonitor(Monitor):
             while time.time() < end_time:
                 for obj in self._read_objects():
                     if "QMP" in obj:
-                        self._greeting = obj["QMP"]
+                        self._greeting = obj
                         break
                 if self._greeting:
                     break
@@ -652,6 +652,13 @@ class QMPMonitor(Monitor):
         self._lock.release()
 
 
+    def get_greeting(self):
+        """
+        Return QMP greeting message.
+        """
+        return self._greeting
+
+
     # Command wrappers
     # Note: all of the following functions raise exceptions in a similar manner
     # to cmd().
-- 
1.7.3.1.120.g38a18

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux