1. 23 2月, 2013 3 次提交
  2. 12 2月, 2013 1 次提交
  3. 08 2月, 2013 1 次提交
  4. 07 2月, 2013 1 次提交
  5. 06 2月, 2013 1 次提交
    • J
      sanitytest.py: Do not rely on system libvirt · 90873ab9
      Jiri Denemark 提交于
      When running sanitytest.py we should not rely on libvirt library
      installed on the system. And since we generate a nice wrapper called
      "run" that sets both PYTHON_PATH and LD_LIBRARY_PATH, we should just use
      it rather than trying to duplicate it in the Makefile.
      90873ab9
  6. 05 2月, 2013 1 次提交
  7. 31 1月, 2013 1 次提交
  8. 25 1月, 2013 1 次提交
    • J
      python: Fix bindings for virDomainSnapshotGet{Domain,Connect} · 7b35fd71
      Jiri Denemark 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=895882
      
      virDomainSnapshot.getDomain() and virDomainSnapshot.getConnect()
      wrappers around virDomainSnapshotGet{Domain,Connect} were not supposed
      to be ever implemented. The class should contain proper domain() and
      connect() accessors that fetch python objects stored internally within
      the class. While domain() was already provided, connect() was missing.
      
      This patch adds connect() method to virDomainSnapshot class and
      reimplements getDomain() and getConnect() methods as aliases to domain()
      and connect() for backward compatibility.
      7b35fd71
  9. 24 1月, 2013 1 次提交
  10. 18 1月, 2013 2 次提交
    • J
      Introduce virTypedParamsClear public API · de78bf60
      Jiri Denemark 提交于
      The function is just a renamed public version of former
      virTypedParameterArrayClear.
      de78bf60
    • J
      Add virTypedParams* APIs · 54dd75fd
      Jiri Denemark 提交于
      Working with virTypedParameters in clients written in C is ugly and
      requires all clients to duplicate the same code. This set of APIs makes
      this code for manipulating with virTypedParameters integral part of
      libvirt so that all clients may benefit from it.
      54dd75fd
  11. 17 1月, 2013 1 次提交
  12. 15 1月, 2013 1 次提交
  13. 14 1月, 2013 1 次提交
    • D
      Introduce an LXC specific public API & library · 3d1596b0
      Daniel P. Berrange 提交于
      This patch introduces support for LXC specific public APIs. In
      common with what was done for QEMU, this creates a libvirt_lxc.so
      library and libvirt/libvirt-lxc.h header file.
      
      The actual APIs are
      
        int virDomainLxcOpenNamespace(virDomainPtr domain,
                                      int **fdlist,
                                      unsigned int flags);
      
        int virDomainLxcEnterNamespace(virDomainPtr domain,
                                       unsigned int nfdlist,
                                       int *fdlist,
                                       unsigned int *noldfdlist,
                                       int **oldfdlist,
                                       unsigned int flags);
      
      which provide a way to use the setns() system call to move the
      calling process into the container's namespace. It is not
      practical to write in a generically applicable manner. The
      nearest that we could get to such an API would be an API which
      allows to pass a command + argv to be executed inside a
      container. Even if we had such a generic API, this LXC specific
      API is still useful, because it allows the caller to maintain
      the current process context, in particular any I/O streams they
      have open.
      
      NB the virDomainLxcEnterNamespace() API is special in that it
      runs client side, so does not involve the internal driver API.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3d1596b0
  14. 28 12月, 2012 1 次提交
    • M
      python: Adapt to virevent rename · e2d7e7c6
      Michal Privoznik 提交于
      With our recent renames under src/util/* we forgot to adapt
      python wrapper code generator. This results in some methods being
      not exposed:
      
      $ python examples/domain-events/events-python/event-test.py
      Using uri:qemu:///system
      Traceback (most recent call last):
        File "examples/domain-events/events-python/event-test.py", line 585, in <module>
          main()
        File "examples/domain-events/events-python/event-test.py", line 543, in main
          virEventLoopPureStart()
        File "examples/domain-events/events-python/event-test.py", line 416, in virEventLoopPureStart
          virEventLoopPureRegister()
        File "examples/domain-events/events-python/event-test.py", line 397, in virEventLoopPureRegister
          libvirt.virEventRegisterImpl(virEventAddHandleImpl,
      AttributeError: 'module' object has no attribute 'virEventRegisterImpl'
      e2d7e7c6
  15. 21 12月, 2012 2 次提交
  16. 04 12月, 2012 2 次提交
  17. 16 11月, 2012 1 次提交
  18. 02 11月, 2012 1 次提交
  19. 26 10月, 2012 2 次提交
  20. 24 10月, 2012 1 次提交
    • V
      virNodeGetCPUMap: Define public API. · 7ecc1d81
      Viktor Mihajlovski 提交于
      Adding a new API to obtain information about the
      host node's present, online and offline CPUs.
      
      int virNodeGetCPUMap(virConnectPtr conn,
                           unsigned char **cpumap,
                           unsigned int *online,
                           unsigned int flags);
      
      The function will return the number of CPUs present on the host
      or -1 on failure;
      If cpumap is non-NULL virNodeGetCPUMap will allocate an array
      containing a bit map representation of the online CPUs. It's
      the callers responsibility to deallocate cpumap using free().
      If online is non-NULL, the variable pointed to will contain
      the number of online host node CPUs.
      The variable flags has been added to support future extensions
      and must be set to 0.
      
      Extend the driver structure by nodeGetCPUMap entry in support of the
      new API virNodeGetCPUMap.
      Added implementation of virNodeGetCPUMap to libvirt.c
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7ecc1d81
  21. 15 10月, 2012 1 次提交
    • M
      Add support for SUSPEND_DISK event · 7ba5defb
      Martin Kletzander 提交于
      This patch adds support for SUSPEND_DISK event; both lifecycle and
      separated.  The support is added for QEMU, machines are changed to
      PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes
      to shut-off.  This and much more needs to be done in order for libvirt
      to work with transient devices, wake-ups etc.  This patch is not
      aiming for that functionality.
      7ba5defb
  22. 13 10月, 2012 1 次提交
  23. 08 10月, 2012 2 次提交
    • G
      python: keep consistent handling of Python integer conversion · 283f1c4a
      Guannan Ren 提交于
      libvirt_ulonglongUnwrap requires the integer type of python obj.
      But libvirt_longlongUnwrap still could handle python obj of
      Pyfloat_type which causes the float value to be rounded up
      to an integer.
      
      For example
       >>> dom.setSchedulerParameters({'vcpu_quota': 0.88})
       0
      libvirt_longlongUnwrap treats 0.88 as a valid value 0
      
      However
       >>> dom.setSchedulerParameters({'cpu_shares': 1000.22})
      libvirt_ulonglongUnwrap will throw out an error
      "TypeError: an integer is required"
      
      The patch make this consistent.
      283f1c4a
    • G
      python: cleanup vcpu related binding APIs · 2832663f
      Guannan Ren 提交于
      libvirt_virDomainGetVcpus: add error handling, return -1 instead of None
      libvirt_virDomainPinVcpu and libvirt_virDomainPinVcpuFlags:
        check the type of argument
        make use of libvirt_boolUnwrap
      
        Set bitmap according to these values which are contained in given
        argument of vcpu tuple and turn off these bit corresponding to
        missing vcpus in argument tuple
      
        The original way ignored the error info from PyTuple_GetItem
        if index is out of range.
        "IndexError: tuple index out of range"
        The error message will only be raised on next command in interactive mode.
      2832663f
  24. 28 9月, 2012 1 次提交
  25. 17 9月, 2012 8 次提交
    • O
      node_memory: Expose the APIs to Python bindings · 4c4c80df
      Osier Yang 提交于
      * python/libvirt-override-api.xml: (Add document to describe
        the APIs).
      * python/libvirt-override.c: (Implement the API wrappers manually)
      4c4c80df
    • O
      node_memory: Define the APIs to get/set memory parameters · 12ad7435
      Osier Yang 提交于
      * include/libvirt/libvirt.h.in: (Add macros for the param fields,
        declare the APIs).
      * src/driver.h: (New methods for the driver struct)
      * src/libvirt.c: (Implement the public APIs)
      * src/libvirt_public.syms: (Export the public symbols)
      12ad7435
    • O
      list: Expose virConnectListAllSecrets to Python binding · 473ee27e
      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 listAllSecrets.
      
      python/libvirt-override.c: Implementation for the wrapper.
      473ee27e
    • O
      list: Define new API virConnectListAllSecrets · 7a236982
      Osier Yang 提交于
      This is to list the secret objects. Supports to filter the secrets
      by its storage location, and whether it's private or not.
      
      include/libvirt/libvirt.h.in: Declare enum virConnectListAllSecretFlags
                                    and virConnectListAllSecrets.
      python/generator.py: Skip auto-generating
      src/driver.h: (virDrvConnectListAllSecrets)
      src/libvirt.c: Implement the public API
      src/libvirt_public.syms: Export the symbol to public
      7a236982
    • O
      list: Expose virConnectListAllNWFilters to Python binding · f4c1efaa
      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 listAllNWFilters.
      
      python/libvirt-override.c: Implementation for the wrapper.
      f4c1efaa
    • O
      list: Define new API virConnectListAllNWFilters · 6498f76e
      Osier Yang 提交于
      This is to list the network filter objects. No flags are supported
      
      include/libvirt/libvirt.h.in: Declare enum virConnectListAllNWFilterFlags
                                    and virConnectListAllNWFilters.
      python/generator.py: Skip auto-generating
      src/driver.h: (virDrvConnectListAllNWFilters)
      src/libvirt.c: Implement the public API
      src/libvirt_public.syms: Export the symbol to public
      6498f76e
    • 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
    • O
      list: Define new API virConnectListAllNodeDevices · c6a3be5d
      Osier Yang 提交于
      This is to list the node device objects, supports to filter the results
      by capability types.
      
      include/libvirt/libvirt.h.in: Declare enum virConnectListAllNodeDeviceFlags
                                    and virConnectListAllNodeDevices.
      python/generator.py: Skip auto-generating
      src/driver.h: (virDrvConnectListAllNodeDevices)
      src/libvirt.c: Implement the public API
      src/libvirt_public.syms: Export the symbol to public
      c6a3be5d
  26. 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