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

[libvirt] [PATCH 00/49 v2] Atomic APIs to list objects



v1 - v2:
  * Fix the stupid mistake - changing the public struct, error out
    if the new option '--type' for pool-list is specified, and
    the libvirt is old enough without listAllStoragePools supported.

Except the already supported APIs for domain and domain snapshot,
this series add the APIs for the left objects, including storage
pool, storage vol, network, interface, node device, nwfilter, and
secret.

  * Storage pool:
    - Support filtering the returned pool objects by active|inactive,
      persistent|transient, autostart|no-autostart, and pool types.
    - New options for virsh, --type to accept multiple pool types.

  * Storage vol:
    - Simply returns all the vol objects of a pool.

  * Network:
    - Support filtering the results using flags active|inactive,
      persistent|transient, autostart|no-autostart
    - New options for virsh.

  * Interface:
    - Support filtering the results using flags active|inactive.
      It's still O(n) underlying, as interface driver doesn't manage
      the objects itself, but using netcf lib instead. And netcf
      APIs don't support returning the struct yet.

  * Node Device:
    - Support filtering the results using capabilities type of
      the devices.
    - Extend --cap to accept multiple capability type.

  * Network Filter:
   - Simply returns all the objects.

  * Secret:
   - Simply returns all the objects.

All the affected commands are tested with both new libvirt with the
APIs support, or old libvirt without the support. But I still may
lose some scenarios. Please review carefully.

Osier Yang (49):
  Fix indentions
  list: Rename virdomainlist.[ch] for common use
  list: Define new API virStorageListALlStoragePools
  list: Add helpers for listing storage pool objects
  list: Implement the RPC calls for virConnectListAllStoragePools
  list: Implement listAllStoragePools for storage driver
  list: Implement listAllStoragePools for test driver
  list: Add helper to convert strings separated by ',' to array
  virsh: Fix the wrong doc for pool-list
  list: Change MATCH for common use in virsh
  list: Use virConnectListAllStoragePools in virsh
  virsh: Use vshPrint instead of printf
  python: Expose virStorageListAllStoragePools to python binding
  list: Define new API virStoragePoolListAllVolumes
  list: Implemente RPC calls for virStoragePoolListAllVolumes
  list: Implement virStoragePoolListAllVolumes for storage driver
  list: Implement virStoragePoolListAllVolumes for test driver
  list: Use virStoragePoolListAllVolumes in virsh
  list: Expose virStoragePoolListAllVolumes to Python binding
  list: Define new API virConnectListAllNetworks
  list: Implement RPC calls for virConnectListAllNetworks
  list: Add helpers to list network objects
  list: Implement listAllNetworks for network driver
  list: Implement listAllNetworks for test driver
  list: Use virConnectListAllNetworks in virsh
  list: Expose virConnectListAllNetworks to Python binding
  daemon: Fix the wrong macro name
  list: Define new API virConnectListAllInterfaces
  list: Implemente RPC calls for virConnectListAllInterfaces
  list: Implement listAllInterfaces
  list: Use virConnectListAllInterfaces in virsh
  list: Expose virConnectListAllInterfaces to Python binding
  list: Define new API virConnectListAllNodeDevices
  list: Implemente RPC calls for virConnectListAllNodeDevices
  list: Add helpers for listing node devices
  list: Implement listAllNodeDevices
  list: Expose virConnectListAllNodeDevices to Python binding
  virsh: Fix a bug of nodedev-list
  list: Use virConnectListAllNodeDevices in virsh
  list: Define new API virConnectListAllNWFilters
  list: Implement RPC calls for virConnectListAllNWFilters
  list: Implement listAllNWFilters
  list: Use virConnectListAllNWFilters in virsh
  list: Expose virConnectListAllNWFilters to Python binding
  list: Define new API virConnectListAllSecrets
  list: Implement RPC calls for virConnectListAllSecrets
  list: Implement listAllSecrets
  list: Use virConnectListAllSecrets in virsh
  list: Expose virConnectListAllSecrets to Python binding

 daemon/libvirtd.c                         |    2 +-
 daemon/remote.c                           |  382 +++++
 include/libvirt/libvirt.h.in              |  100 ++-
 python/generator.py                       |   11 +-
 python/libvirt-override-api.xml           |   44 +-
 python/libvirt-override-virConnect.py     |   72 +
 python/libvirt-override-virStoragePool.py |   11 +
 python/libvirt-override.c                 |  337 +++++
 src/Makefile.am                           |    8 +-
 src/conf/domain_conf.c                    |    2 +-
 src/conf/virdomainlist.c                  |  222 ---
 src/conf/virdomainlist.h                  |   84 --
 src/conf/virobjectlist.c                  |  535 +++++++
 src/conf/virobjectlist.h                  |  162 +++
 src/datatypes.h                           |   86 +-
 src/driver.h                              |   35 +-
 src/interface/netcf_driver.c              |  135 ++
 src/libvirt.c                             |  429 ++++++-
 src/libvirt_private.syms                  |    6 +-
 src/libvirt_public.syms                   |   11 +
 src/libxl/libxl_driver.c                  |    4 +-
 src/lxc/lxc_driver.c                      |    4 +-
 src/network/bridge_driver.c               |   18 +
 src/node_device/node_device_driver.c      |   16 +
 src/node_device/node_device_driver.h      |    3 +
 src/node_device/node_device_hal.c         |    1 +
 src/node_device/node_device_udev.c        |    1 +
 src/nwfilter/nwfilter_driver.c            |   57 +
 src/openvz/openvz_driver.c                |    4 +-
 src/qemu/qemu_driver.c                    |    4 +-
 src/remote/remote_driver.c                |  449 ++++++
 src/remote/remote_protocol.x              |   78 +-
 src/remote_protocol-structs               |   85 ++
 src/secret/secret_driver.c                |   58 +-
 src/storage/storage_driver.c              |   86 ++
 src/test/test_driver.c                    |  105 ++-
 src/uml/uml_driver.c                      |    4 +-
 src/vbox/vbox_tmpl.c                      |   10 +-
 src/vmware/vmware_driver.c                |    4 +-
 tests/virdrivermoduletest.c               |    2 +-
 tools/virsh.c                             | 2171 ++++++++++++++++++++++-------
 tools/virsh.pod                           |   51 +-
 42 files changed, 4952 insertions(+), 937 deletions(-)
 create mode 100644 python/libvirt-override-virStoragePool.py
 delete mode 100644 src/conf/virdomainlist.c
 delete mode 100644 src/conf/virdomainlist.h
 create mode 100644 src/conf/virobjectlist.c
 create mode 100644 src/conf/virobjectlist.h

Regards,
Osier


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