1. 17 9月, 2012 1 次提交
    • O
      list: Expose virConnectListAllNodeDevices to Python binding · a3676b6c
      Osier Yang 提交于
      The implementation is done manually as the generator does not support
      wrapping lists of C pointers into Python objects.
      
      python/libvirt-override-api.xml: Document
      
      python/libvirt-override-virConnect.py:
        * Implementation for listAllNodeDevices.
      
      python/libvirt-override.c: Implementation for the wrapper.
      a3676b6c
  2. 12 9月, 2012 1 次提交
    • O
      list: Expose virConnectListAllInterfaces to Python binding · ec448fbf
      Osier Yang 提交于
      The implementation is done manually as the generator does not support
      wrapping lists of C pointers into Python objects.
      
      python/libvirt-override-api.xml: Document
      
      python/libvirt-override-virConnect.py:
        * New file, includes implementation of listAllInterfaces.
      
      python/libvirt-override.c: Implementation for the wrapper.
      ec448fbf
  3. 11 9月, 2012 1 次提交
    • O
      list: Expose virConnectListAllNetworks to Python binding · 9cc42701
      Osier Yang 提交于
      The implementation is done manually as the generator does not support
      wrapping lists of C pointers into Python objects.
      
      python/libvirt-override-api.xml: Document
      
      python/libvirt-override-virConnect.py: Implement listAllNetworks.
      
      python/libvirt-override.c: Implementation for the wrapper.
      9cc42701
  4. 10 9月, 2012 1 次提交
    • O
      list: Expose virStoragePoolListAllVolumes to Python binding · fa2e35a3
      Osier Yang 提交于
      The implementation is done manually as the generator does not support
      wrapping lists of C pointers into Python objects.
      
      python/libvirt-override-api.xml: Document
      
      python/libvirt-override-virStoragePool.py:
        * New file, includes implementation of listAllVolumes.
      
      python/libvirt-override.c: Implementation for the wrapper.
      fa2e35a3
  5. 06 9月, 2012 1 次提交
    • O
      python: Expose virStorageListAllStoragePools to python binding · 92785780
      Osier Yang 提交于
      The implementation is done manually as the generator does not support
      wrapping lists of C pointers into Python objects.
      
      python/libvirt-override-api.xml: Document
      python/libvirt-override-virConnect.py: Add listAllStoragePools
      python/libvirt-override.c: Implementation for the wrapper.
      92785780
  6. 20 6月, 2012 1 次提交
    • E
      list: provide python bindings for snapshots · f73d99c2
      Eric Blake 提交于
      This adds support for the new virDomainListAllSnapshots (a domain
      function) and virDomainSnapshotListAllChildren (a snapshot function)
      to the libvirt-python bindings.  The implementation is done manually
      as the generator does not support wrapping lists of C pointers into
      python objects.
      
      * python/libvirt-override.c (libvirt_virDomainListAllSnapshots)
      (libvirt_virDomainSnapshotListAllChildren): New functions.
      * python/libvirt-override-api.xml: Document them.
      * python/libvirt-override-virDomain.py (listAllSnapshots): New
      file.
      * python/libvirt-override-virDomainSnapshot.py (listAllChildren):
      Likewise.
      * python/Makefile.am (CLASSES_EXTRA): Ship them.
      f73d99c2
  7. 19 6月, 2012 1 次提交
    • P
      python: add API exports for virConnectListAllDomains() · bd34cc8c
      Peter Krempa 提交于
      This patch adds export of the new API function
      virConnectListAllDomains() to the libvirt-python bindings. The
      virConnect object now has method "listAllDomains" that takes only the
      flags parameter and returns a python list of virDomain object
      corresponding to virDomainPtrs returned by the underlying api.
      
      The implementation is done manually as the generator does not support
      wrapping list of virDomainPtrs into virDomain objects.
      bd34cc8c
  8. 28 3月, 2012 1 次提交
  9. 22 3月, 2012 1 次提交
    • G
      python: add virDomainGetCPUStats python binding API · a772f4ee
      Guannan Ren 提交于
          dom.getCPUStats(True, 0)
            [{'cpu_time': 24699446159L, 'system_time': 10870000000L, 'user_time': 950000000L}]
          dom.getCPUStats(False, 0)
            [{'cpu_time': 8535292289L}, {'cpu_time': 1005395355L}, {'cpu_time': 9351766377L}, {'cpu_time': 5813545649L}]
      
          *generator.py Add a new naming rule
          *libvirt-override-api.xml The API function description
          *libvirt-override.c Implement it.
      a772f4ee
  10. 16 2月, 2012 1 次提交
    • A
      python: Expose virDomain{G,S}etInterfaceParameters APIs in python binding · 8b29c459
      Alex Jia 提交于
      The v4 patch corrects indentation issues.
      
      The v3 patch follows latest python binding codes and change 'size'
      type from int to Py_ssize_t.
      
      An simple example to show how to use it:
      
      #!/usr/bin/env python
      
      import libvirt
      
      conn = libvirt.open(None)
      dom = conn.lookupByName('foo')
      
      print dom.interfaceParameters('vnet0', 0)
      
      params = {'outbound.peak': 10,
                'inbound.peak': 10,
                'inbound.burst': 20,
                'inbound.average': 20,
                'outbound.average': 30,
                'outbound.burst': 30}
      
      print dom.setInterfaceParameters('vnet0', params, 0)
      print dom.interfaceParameters('vnet0', 0)
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      8b29c459
  11. 11 2月, 2012 1 次提交
    • G
      python: make other APIs share common {get, set}PyVirTypedParameter · 56cec18d
      Guannan Ren 提交于
              *libvirt_virDomainBlockStatsFlags
              *libvirt_virDomainGetSchedulerParameters
              *libvirt_virDomainGetSchedulerParametersFlags
              *libvirt_virDomainSetSchedulerParameters
              *libvirt_virDomainSetSchedulerParametersFlags
              *libvirt_virDomainSetBlkioParameters
              *libvirt_virDomainGetBlkioParameters
              *libvirt_virDomainSetMemoryParameters
              *libvirt_virDomainGetMemoryParameters
              *libvirt_virDomainSetBlockIoTune
              *libvirt_virDomainGetBlockIoTune
      56cec18d
  12. 10 2月, 2012 1 次提交
  13. 01 2月, 2012 1 次提交
  14. 29 12月, 2011 1 次提交
  15. 15 12月, 2011 1 次提交
    • O
      python: Expose blockPeek and memoryPeek in Python binding · d758e0cb
      Osier Yang 提交于
      A simple example to show how to use it:
      
      \#! /usr/bin/python
      
      import os
      import sys
      import libvirt
      
      disk = "/var/lib/libvirt/images/test.img"
      
      conn = libvirt.open(None)
      dom = conn.lookupByName('test')
      
      mem_contents = dom.memoryPeek(0, 32, libvirt.VIR_MEMORY_VIRTUAL);
      sys.stdout.write(mem_contents)
      
      % python test.py | hexdump
      0000000 1660 0209 0000 0000 0000 0000 0000 0000
      0000010 0000 0000 0000 0000 d3a0 01d0 0000 0000
      0000020
      d758e0cb
  16. 05 12月, 2011 2 次提交
  17. 01 12月, 2011 1 次提交
  18. 11 10月, 2011 1 次提交
    • E
      snapshot: new virDomainSnapshotListChildrenNames API · f2013c9d
      Eric Blake 提交于
      The previous API addition allowed traversal up the hierarchy;
      this one makes it easier to traverse down the hierarchy.
      
      In the python bindings, virDomainSnapshotNumChildren can be
      generated, but virDomainSnapshotListChildrenNames had to copy
      from the hand-written example of virDomainSnapshotListNames.
      
      * include/libvirt/libvirt.h.in (virDomainSnapshotNumChildren)
      (virDomainSnapshotListChildrenNames): New prototypes.
      (VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS): New flag alias.
      * src/libvirt.c (virDomainSnapshotNumChildren)
      (virDomainSnapshotListChildrenNames): New functions.
      * src/libvirt_public.syms: Export them.
      * src/driver.h (virDrvDomainSnapshotNumChildren)
      (virDrvDomainSnapshotListChildrenNames): New callbacks.
      * python/generator.py (skip_impl, nameFixup): Update lists.
      * python/libvirt-override-api.xml: Likewise.
      * python/libvirt-override.c
      (libvirt_virDomainSnapshotListChildrenNames): New wrapper function.
      f2013c9d
  19. 06 9月, 2011 1 次提交
  20. 02 9月, 2011 1 次提交
  21. 28 7月, 2011 4 次提交
  22. 25 7月, 2011 4 次提交
  23. 22 7月, 2011 1 次提交
    • A
      Enable virDomainBlockPull in the python API · f50750b2
      Adam Litke 提交于
      virDomainGetBlockJobInfo requires manual override since it returns a
      custom type.
      
      * python/generator.py: reenable bindings for this entry point
      * python/libvirt-override-api.xml python/libvirt-override.c:
        manual overrides
      f50750b2
  24. 24 6月, 2011 1 次提交
  25. 17 6月, 2011 1 次提交
  26. 15 6月, 2011 1 次提交
  27. 16 5月, 2011 1 次提交
    • J
      virDomainGetState public API · d65a924b
      Jiri Denemark 提交于
      This API is supposed to replace virDomainGetInfo when the only purpose
      of calling it is getting current domain status.
      d65a924b
  28. 11 3月, 2011 1 次提交
  29. 13 10月, 2010 1 次提交
    • N
      Adding structure and defines for virDomainSet/GetMemoryParameters · bf1b76ff
      Nikunj A. Dadhania 提交于
      This patch adds a structure virMemoryParameter, it contains the name of
      the
      parameter and the type of the parameter along with a union.
      
      dv:
      + rename enums to VIR_DOMAIN_MEMORY_PARAM_*
      + remove some extraneous tabs
      
      v4:
      + Add unsigned int flags to the public api for future extensions
      
      v3:
      + Protoype for virDomainGetMemoryParameters and dummy python binding.
      
      v2:
      + Includes dummy python bindings for the library to build cleanly.
      + Define string constants like "hard_limit", etc.
      + re-order this patch.
      bf1b76ff
  30. 18 6月, 2010 1 次提交
  31. 21 5月, 2010 1 次提交
    • C
      Fix up the python bindings for snapshotting. · 8749256d
      Chris Lalancette 提交于
      This involved a few fixes.  To start with,
      an virDomainSnapshot object is really tied to a
      domain, not a connection, so we have to generate
      a slightly different object so that we can get
      at self._dom for the object.
      
      Next, we had to "dummy" up an override piece of
      XML with a bogus argument that the function doesn't
      actually take.  That's so that the generator places
      virDomainRevertToSnapshot underneath the correct
      class (namely, the virDomain class).
      
      Finally, we had to hand-implement the
      virDomainRevertToSnapshot implementation, ignoring the
      bogus pointer we are being passed.
      
      With all of this in place, I was able to successfully
      take a snapshot and revert to it using only the
      Python bindings.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      8749256d
  32. 30 4月, 2010 1 次提交
    • D
      Implement python binding for virDomainGetBlockInfo · 05776e09
      Daniel P. Berrange 提交于
      This binds the virDomainGetBlockInfo API to python's blockInfo
      method on the domain object
      
      >>> c = libvirt.openReadOnly('qemu:///session')
      >>> d = c.lookupByName('demo')
      >>> f = d.blockInfo("/dev/loop0", 0)
      >>> print f
      [1048576000L, 104857600L, 104857600L]
      
      * python/libvirt-override-api.xml: Define override signature
      * python/generator.py: Skip C impl generator for virDomainGetBlockInfo
      * python/libvirt-override.c: Manual impl of virDomainGetBlockInfo
      05776e09
  33. 29 4月, 2010 1 次提交