<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libvirt-python-split.git, branch v1.0.0-rc3</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>maint: consistent whitespace after 'if'</title>
<updated>2012-10-25T17:36:43+00:00</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2012-10-25T17:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=76097bfbb42e8d170e47466cbaf1e077053f6efa'/>
<id>76097bfbb42e8d170e47466cbaf1e077053f6efa</id>
<content type='text'>
Noticed during the review of the previous patch.

* python/libvirt-override.c: Use space between 'if ('.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Noticed during the review of the previous patch.

* python/libvirt-override.c: Use space between 'if ('.
</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>virNodeGetCPUMap: Define public API.</title>
<updated>2012-10-24T00:46:47+00:00</updated>
<author>
<name>Viktor Mihajlovski</name>
<email>mihajlov@linux.vnet.ibm.com</email>
</author>
<published>2012-10-23T20:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=2594a007509ef20e94636089e26237af7e862609'/>
<id>2594a007509ef20e94636089e26237af7e862609</id>
<content type='text'>
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: 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>
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: 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>Add support for SUSPEND_DISK event</title>
<updated>2012-10-15T10:09:10+00:00</updated>
<author>
<name>Martin Kletzander</name>
<email>mkletzan@redhat.com</email>
</author>
<published>2012-10-12T19:13:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=4248becb86df45d87e6a641d19cbe29a8ef94cf5'/>
<id>4248becb86df45d87e6a641d19cbe29a8ef94cf5</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Properly parse (unsigned) long long</title>
<updated>2012-10-13T00:54:11+00:00</updated>
<author>
<name>Guido Günther</name>
<email>agx@sigxcpu.org</email>
</author>
<published>2012-10-12T23:05:40+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=c360b84ba0d464c06d0e617ed753a71a84e8e8ee'/>
<id>c360b84ba0d464c06d0e617ed753a71a84e8e8ee</id>
<content type='text'>
This fixes problems on platforms where sizeof(long) != sizeof(long long)
like ia32.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes problems on platforms where sizeof(long) != sizeof(long long)
like ia32.
</pre>
</div>
</content>
</entry>
<entry>
<title>python: keep consistent handling of Python integer conversion</title>
<updated>2012-10-08T13:54:06+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-09-28T12:29:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=49873a855f0ede1388cea7ef37bf861e88950d61'/>
<id>49873a855f0ede1388cea7ef37bf861e88950d61</id>
<content type='text'>
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>
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>python: cleanup vcpu related binding APIs</title>
<updated>2012-10-08T13:53:58+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-09-28T08:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=f0b144406d83a37e6029896a6b5ec5ee4023b39d'/>
<id>f0b144406d83a37e6029896a6b5ec5ee4023b39d</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>python: return error if PyObject obj is NULL for unwrapper helper functions</title>
<updated>2012-09-28T08:43:12+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-09-26T17:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=b9355e94901e925dd2ac23935f03ef2385cc262a'/>
<id>b9355e94901e925dd2ac23935f03ef2385cc262a</id>
<content type='text'>
The result is indeterminate for NULL argument to python
functions as follows. It's better to return negative value in
these situations.

PyObject_IsTrue will segfault if the argument is NULL
PyFloat_AsDouble(NULL) is -1.000000
PyLong_AsUnsignedLongLong(NULL) is 0.000000
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The result is indeterminate for NULL argument to python
functions as follows. It's better to return negative value in
these situations.

PyObject_IsTrue will segfault if the argument is NULL
PyFloat_AsDouble(NULL) is -1.000000
PyLong_AsUnsignedLongLong(NULL) is 0.000000
</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>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-split.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>
</feed>
