1. 28 7月, 2011 2 次提交
  2. 27 7月, 2011 1 次提交
  3. 26 7月, 2011 1 次提交
  4. 25 7月, 2011 4 次提交
  5. 22 7月, 2011 2 次提交
    • A
      Asynchronous event for BlockJob completion · d489b046
      Adam Litke 提交于
      When an operation started by virDomainBlockPull completes (either with
      success or with failure), raise an event to indicate the final status.
      This API allow users to avoid polling on virDomainGetBlockJobInfo if
      they would prefer to use an event mechanism.
      
      * daemon/remote.c: Dispatch events to client
      * include/libvirt/libvirt.h.in: Define event ID and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle the new event
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block_stream completion and emit a libvirt block pull event
      * src/remote/remote_driver.c: Receive and dispatch events to application
      * src/remote/remote_protocol.x: Wire protocol definition for the event
      * src/remote_protocol-structs: structure definitions for protocol verification
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event
        from QEMU monitor
      d489b046
    • 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
  6. 14 7月, 2011 1 次提交
    • E
      python: prefer unsigned flags · 07d5d073
      Eric Blake 提交于
      * python/libvirt-override.c (libvirt_virConnectOpenAuth)
      (libvirt_virDomainSnapshotListNames)
      (libvirt_virDomainRevertToSnapshot): Change flags type.
      07d5d073
  7. 07 7月, 2011 1 次提交
  8. 24 6月, 2011 2 次提交
  9. 21 6月, 2011 5 次提交
  10. 17 6月, 2011 1 次提交
  11. 15 6月, 2011 2 次提交
    • A
      Asynchronous event for BlockPull completion · 12cd77a0
      Adam Litke 提交于
      When an operation started by virDomainBlockPullAll completes (either with
      success or with failure), raise an event to indicate the final status.  This
      allows an API user to avoid polling on virDomainBlockPullInfo if they would
      prefer to use the event mechanism.
      
      * daemon/remote.c: Dispatch events to client
      * include/libvirt/libvirt.h.in: Define event ID and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle the new event
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block_stream completion and emit a libvirt block pull event
      * src/remote/remote_driver.c: Receive and dispatch events to application
      * src/remote/remote_protocol.x: Wire protocol definition for the event
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event
        from QEMU monitor
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      12cd77a0
    • A
      Enable virDomainBlockPull in the python API. · d74b86f5
      Adam Litke 提交于
      virDomainBlockPullAll and virDomainBlockPullAbort are handled automatically.
      virDomainBlockPull and virDomainBlockPullInfo require manual overrides since
      they return a custom type.
      
      * python/generator.py: reenable bindings for this entry point
      * python/libvirt-override-api.xml python/libvirt-override.c:
        manual overrides
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      Acked-by: NDaniel P. Berrange <berrange@redhat.com>
      d74b86f5
  12. 08 6月, 2011 1 次提交
    • E
      python: avoid unlikely sign extension bug · f73198df
      Eric Blake 提交于
      Detected by Coverity.  cpumap was allocated with a value of
      (unsigned short)*(int), which is an int computation, and then
      promotes to size_t.  On a 64-bit platform, this fails if bit
      32 of the product is set (because of sign extension giving
      a HUGE value to malloc), even though a naive programmer would
      assume that since the first value is unsigned, the product
      is also unsigned and at most 4GB would be allocated.
      
      Won't bite in practice (the product should never be that large),
      but worth using the right types to begin with, so that we are
      now computing (unsigned short)*(size_t).
      
      * python/libvirt-override.c (libvirt_virDomainGetVcpus): Use
      correct type.
      f73198df
  13. 29 5月, 2011 2 次提交
    • D
      Introduce a new event emitted when a virtualization failure occurs · a6135ec1
      Daniel P. Berrange 提交于
      This introduces a new domain
      
        VIR_DOMAIN_EVENT_ID_CONTROL_ERROR
      
      Which uses the existing generic callback
      
      typedef void (*virConnectDomainEventGenericCallback)(virConnectPtr conn,
                                                           virDomainPtr dom,
                                                           void *opaque);
      
      This event is intended to be emitted when there is a failure in
      some part of the domain virtualization system. Whether the domain
      continues to run/exist after the failure is an implementation
      detail specific to the hypervisor.
      
      The idea is that with some types of failure, hypervisors may
      prefer to leave the domain running in a "degraded" mode of
      operation. For example, if something goes wrong with the QEMU
      monitor, it is possible to leave the guest OS running quite
      happily. The mgmt app will simply loose the ability todo various
      tasks. The mgmt app can then choose how/when to deal with the
      failure that occured.
      * daemon/remote.c: Dispatch of new event
      * examples/domain-events/events-c/event-test.c: Demo catch
        of event
      * include/libvirt/libvirt.h.in: Define event ID and callback
      * src/conf/domain_event.c, src/conf/domain_event.h: Internal
        event handling
      * src/remote/remote_driver.c: Receipt of new event from daemon
      * src/remote/remote_protocol.x: Wire protocol for new event
      * src/remote_protocol-structs: add new event for checks
      a6135ec1
    • E
      libvirt.h: avoid regression, and document preferred name · a9b3a78f
      Eric Blake 提交于
      Commit 824dcaff was a regression (thankfully unreleased) for any
      client code that used 'struct _virSchedParameter' directly rather
      than the preferred virSchedParameter typedef.  Adding a #define
      avoids even that API change, while rearranging the file makes it
      clear what the old vs. new API is.
      
      * include/libvirt/libvirt.h.in: Rearrange older names to the
      bottom and improve documentation on preferred names.
      (virDomainGetSchedulerParameters, virDomainSetSchedulerParameters)
      (virDomainSetSchedulerParametersFlags)
      (virDomainSetBlkioParameters, virDomainGetBlkioParameters)
      (virDomainSetMemoryParameters, virDomainGetMemoryParameters):
      Use newer type names.
      * python/libvirt-override.c: Adjust code generation to cope.
      Suggested by Daniel P. Berrange.
      a9b3a78f
  14. 24 5月, 2011 1 次提交
  15. 23 5月, 2011 1 次提交
  16. 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
  17. 11 3月, 2011 1 次提交
  18. 13 10月, 2010 2 次提交
    • M
      Fix several minor problems introduced by the memtune series · 43c2c61f
      Matthias Bolte 提交于
      Add proper documentation to the new VIR_DOMAIN_MEMORY_* macros in
      libvirt.h.in to placate apibuild.py.
      
      Mark args as unused in for libvirt_virDomain{Get,Set}MemoryParameters
      in the Python bindings and add both to the libvirtMethods array.
      
      Update remote_protocol-structs to placate make syntax-check.
      
      Undo unintended modifications in vboxDomainGetInfo.
      
      Update the function table of the VirtualBox and XenAPI drivers.
      43c2c61f
    • 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
  19. 14 7月, 2010 1 次提交
  20. 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
  21. 19 5月, 2010 1 次提交
  22. 30 4月, 2010 2 次提交
    • D
      Add support for another explicit IO error event · 34dcbbb4
      Daniel P. Berrange 提交于
      This introduces a new event type
      
         VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
      
      This event is the same as the previous VIR_DOMAIN_ID_IO_ERROR
      event, but also includes a string describing the cause of
      the event.
      
      Thus there is a new callback definition for this event type
      
      typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn,
                                                                 virDomainPtr dom,
                                                                 const char *srcPath,
                                                                 const char *devAlias,
                                                                 int action,
                                                                 const char *reason,
                                                                 void *opaque);
      
      This is currently wired up to the QEMU block IO error events
      
      * daemon/remote.c: Dispatch IO error events to client
      * examples/domain-events/events-c/event-test.c: Watch for
        IO error events
      * include/libvirt/libvirt.h.in: Define new IO error event ID
        and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle IO error events
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block IO errors and emit a libvirt IO error event
      * src/remote/remote_driver.c: Receive and dispatch IO error
        events to application
      * src/remote/remote_protocol.x: Wire protocol definition for
        IO error events
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
        from QEMU monitor
      34dcbbb4
    • 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
  23. 29 4月, 2010 1 次提交
  24. 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
  25. 08 4月, 2010 1 次提交
    • D
      Fix up python bindings for new event callbacks · 6df7d55d
      Daniel P. Berrange 提交于
      The generator was disabled for the new event callbacks, since they
      need to be hand written. This patch  adds the C and python glue to
      expose the new APIs in the python binding. The python example
      program is extended to demonstrate of the code
      
      * python/libvirt-override.c: Registration and dispatch of events
         at the C layer
      * python/libvirt-override-virConnect.py: Python glue for events
      * examples/domain-events/events-python/event-test.py: Demo use
        of new event callbacks
      6df7d55d
  26. 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