<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libvirt-python-v6.git, branch libvirt-0.10.2-26.el6</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-v6.git/'/>
<entry>
<title>python: fix bindings that don't raise an exception</title>
<updated>2013-08-21T14:05:37+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2013-08-21T08:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=ec6ed4d7c8f24cef96cb28a45b7f4baab02741fd'/>
<id>ec6ed4d7c8f24cef96cb28a45b7f4baab02741fd</id>
<content type='text'>
Resovles: https://bugzilla.redhat.com/show_bug.cgi?id=912170
(cherry picked from commit 4b143ab23173000d1afa258726be0ff38cf2b386)

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;

Conflicts:
	python/libvirt-override-api.xml
        *no virDomainGetJobStats and virNodeGetCPUMap APIs in RHEL6.5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resovles: https://bugzilla.redhat.com/show_bug.cgi?id=912170
(cherry picked from commit 4b143ab23173000d1afa258726be0ff38cf2b386)

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;

Conflicts:
	python/libvirt-override-api.xml
        *no virDomainGetJobStats and virNodeGetCPUMap APIs in RHEL6.5
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Fix bindings for virDomainSnapshotGet{Domain,Connect}</title>
<updated>2013-06-06T12:06:23+00:00</updated>
<author>
<name>Jiri Denemark</name>
<email>jdenemar@redhat.com</email>
</author>
<published>2013-01-23T11:14:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=60d87b704e7cb1251da46e825033eb3d35311ae2'/>
<id>60d87b704e7cb1251da46e825033eb3d35311ae2</id>
<content type='text'>
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.
(cherry picked from commit 7b35fd718d2156224797ace08f752dfbb9884520)

Conflicts:
	python/generator.py -- context
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
(cherry picked from commit 7b35fd718d2156224797ace08f752dfbb9884520)

Conflicts:
	python/generator.py -- context
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for SUSPEND_DISK event</title>
<updated>2012-10-15T10:29:00+00:00</updated>
<author>
<name>Martin Kletzander</name>
<email>mkletzan@redhat.com</email>
</author>
<published>2012-10-15T10:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=2508c934bc82e40a1b35271e6ad8bcd73c05a73b'/>
<id>2508c934bc82e40a1b35271e6ad8bcd73c05a73b</id>
<content type='text'>
https://bugzilla.redhat.com/show_bug.cgi?id=839661

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.
(cherry picked from commit 7ba5defb5a34bb82de2f16467c2b8d157cd14d2d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugzilla.redhat.com/show_bug.cgi?id=839661

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.
(cherry picked from commit 7ba5defb5a34bb82de2f16467c2b8d157cd14d2d)
</pre>
</div>
</content>
</entry>
<entry>
<title>python: keep consistent handling of Python integer conversion</title>
<updated>2012-10-12T15:01:07+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-10-12T13:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=cd4d093eef4a3a5ff7e2df436ba52501186634ec'/>
<id>cd4d093eef4a3a5ff7e2df436ba52501186634ec</id>
<content type='text'>
Resolve BZ:https://bugzilla.redhat.com/show_bug.cgi?id=816609
(cherry picked from commit 283f1c4aef8736d61c3965874a837537fea05dbc)

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
 &gt;&gt;&gt; dom.setSchedulerParameters({'vcpu_quota': 0.88})
 0
libvirt_longlongUnwrap treats 0.88 as a valid value 0

However
 &gt;&gt;&gt; dom.setSchedulerParameters({'cpu_shares': 1000.22})
libvirt_ulonglongUnwrap will throw out an error
"TypeError: an integer is required"

The patch make this consistent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolve BZ:https://bugzilla.redhat.com/show_bug.cgi?id=816609
(cherry picked from commit 283f1c4aef8736d61c3965874a837537fea05dbc)

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
 &gt;&gt;&gt; dom.setSchedulerParameters({'vcpu_quota': 0.88})
 0
libvirt_longlongUnwrap treats 0.88 as a valid value 0

However
 &gt;&gt;&gt; dom.setSchedulerParameters({'cpu_shares': 1000.22})
libvirt_ulonglongUnwrap will throw out an error
"TypeError: an integer is required"

The patch make this consistent.
</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-v6.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>node_memory: Define the APIs to get/set memory parameters</title>
<updated>2012-09-17T05:49:44+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-09-14T14:42:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=270cebde5a7c3b735620f79ffd4463b9f1dc2e97'/>
<id>270cebde5a7c3b735620f79ffd4463b9f1dc2e97</id>
<content type='text'>
* 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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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)
</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-v6.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: Define new API virConnectListAllSecrets</title>
<updated>2012-09-17T05:08:39+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-09-14T08:38:48+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=c29d33763777b68fd43f9d8d0e73f10e18677612'/>
<id>c29d33763777b68fd43f9d8d0e73f10e18677612</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</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-v6.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: Define new API virConnectListAllNWFilters</title>
<updated>2012-09-17T04:35:15+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-09-05T06:02:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=ff9990a39d5b607355baa7adbb700e2021763aa5'/>
<id>ff9990a39d5b607355baa7adbb700e2021763aa5</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
