<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libvirt-python-split.git/libvirt-override-api.xml, branch v1.0.5.5</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/'/>
<entry>
<title>python: Fix emulatorpin API bindings</title>
<updated>2013-03-21T11:32:03+00:00</updated>
<author>
<name>Peter Krempa</name>
<email>pkrempa@redhat.com</email>
</author>
<published>2013-03-20T10:43:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=a5036ccfd634186c57202c7f49c4eb6703911220'/>
<id>a5036ccfd634186c57202c7f49c4eb6703911220</id>
<content type='text'>
The addition of emulator pinning APIs didn't think of doing the right
job with python APIs for them. The default generator produced unusable
code for this.

This patch switches to proper code as in the case of domain Vcpu pining.
This change can be classified as a python API-breaker but in the state
the code was before I doubt anyone was able to use it successfully.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The addition of emulator pinning APIs didn't think of doing the right
job with python APIs for them. The default generator produced unusable
code for this.

This patch switches to proper code as in the case of domain Vcpu pining.
This change can be classified as a python API-breaker but in the state
the code was before I doubt anyone was able to use it successfully.
</pre>
</div>
</content>
</entry>
<entry>
<title>python: fix bindings that don't raise an exception</title>
<updated>2013-03-21T03:24:49+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2013-03-21T03:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=48c23ca1f14b8cfe6ab52138f9ba5835198288be'/>
<id>48c23ca1f14b8cfe6ab52138f9ba5835198288be</id>
<content type='text'>
For example:
 &gt;&gt;&gt; dom.memoryStats()
 libvir: QEMU Driver error : Requested operation is not valid:\
         domain is not running

There are six such python API functions like so.
The root reason is that generator.py script checks the type of return
value of a python stub function defined in libvirt-api.xml or
libvirt-override-api.xml to see whether to add the raise clause or not
in python wrapper code in libvirt.py.

The type of return value is supposed to be C types.
For those stub functions which return python non-integer data type like
string, list, tuple, dictionary, the existing type in functions varies
from each other which leads problem like this.

Currently, in generator.py, it maintains a buggy whitelist for stub functions
returning a list type. I think it is easy to forget adding new function name
in the whitelist.

This patch makes the value of type consistent with C type "char *"
in libvirt-override-api.xml. For python, any of types could be printed
as string, so I choose "char *" in this case. And the comment in xml
could explain it when adding new function definition.

      &lt;function name='virNodeGetCPUStats' file='python'&gt;
        ...
 -      &lt;return type='virNodeCPUStats' info='...'/&gt;
 +      &lt;return type='char *' info='...'/&gt;
        ...
      &lt;/function&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For example:
 &gt;&gt;&gt; dom.memoryStats()
 libvir: QEMU Driver error : Requested operation is not valid:\
         domain is not running

There are six such python API functions like so.
The root reason is that generator.py script checks the type of return
value of a python stub function defined in libvirt-api.xml or
libvirt-override-api.xml to see whether to add the raise clause or not
in python wrapper code in libvirt.py.

The type of return value is supposed to be C types.
For those stub functions which return python non-integer data type like
string, list, tuple, dictionary, the existing type in functions varies
from each other which leads problem like this.

Currently, in generator.py, it maintains a buggy whitelist for stub functions
returning a list type. I think it is easy to forget adding new function name
in the whitelist.

This patch makes the value of type consistent with C type "char *"
in libvirt-override-api.xml. For python, any of types could be printed
as string, so I choose "char *" in this case. And the comment in xml
could explain it when adding new function definition.

      &lt;function name='virNodeGetCPUStats' file='python'&gt;
        ...
 -      &lt;return type='virNodeCPUStats' info='...'/&gt;
 +      &lt;return type='char *' info='...'/&gt;
        ...
      &lt;/function&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Implement virDomainMigrateGetCompressionCache wrapper</title>
<updated>2013-02-22T16:35:59+00:00</updated>
<author>
<name>Jiri Denemark</name>
<email>jdenemar@redhat.com</email>
</author>
<published>2013-02-18T22:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=7465d31bbd7388938c90556dcb470085918c00f5'/>
<id>7465d31bbd7388938c90556dcb470085918c00f5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Implement virDomainGetJobStats wrapper</title>
<updated>2013-02-22T16:35:58+00:00</updated>
<author>
<name>Jiri Denemark</name>
<email>jdenemar@redhat.com</email>
</author>
<published>2013-02-18T22:20:08+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=b1f3f2d37d2b008193ca58c97757f6163583bcd0'/>
<id>b1f3f2d37d2b008193ca58c97757f6163583bcd0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>virNodeGetCPUMap: Add python binding</title>
<updated>2012-10-25T17:34:35+00:00</updated>
<author>
<name>Viktor Mihajlovski</name>
<email>mihajlov@linux.vnet.ibm.com</email>
</author>
<published>2012-10-25T14:59:08+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=dae52c3ca701ee7cd654b00375ae06e439010e2f'/>
<id>dae52c3ca701ee7cd654b00375ae06e439010e2f</id>
<content type='text'>
Added a method getCPUMap to virConnect.
It can be used as follows:

import libvirt
import sys
import os

conn = libvirt.openReadOnly(None)
if conn == None:
    print 'Failed to open connection to the hypervisor'
    sys.exit(1)

try:
    (cpus, cpumap, online) = conn.getCPUMap(0)
except:
    print 'Failed to extract the node cpu map information'
    sys.exit(1)

print 'CPUs total %d, online %d' % (cpus, online)
print 'CPU map %s' % str(cpumap)

del conn
print "OK"

sys.exit(0)

Signed-off-by: Viktor Mihajlovski &lt;mihajlov@linux.vnet.ibm.com&gt;
Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added a method getCPUMap to virConnect.
It can be used as follows:

import libvirt
import sys
import os

conn = libvirt.openReadOnly(None)
if conn == None:
    print 'Failed to open connection to the hypervisor'
    sys.exit(1)

try:
    (cpus, cpumap, online) = conn.getCPUMap(0)
except:
    print 'Failed to extract the node cpu map information'
    sys.exit(1)

print 'CPUs total %d, online %d' % (cpus, online)
print 'CPU map %s' % str(cpumap)

del conn
print "OK"

sys.exit(0)

Signed-off-by: Viktor Mihajlovski &lt;mihajlov@linux.vnet.ibm.com&gt;
Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>node_memory: Expose the APIs to Python bindings</title>
<updated>2012-09-17T05:55:46+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-09-14T14:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=48e9333bec0e96b667ba5a17093ac4aeef3491a3'/>
<id>48e9333bec0e96b667ba5a17093ac4aeef3491a3</id>
<content type='text'>
* python/libvirt-override-api.xml: (Add document to describe
  the APIs).
* python/libvirt-override.c: (Implement the API wrappers manually)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* python/libvirt-override-api.xml: (Add document to describe
  the APIs).
* python/libvirt-override.c: (Implement the API wrappers manually)
</pre>
</div>
</content>
</entry>
<entry>
<title>list: Expose virConnectListAllSecrets to Python binding</title>
<updated>2012-09-17T05:18:51+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-09-14T08:38:51+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=4a8290241b6308c0a1827073ca9d5eeb7fbe6a0a'/>
<id>4a8290241b6308c0a1827073ca9d5eeb7fbe6a0a</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>list: Expose virConnectListAllNWFilters to Python binding</title>
<updated>2012-09-17T04:37:03+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-09-05T06:02:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=53687b26d27cbdd7258949b777512ecf20319a71'/>
<id>53687b26d27cbdd7258949b777512ecf20319a71</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>list: Expose virConnectListAllNodeDevices to Python binding</title>
<updated>2012-09-17T02:41:03+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-09-05T05:34:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=c9f08903d4bc4ebada4280781ea41fa61f5e8b2d'/>
<id>c9f08903d4bc4ebada4280781ea41fa61f5e8b2d</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>list: Expose virConnectListAllInterfaces to Python binding</title>
<updated>2012-09-12T07:37:09+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-09-04T16:10:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=b286824eee96095ba18b44339e8d33e8eb367d6a'/>
<id>b286824eee96095ba18b44339e8d33e8eb367d6a</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
