[PATCH 00/50] Atomic APIs to list objects

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

 



Except the already supported APIs for domain and domain snapshot,
this series add the APIs for all the left objects, including
storage pool, storage vol, network, interface, node device,
nwfilter, 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 commands are tested with both new libvirt with the APIs
support, or old libvirt without the support.

By the way, I'm wondering if should split the virsh wood, it's really
big now, and still growing up. It might take a bit more time to
compile if it's splitted into multiple files (split it by the command
group?) though, but it's good for maintaining and eyes (I have a small
screen). Any opinions?

Osier Yang (50):
  Fix indentions
  list: Expose pool type via virStoragePoolGetInfo
  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              |  117 ++-
 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/storage_conf.h                   |   19 -
 src/conf/virdomainlist.c                  |  222 ---
 src/conf/virdomainlist.h                  |   84 --
 src/conf/virobjectlist.c                  |  535 +++++++
 src/conf/virobjectlist.h                  |  162 +++
 src/datatypes.h                           |   48 +-
 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              |   88 ++
 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                             | 2206 ++++++++++++++++++++++-------
 tools/virsh.pod                           |   51 +-
 43 files changed, 4982 insertions(+), 942 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

--
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]