[libvirt] [PATCH python v4 0/7] Introducing storage pool lifecycle event APIs

Jovanka Gulicoska jovanka.gulicoska at gmail.com
Thu Jun 16 08:08:54 UTC 2016


Introducing implementation of storage pool event APIs. Code changes
follow network event APIs.

Implemented functions: virStoragePoolEventRegisterAny(),
virStoragePoolEventDeregisterAny(), virStoragePoolLifeCycleEventNew(),
introduced STARTED, STOPPED, DEFINE, UNDEFINE and REFRESHED.

STARTED signal is emiited in storagePoolCreateXML() and storagePoolCreate()
DEFINED signal is emitted in storagePoolDefineXML()
UNDEFINED signal is emitted in storagePoolUndefine()
STOPPED signal is emitted in storagePoolDestroy() and storagePoolRefresh()
REFRESHED signal is emitted in storagePoolRefresh()

There are also test as well as unittests for the new functions and signals.

This is part of a GSOC project: Asynchronous lifecycle events for storage objects
As part of the project there should also be implementation for
storage volume events.
For now there's no signal when volumes are created or deleted,
they can also be implemented, but probably the easiest way is to have
apps watch for REFRESH signal, and later extend storage driver code to
refresh a pool after volume APIs are called.

Changes since v1: small changes following comments

Changes since v2: #1 - fix broken alignment in datatypes and fix typos in
docstring
                  #2 - rename STORAGE_POOL_EVENT_SOURCES to
STORAGE_EVENT_SOURCES, change copyright
                  #3 - fixed spacing issue in comments in test driver
                  #4 - fix comment formating, change in comment,
move REMOTE_PROC_STORAGE_POOL_EVENT_LIFECYCLE to buttom of list
                  #5 - include storageEventState pointer, change version
from 1.3.6 to 2.0.0, use callbackID insted of ret in
storageConnectStoragePoolEventRegisterAny()
                  #6  - use domain like lifecycle event callback

Changes since v3: moved storage_conf.h from patch #2 to #6, indentation 
in remote_protocol-stucts (Martin's suggestion)

Jovanka Gulicoska (7):
  Introduce storage lifecycle event APIs
  conf: add storage_event handling
  test: implement storage lifecycle event APIs
  remote: implement storage lifecycle event APIs
  storage: implement storage lifecycle event APIs
  event-test: support storage lifecycle event APIs
  virsh: Introduce virsh-pool command

 daemon/libvirtd.h                   |   2 +
 daemon/remote.c                     | 207 ++++++++++++++++++++++++++++++-
 examples/object-events/event-test.c |  73 +++++++++++
 include/libvirt/libvirt-storage.h   |  93 ++++++++++++++
 src/Makefile.am                     |   5 +
 src/conf/storage_conf.h             |   4 +
 src/conf/storage_event.c            | 237 ++++++++++++++++++++++++++++++++++++
 src/conf/storage_event.h            |  60 +++++++++
 src/datatypes.h                     |  13 ++
 src/driver-storage.h                |  13 ++
 src/libvirt-storage.c               | 125 +++++++++++++++++++
 src/libvirt_private.syms            |   5 +
 src/libvirt_public.syms             |   6 +
 src/remote/remote_driver.c          | 128 +++++++++++++++++++
 src/remote/remote_protocol.x        |  43 ++++++-
 src/remote_protocol-structs         |  19 +++
 src/storage/storage_driver.c        | 110 +++++++++++++++++
 src/test/test_driver.c              |  71 +++++++++++
 tests/objecteventtest.c             | 177 +++++++++++++++++++++++++++
 tools/virsh-pool.c                  | 184 ++++++++++++++++++++++++++++
 20 files changed, 1571 insertions(+), 4 deletions(-)
 create mode 100644 src/conf/storage_event.c
 create mode 100644 src/conf/storage_event.h

-- 
2.5.5




More information about the libvir-list mailing list