[libvirt] [libvirt-python][PATCH] event-test.py: Sync list of storage lifecycle events

Michal Privoznik posted 1 patch 5 years, 11 months ago
Failed in applying to current master (apply log)
examples/event-test.py | 2 ++
1 file changed, 2 insertions(+)
[libvirt] [libvirt-python][PATCH] event-test.py: Sync list of storage lifecycle events
Posted by Michal Privoznik 5 years, 11 months ago
https://bugzilla.redhat.com/show_bug.cgi?id=1578337

Since libvirt 3.8.0 we have 6 events: defined, undefined,
started, stopped, created, deleted. However, the last two were
missing in a string list that translates libvirt events (int)
into human readable strings.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 examples/event-test.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/event-test.py b/examples/event-test.py
index 3de333c..281e661 100755
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -605,6 +605,8 @@ def storageEventToString(event):
                             "Undefined",
                             "Started",
                             "Stopped",
+                            "Created",
+                            "Deleted",
     )
     return storageEventStrings[event]
 
-- 
2.16.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-python][PATCH] event-test.py: Sync list of storage lifecycle events
Posted by Pavel Hrdina 5 years, 11 months ago
On Tue, May 22, 2018 at 01:48:59PM +0200, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1578337
> 
> Since libvirt 3.8.0 we have 6 events: defined, undefined,
> started, stopped, created, deleted. However, the last two were
> missing in a string list that translates libvirt events (int)
> into human readable strings.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  examples/event-test.py | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>

BTW: you should probably fix you .git/config to contain these lines:

[format]
    subjectPrefix = python PATCH
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list