[virt-manager PATCH 7/9] inspection: add a vm-inspected signal

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

 



This way it is possible to know when the inspection for a VM was
completed, no matter whether successfully or failing.
---
 virtManager/inspection.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/virtManager/inspection.py b/virtManager/inspection.py
index b98c718..5dbcb86 100644
--- a/virtManager/inspection.py
+++ b/virtManager/inspection.py
@@ -21,6 +21,8 @@ from Queue import Queue
 from threading import Thread
 import logging
 
+from gi.repository import GObject
+
 from guestfs import GuestFS  # pylint: disable=import-error
 
 from .baseclass import vmmGObject
@@ -31,6 +33,10 @@ class vmmInspection(vmmGObject):
     # Can't find a way to make Thread release our reference
     _leak_check = False
 
+    __gsignals__ = {
+        "vm-inspected": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+    }
+
     def __init__(self):
         vmmGObject.__init__(self)
 
@@ -261,3 +267,4 @@ class vmmInspection(vmmGObject):
         vm.inspection = data
         vm.inspection_data_updated()
         self._cached_data[vm.get_uuid()] = data
+        self.emit("vm-inspected", vm.conn.get_uri(), vm.get_name())
-- 
2.9.3

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux