Re: [test-API][PATCH] Add domain event type "Shutdown"

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

 



On 01/09/2012 04:33 PM, Wayne Sun wrote:
   * domain have 7 event types, add the missing shutdown type
   * shutdown only have 1 detail type 'Finished'
---
  repos/domain/eventhandler.py |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/repos/domain/eventhandler.py b/repos/domain/eventhandler.py
index cdbba90..7d8b635 100644
--- a/repos/domain/eventhandler.py
+++ b/repos/domain/eventhandler.py
@@ -48,16 +48,18 @@ def eventToString(event):
                       "Suspended",
                       "Resumed",
                       "Stopped" );
+                     "Shutdown" );

       it should remove the right of parentheses on the "Stopped" line.

      return eventStrings[event];

  def detailToString(event, detail):
      eventStrings = (
          ( "Added", "Updated" ),
-        ( "Removed" ),
+        ( "Removed", ),
          ( "Booted", "Migrated", "Restored", "Snapshot" ),
          ( "Paused", "Migrated", "IOError", "Watchdog" ),
          ( "Unpaused", "Migrated"),
          ( "Shutdown", "Destroyed", "Crashed", "Migrated", "Saved", "Failed", "Snapshot")
+        ( "Finished", )
          )
      return eventStrings[event][detail]



    After fixing it, ack and pushed.
    Guannan Ren

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]