<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libvirt-python-v6.git, branch v0.9.11-rc2</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: make python APIs use these helper functions</title>
<updated>2012-03-28T14:54:06+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-03-27T06:06:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=e967d582f973a4f37db1526f5e455ea643294740'/>
<id>e967d582f973a4f37db1526f5e455ea643294740</id>
<content type='text'>
    *setPyVirTypedParameter
    *libvirt_virDomainGetCPUStats
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    *setPyVirTypedParameter
    *libvirt_virDomainGetCPUStats
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Add new helper functions for python to C integral conversion</title>
<updated>2012-03-28T14:42:40+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-03-27T06:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=db3debebf058b47328df47137b505e80b4adca08'/>
<id>db3debebf058b47328df47137b505e80b4adca08</id>
<content type='text'>
    int libvirt_intUnwrap(PyObject *obj, int *val);
    int libvirt_uintUnwrap(PyObject *obj, unsigned int *val);
    int libvirt_longUnwrap(PyObject *obj, long *val);
    int libvirt_ulongUnwrap(PyObject *obj, unsigned long *val);
    int libvirt_longlongUnwrap(PyObject *obj, long long *val);
    int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val);
    int libvirt_doubleUnwrap(PyObject *obj, double *val);
    int libvirt_boolUnwrap(PyObject *obj, bool *val);
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    int libvirt_intUnwrap(PyObject *obj, int *val);
    int libvirt_uintUnwrap(PyObject *obj, unsigned int *val);
    int libvirt_longUnwrap(PyObject *obj, long *val);
    int libvirt_ulongUnwrap(PyObject *obj, unsigned long *val);
    int libvirt_longlongUnwrap(PyObject *obj, long long *val);
    int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val);
    int libvirt_doubleUnwrap(PyObject *obj, double *val);
    int libvirt_boolUnwrap(PyObject *obj, bool *val);
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup for a return statement in source files</title>
<updated>2012-03-26T20:45:22+00:00</updated>
<author>
<name>Martin Kletzander</name>
<email>mkletzan@redhat.com</email>
</author>
<published>2012-03-22T11:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=a8e031a749d4e67a27cb2004b7c50f0456ecc401'/>
<id>a8e031a749d4e67a27cb2004b7c50f0456ecc401</id>
<content type='text'>
Return statements with parameter enclosed in parentheses were modified
and parentheses were removed. The whole change was scripted, here is how:

List of files was obtained using this command:
git grep -l -e '\&lt;return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
grep -e '\.[ch]$' -e '\.py$'

Found files were modified with this command:
sed -i -e                                                                 \
's_^\(.*\&lt;return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\&lt;return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'

Then checked for nonsense.

The whole command looks like this:
git grep -l -e '\&lt;return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e                            \
's_^\(.*\&lt;return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\&lt;return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return statements with parameter enclosed in parentheses were modified
and parentheses were removed. The whole change was scripted, here is how:

List of files was obtained using this command:
git grep -l -e '\&lt;return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
grep -e '\.[ch]$' -e '\.py$'

Found files were modified with this command:
sed -i -e                                                                 \
's_^\(.*\&lt;return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\&lt;return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'

Then checked for nonsense.

The whole command looks like this:
git grep -l -e '\&lt;return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e                            \
's_^\(.*\&lt;return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\&lt;return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for the suspend event</title>
<updated>2012-03-23T15:12:18+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-03-23T14:50:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=dc2f75d35a6461c896a738d092dc973067d0dbd4'/>
<id>dc2f75d35a6461c896a738d092dc973067d0dbd4</id>
<content type='text'>
This patch introduces a new event type for the QMP event
SUSPEND:

    VIR_DOMAIN_EVENT_ID_PMSUSPEND

The event doesn't take any data, but considering there might
be reason for wakeup in future, the callback definition is:

typedef void
(*virConnectDomainEventSuspendCallback)(virConnectPtr conn,
                                        virDomainPtr dom,
                                        int reason,
                                        void *opaque);

"reason" is unused currently, always passes "0".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new event type for the QMP event
SUSPEND:

    VIR_DOMAIN_EVENT_ID_PMSUSPEND

The event doesn't take any data, but considering there might
be reason for wakeup in future, the callback definition is:

typedef void
(*virConnectDomainEventSuspendCallback)(virConnectPtr conn,
                                        virDomainPtr dom,
                                        int reason,
                                        void *opaque);

"reason" is unused currently, always passes "0".
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for the wakeup event</title>
<updated>2012-03-23T15:12:14+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-03-23T14:43:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=29b16a45d77586672631537bfe877455fa5527ac'/>
<id>29b16a45d77586672631537bfe877455fa5527ac</id>
<content type='text'>
This patch introduces a new event type for the QMP event
WAKEUP:

    VIR_DOMAIN_EVENT_ID_PMWAKEUP

The event doesn't take any data, but considering there might
be reason for wakeup in future, the callback definition is:

typedef void
(*virConnectDomainEventWakeupCallback)(virConnectPtr conn,
                                       virDomainPtr dom,
                                       int reason,
                                       void *opaque);

"reason" is unused currently, always passes "0".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new event type for the QMP event
WAKEUP:

    VIR_DOMAIN_EVENT_ID_PMWAKEUP

The event doesn't take any data, but considering there might
be reason for wakeup in future, the callback definition is:

typedef void
(*virConnectDomainEventWakeupCallback)(virConnectPtr conn,
                                       virDomainPtr dom,
                                       int reason,
                                       void *opaque);

"reason" is unused currently, always passes "0".
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for event tray moved of removable disks</title>
<updated>2012-03-23T15:10:26+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-03-23T13:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=4b6a7b3fce2e30e600db5bee484badfe25f8e3f2'/>
<id>4b6a7b3fce2e30e600db5bee484badfe25f8e3f2</id>
<content type='text'>
This patch introduces a new event type for the QMP event
DEVICE_TRAY_MOVED, which occurs when the tray of a removable
disk is moved (i.e opened or closed):

    VIR_DOMAIN_EVENT_ID_TRAY_CHANGE

The event's data includes the device alias and the reason
for tray status' changing, which indicates why the tray
status was changed. Thus the callback definition for the event
is:

enum {
    VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0,
    VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE,

\#ifdef VIR_ENUM_SENTINELS
    VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST
\#endif
} virDomainEventTrayChangeReason;

typedef void
(*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn,
                                           virDomainPtr dom,
                                           const char *devAlias,
                                           int reason,
                                           void *opaque);
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new event type for the QMP event
DEVICE_TRAY_MOVED, which occurs when the tray of a removable
disk is moved (i.e opened or closed):

    VIR_DOMAIN_EVENT_ID_TRAY_CHANGE

The event's data includes the device alias and the reason
for tray status' changing, which indicates why the tray
status was changed. Thus the callback definition for the event
is:

enum {
    VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0,
    VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE,

\#ifdef VIR_ENUM_SENTINELS
    VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST
\#endif
} virDomainEventTrayChangeReason;

typedef void
(*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn,
                                           virDomainPtr dom,
                                           const char *devAlias,
                                           int reason,
                                           void *opaque);
</pre>
</div>
</content>
</entry>
<entry>
<title>python: add virDomainGetCPUStats python binding API</title>
<updated>2012-03-22T14:55:48+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-03-20T04:34:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=65ef8171496537b49fcdd0a5b833d61a8ad23351'/>
<id>65ef8171496537b49fcdd0a5b833d61a8ad23351</id>
<content type='text'>
    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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    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.
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Avoid memory leaks on libvirt_virNodeGetCPUStats</title>
<updated>2012-03-22T02:19:13+00:00</updated>
<author>
<name>Alex Jia</name>
<email>ajia@redhat.com</email>
</author>
<published>2012-03-21T16:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=debe58f6f7609abcb330b5ab4f69f7ffab830b08'/>
<id>debe58f6f7609abcb330b5ab4f69f7ffab830b08</id>
<content type='text'>
Detected by valgrind. Leaks are introduced in commit 4955602.

* python/libvirt-override.c (libvirt_virNodeGetCPUStats): fix memory leaks
and improve codes return value.

For details, please see the following link:
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770943

Signed-off-by: Alex Jia &lt;ajia@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Detected by valgrind. Leaks are introduced in commit 4955602.

* python/libvirt-override.c (libvirt_virNodeGetCPUStats): fix memory leaks
and improve codes return value.

For details, please see the following link:
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770943

Signed-off-by: Alex Jia &lt;ajia@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Avoid memory leaks on libvirt_virNodeGetMemoryStats</title>
<updated>2012-03-21T15:32:34+00:00</updated>
<author>
<name>Alex Jia</name>
<email>ajia@redhat.com</email>
</author>
<published>2012-03-21T15:30:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=b564c3c00299acb188eb0dec696ea39b51165d8c'/>
<id>b564c3c00299acb188eb0dec696ea39b51165d8c</id>
<content type='text'>
Detected by valgrind. Leaks are introduced in commit 17c7795.

* python/libvirt-override.c (libvirt_virNodeGetMemoryStats): fix memory leaks
and improve codes return value.

For details, please see the following link:
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770944

Signed-off-by: Alex Jia &lt;ajia@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Detected by valgrind. Leaks are introduced in commit 17c7795.

* python/libvirt-override.c (libvirt_virNodeGetMemoryStats): fix memory leaks
and improve codes return value.

For details, please see the following link:
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770944

Signed-off-by: Alex Jia &lt;ajia@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: always include config.h first</title>
<updated>2012-03-20T22:54:39+00:00</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2012-03-20T22:44:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-v6.git/commit/?id=fdb343d1b09278b2098cd69fa0abce1a72c624bc'/>
<id>fdb343d1b09278b2098cd69fa0abce1a72c624bc</id>
<content type='text'>
On RHEL 5.7, I got this compilation failure:

In file included from /usr/include/python2.4/pyport.h:98,
                 from /usr/include/python2.4/Python.h:55,
                 from libvirt.c:3:
../gnulib/lib/time.h:468: error: expected ';', ',' or ')' before '__timer'

Turns out that our '#define restrict __restrict' from config.h wasn't
being picked up.  Gnulib _requires_ that all .c files include &lt;config.h&gt;
first, otherwise the gnulib header overrides tend to misbehave.

Problem introduced by patch c700613b8.

* python/generator.py (buildStubs): Include &lt;config.h&gt; first.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On RHEL 5.7, I got this compilation failure:

In file included from /usr/include/python2.4/pyport.h:98,
                 from /usr/include/python2.4/Python.h:55,
                 from libvirt.c:3:
../gnulib/lib/time.h:468: error: expected ';', ',' or ')' before '__timer'

Turns out that our '#define restrict __restrict' from config.h wasn't
being picked up.  Gnulib _requires_ that all .c files include &lt;config.h&gt;
first, otherwise the gnulib header overrides tend to misbehave.

Problem introduced by patch c700613b8.

* python/generator.py (buildStubs): Include &lt;config.h&gt; first.
</pre>
</div>
</content>
</entry>
</feed>
