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

Guannan Ren gren at redhat.com
Tue Jan 10 03:54:37 UTC 2012


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




More information about the libvir-list mailing list