1. 28 3月, 2012 1 次提交
  2. 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
  3. 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
  4. 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
  5. 10 2月, 2012 1 次提交
  6. 01 2月, 2012 1 次提交
  7. 29 12月, 2011 1 次提交
  8. 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
  9. 05 12月, 2011 2 次提交
  10. 01 12月, 2011 1 次提交
  11. 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
  12. 06 9月, 2011 1 次提交
  13. 02 9月, 2011 1 次提交
  14. 28 7月, 2011 4 次提交
  15. 25 7月, 2011 4 次提交
  16. 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
  17. 24 6月, 2011 1 次提交
  18. 17 6月, 2011 1 次提交
  19. 15 6月, 2011 1 次提交
  20. 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
  21. 11 3月, 2011 1 次提交
  22. 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
  23. 18 6月, 2010 1 次提交
  24. 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
  25. 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
  26. 29 4月, 2010 1 次提交
  27. 20 4月, 2010 1 次提交
    • D
      Fixup python binding for virDomainSnapshot APIs · 90302e7f
      Daniel P. Berrange 提交于
      The generator code was totally wrong for the virDomainSnapshot
      APIs, not generating the wrapper class, and giving methods the
      wrong names
      
      * generator.py: Set metadata for virDomainSnapshot type & APIs
      * libvirt-override-api.xml, libvirt-override.c: Hand-code the
        virDomainSnapshotListNames glue layer
      90302e7f
  28. 18 3月, 2010 1 次提交
    • P
      python: Fix networkLookupByUUID · 2ef091ef
      Philip Hahn 提交于
      According to:
      
      http://libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByUUID
      
      virNetworkLookupByUUID() expects a virConnectPtr as its first argument,
      thus making it a method of the virConnect Python class.
      
      Currently it's a method of libvirt.virNetwork.
      
      @@ -805,13 +805,6 @@ class virNetwork:
               if ret == -1: raise libvirtError ('virNetworkGetAutostart() failed', net=self)
               return ret
      
      -    def networkLookupByUUID(self, uuid):
      -        """Try to lookup a network on the given hypervisor based on its UUID. """
      -        ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
      -        if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', net=self)
      -        __tmp = virNetwork(self, _obj=ret)
      -        return __tmp
      -
       class virInterface:
           def __init__(self, conn, _obj=None):
               self._conn = conn
      @@ -1689,6 +1682,13 @@ class virConnect:
               __tmp = virDomain(self,_obj=ret)
               return __tmp
      
      +    def networkLookupByUUID(self, uuid):
      +        """Try to lookup a network on the given hypervisor based on its UUID. """
      +        ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
      +        if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', conn=self)
      +        __tmp = virNetwork(self, _obj=ret)
      +        return __tmp
      +
      2ef091ef
  29. 03 3月, 2010 1 次提交
    • D
      Introduce public API for domain async job handling · 7d575e09
      Daniel P. Berrange 提交于
      Introduce a new public API that provides a way to get progress
      info on currently running jobs on a virDomainpPtr. APIs that
      are initially within scope of this idea are
      
       virDomainMigrate
       virDomainMigrateToURI
       virDomainSave
       virDomainRestore
       virDomainCoreDump
      
      These all take a potentially long time and benefit from monitoring.
      The virDomainJobInfo struct allows for various pieces of information
      to be reported
      
       - Percentage completion
       - Time
       - Overall data
       - Guest memory data
       - Guest disk/file data
      
      * include/libvirt/libvirt.h.in: Add virDomainGetJobInfo
      * python/generator.py, python/libvirt-override-api.xml,
        python/libvirt-override.c: Override for virDomainGetJobInfo API
      * python/typewrappers.c, python/typewrappers.h: Introduce wrapper
        for unsigned long long type
      7d575e09
  30. 12 2月, 2010 1 次提交
  31. 22 1月, 2010 1 次提交
    • T
      Add virConnectGetVersion Python API · 912f5e58
      Taizo ITO 提交于
      adds a new python API call for retrieving the running
      hypervisor version used by a connection: virConnectGetVersion
      
      * python/generator.py: skip virConnectGetVersion from autogenerated
      * python/libvirt-override-api.xml python/libvirt-override.c: define
        direct native bindings
      912f5e58
  32. 20 12月, 2009 1 次提交
    • A
      python: Add python bindings for virDomainMemoryStats · 2c345831
      Adam Litke 提交于
      Enable virDomainMemoryStats in the python API.  dom.memoryStats() will return a
      dictionary containing the supported statistics.  A dictionary is required
      because the meaining of each quantity cannot be inferred from its index in a
      list.
      
      * python/generator.py: reenable bindings for this entry point
      * python/libvirt-override-api.xml python/libvirt-override.c: the
        generator can't handle this new function, add the new binding,
        and the XML description
      2c345831
  33. 20 11月, 2009 1 次提交