<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libvirt-python-split.git, branch v0.8.1</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>Add support for another explicit IO error event</title>
<updated>2010-04-30T14:52:59+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2010-03-18T19:37:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=99d0d2371deb18d969fdbf7fb7805540b7c4517e'/>
<id>99d0d2371deb18d969fdbf7fb7805540b7c4517e</id>
<content type='text'>
This introduces a new event type

   VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON

This event is the same as the previous VIR_DOMAIN_ID_IO_ERROR
event, but also includes a string describing the cause of
the event.

Thus there is a new callback definition for this event type

typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn,
                                                           virDomainPtr dom,
                                                           const char *srcPath,
                                                           const char *devAlias,
                                                           int action,
                                                           const char *reason,
                                                           void *opaque);

This is currently wired up to the QEMU block IO error events

* daemon/remote.c: Dispatch IO error events to client
* examples/domain-events/events-c/event-test.c: Watch for
  IO error events
* include/libvirt/libvirt.h.in: Define new IO error event ID
  and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
  src/libvirt_private.syms: Extend API to handle IO error events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
  for block IO errors and emit a libvirt IO error event
* src/remote/remote_driver.c: Receive and dispatch IO error
  events to application
* src/remote/remote_protocol.x: Wire protocol definition for
  IO error events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
  from QEMU monitor
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces a new event type

   VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON

This event is the same as the previous VIR_DOMAIN_ID_IO_ERROR
event, but also includes a string describing the cause of
the event.

Thus there is a new callback definition for this event type

typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn,
                                                           virDomainPtr dom,
                                                           const char *srcPath,
                                                           const char *devAlias,
                                                           int action,
                                                           const char *reason,
                                                           void *opaque);

This is currently wired up to the QEMU block IO error events

* daemon/remote.c: Dispatch IO error events to client
* examples/domain-events/events-c/event-test.c: Watch for
  IO error events
* include/libvirt/libvirt.h.in: Define new IO error event ID
  and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
  src/libvirt_private.syms: Extend API to handle IO error events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
  for block IO errors and emit a libvirt IO error event
* src/remote/remote_driver.c: Receive and dispatch IO error
  events to application
* src/remote/remote_protocol.x: Wire protocol definition for
  IO error events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
  from QEMU monitor
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement python binding for virDomainGetBlockInfo</title>
<updated>2010-04-29T16:21:32+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2010-04-28T12:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=5c99e3b35c5546f46e6c7666fe506bdb29ab738e'/>
<id>5c99e3b35c5546f46e6c7666fe506bdb29ab738e</id>
<content type='text'>
This binds the virDomainGetBlockInfo API to python's blockInfo
method on the domain object

&gt;&gt;&gt; c = libvirt.openReadOnly('qemu:///session')
&gt;&gt;&gt; d = c.lookupByName('demo')
&gt;&gt;&gt; f = d.blockInfo("/dev/loop0", 0)
&gt;&gt;&gt; print f
[1048576000L, 104857600L, 104857600L]

* python/libvirt-override-api.xml: Define override signature
* python/generator.py: Skip C impl generator for virDomainGetBlockInfo
* python/libvirt-override.c: Manual impl of virDomainGetBlockInfo
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This binds the virDomainGetBlockInfo API to python's blockInfo
method on the domain object

&gt;&gt;&gt; c = libvirt.openReadOnly('qemu:///session')
&gt;&gt;&gt; d = c.lookupByName('demo')
&gt;&gt;&gt; f = d.blockInfo("/dev/loop0", 0)
&gt;&gt;&gt; print f
[1048576000L, 104857600L, 104857600L]

* python/libvirt-override-api.xml: Define override signature
* python/generator.py: Skip C impl generator for virDomainGetBlockInfo
* python/libvirt-override.c: Manual impl of virDomainGetBlockInfo
</pre>
</div>
</content>
</entry>
<entry>
<title>nwfilter: python bindings for nwfilter</title>
<updated>2010-04-29T10:46:01+00:00</updated>
<author>
<name>Stefan Berger</name>
<email>stefanb@us.ibm.com</email>
</author>
<published>2010-04-29T10:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=626e52010b6151cbae01e91aa0b94dae8490537c'/>
<id>626e52010b6151cbae01e91aa0b94dae8490537c</id>
<content type='text'>
I have primarily followed the pattern of the 'secret' driver to provide
support for the missing python bindings for the network filter API.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I have primarily followed the pattern of the 'secret' driver to provide
support for the missing python bindings for the network filter API.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't ship generated python/libvirt.? files.</title>
<updated>2010-04-20T14:13:06+00:00</updated>
<author>
<name>Philipp Hahn</name>
<email>hahn@univention.de</email>
</author>
<published>2010-04-15T10:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=e4affdfbc19a6bd2778acf0e64a947cecd7eea83'/>
<id>e4affdfbc19a6bd2778acf0e64a947cecd7eea83</id>
<content type='text'>
libvirt.c and libvirt.h are auto-generated files. Mentioning their names
in *_SOURCES includes them in the distribution. During an out-of-tree
build these shipped files are included instead of the auto-generated
version, potentially breaking the build (as it happend in 0.8.0, because
the shipped libvirt.h was missing the declaration for
'libvirt_virDomainUpdateDeviceFlags')

Use the nodist_*_SOURCES automake variable instead.

Signed-off-by: Philipp Hahn &lt;hahn@univention.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libvirt.c and libvirt.h are auto-generated files. Mentioning their names
in *_SOURCES includes them in the distribution. During an out-of-tree
build these shipped files are included instead of the auto-generated
version, potentially breaking the build (as it happend in 0.8.0, because
the shipped libvirt.h was missing the declaration for
'libvirt_virDomainUpdateDeviceFlags')

Use the nodist_*_SOURCES automake variable instead.

Signed-off-by: Philipp Hahn &lt;hahn@univention.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixup python binding for virDomainSnapshot APIs</title>
<updated>2010-04-20T09:49:27+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2010-04-20T09:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=37f24b06c0f96539f8964e0b41010f4ebe514f5f'/>
<id>37f24b06c0f96539f8964e0b41010f4ebe514f5f</id>
<content type='text'>
The generator code was totally wrong for the virDomainSnapshot
APIs, not generating the wrapper class, and giving methods the
wrong names

* generator.py: Set metadata for virDomainSnapshot type &amp; APIs
* libvirt-override-api.xml, libvirt-override.c: Hand-code the
  virDomainSnapshotListNames glue layer
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The generator code was totally wrong for the virDomainSnapshot
APIs, not generating the wrapper class, and giving methods the
wrong names

* generator.py: Set metadata for virDomainSnapshot type &amp; APIs
* libvirt-override-api.xml, libvirt-override.c: Hand-code the
  virDomainSnapshotListNames glue layer
</pre>
</div>
</content>
</entry>
<entry>
<title>More event callback fixes</title>
<updated>2010-04-09T15:24:28+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2010-04-08T15:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=73d5ccb8d2792ddf11c58e337039dd27f65923e2'/>
<id>73d5ccb8d2792ddf11c58e337039dd27f65923e2</id>
<content type='text'>
In a couple of cases typos meant we were firing the wrong type
of event. In the python code my previous commit accidentally
missed some chunks of the code.

* python/libvirt-override-virConnect.py: Add missing python glue
  accidentally left out of previous commit
* src/conf/domain_event.c, src/qemu/qemu_monitor_json.c: Fix typos
  in event name / method name to invoke
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a couple of cases typos meant we were firing the wrong type
of event. In the python code my previous commit accidentally
missed some chunks of the code.

* python/libvirt-override-virConnect.py: Add missing python glue
  accidentally left out of previous commit
* src/conf/domain_event.c, src/qemu/qemu_monitor_json.c: Fix typos
  in event name / method name to invoke
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix up python bindings for new event callbacks</title>
<updated>2010-04-08T11:41:40+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2010-03-26T13:22:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=24f9a46106ff5f55bf225867f259573241061719'/>
<id>24f9a46106ff5f55bf225867f259573241061719</id>
<content type='text'>
The generator was disabled for the new event callbacks, since they
need to be hand written. This patch  adds the C and python glue to
expose the new APIs in the python binding. The python example
program is extended to demonstrate of the code

* python/libvirt-override.c: Registration and dispatch of events
   at the C layer
* python/libvirt-override-virConnect.py: Python glue for events
* examples/domain-events/events-python/event-test.py: Demo use
  of new event callbacks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The generator was disabled for the new event callbacks, since they
need to be hand written. This patch  adds the C and python glue to
expose the new APIs in the python binding. The python example
program is extended to demonstrate of the code

* python/libvirt-override.c: Registration and dispatch of events
   at the C layer
* python/libvirt-override-virConnect.py: Python glue for events
* examples/domain-events/events-python/event-test.py: Demo use
  of new event callbacks
</pre>
</div>
</content>
</entry>
<entry>
<title>Snapshot API framework.</title>
<updated>2010-04-05T14:24:34+00:00</updated>
<author>
<name>Chris Lalancette</name>
<email>clalance@redhat.com</email>
</author>
<published>2010-03-31T20:33:13+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=be5c34b75242f68dce33ba08081c46d27eae05bb'/>
<id>be5c34b75242f68dce33ba08081c46d27eae05bb</id>
<content type='text'>
Signed-off-by: Chris Lalancette &lt;clalance@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Chris Lalancette &lt;clalance@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Core driver implementation with ebtables support</title>
<updated>2010-03-26T18:01:16+00:00</updated>
<author>
<name>Stefan Berger</name>
<email>stefanb@us.ibm.com</email>
</author>
<published>2010-03-25T17:46:09+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=803edc3976fc508a08b2f00749f00675a2070acf'/>
<id>803edc3976fc508a08b2f00749f00675a2070acf</id>
<content type='text'>
This patch implements the core driver and provides
- management functionality for managing the filter XMLs
- compiling the internal filter representation into ebtables rules
- applying ebtables rules on a network (tap,macvtap) interface
- tearing down ebtables rules that were applied on behalf of an
interface
- updating of filters while VMs are running and causing the firewalls to
be rebuilt
- other bits and pieces

Signed-off-by: Stefan Berger &lt;stefanb@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements the core driver and provides
- management functionality for managing the filter XMLs
- compiling the internal filter representation into ebtables rules
- applying ebtables rules on a network (tap,macvtap) interface
- tearing down ebtables rules that were applied on behalf of an
interface
- updating of filters while VMs are running and causing the firewalls to
be rebuilt
- other bits and pieces

Signed-off-by: Stefan Berger &lt;stefanb@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add domain events for graphics network clients</title>
<updated>2010-03-26T13:53:20+00:00</updated>
<author>
<name>Daniel P. Berrange</name>
<email>berrange@redhat.com</email>
</author>
<published>2010-03-19T13:27:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=b05ae796d44caa3e39b2dc90c478933d892a7c28'/>
<id>b05ae796d44caa3e39b2dc90c478933d892a7c28</id>
<content type='text'>
This introduces a new event type

   VIR_DOMAIN_EVENT_ID_GRAPHICS

The same event can be emitted in 3 scenarios

  typedef enum {
      VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0,
      VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE,
      VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT,
  } virDomainEventGraphicsPhase;

Connect/disconnect are triggered at socket accept/close.
The initialize phase is immediately after the protocol
setup and authentication has completed. ie when the
client is authorized and about to start interacting with
the graphical desktop

This event comes with *a lot* of potential information

 - IP address, port &amp; address family of client
 - IP address, port &amp; address family of server
 - Authentication scheme (arbitrary string)
 - Authenticated subject identity. A subject may have
   multiple identities with some authentication schemes.
   For example, vencrypt+sasl results in a x509dname
   and saslUsername identities.

This results in a very complicated callback :-(

   typedef enum {
      VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4,
      VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6,
   } virDomainEventGraphicsAddressType;

   struct _virDomainEventGraphicsAddress {
       int family;
       const char *node;
       const char *service;
   };
   typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress;
   typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr;

   struct _virDomainEventGraphicsSubject {
      int nidentity;
      struct {
          const char *type;
          const char *name;
      } *identities;
   };
   typedef struct _virDomainEventGraphicsSubject virDomainEventGraphicsSubject;
   typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr;

   typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn,
                                                         virDomainPtr dom,
                                                         int phase,
                                                         virDomainEventGraphicsAddressPtr local,
                                                         virDomainEventGraphicsAddressPtr remote,
                                                         const char *authScheme,
                                                         virDomainEventGraphicsSubjectPtr subject,
                                                         void *opaque);

The wire protocol is similarly complex

   struct remote_domain_event_graphics_address {
     int family;
     remote_nonnull_string node;
     remote_nonnull_string service;
   };

   const REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX = 20;

   struct remote_domain_event_graphics_identity {
     remote_nonnull_string type;
     remote_nonnull_string name;
   };

   struct remote_domain_event_graphics_msg {
     remote_nonnull_domain dom;
     int phase;
     remote_domain_event_graphics_address local;
     remote_domain_event_graphics_address remote;
     remote_nonnull_string authScheme;
     remote_domain_event_graphics_identity subject&lt;REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX&gt;;
   };

This is currently implemented in QEMU for the VNC graphics
protocol, but designed to be usable with SPICE graphics in
the future too.

* daemon/remote.c: Dispatch graphics events to client
* examples/domain-events/events-c/event-test.c: Watch for
  graphics events
* include/libvirt/libvirt.h.in: Define new graphics event ID
  and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
  src/libvirt_private.syms: Extend API to handle graphics events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
  for VNC events and emit a libvirt graphics event
* src/remote/remote_driver.c: Receive and dispatch graphics
  events to application
* src/remote/remote_protocol.x: Wire protocol definition for
  graphics events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.c: Watch for VNC_CONNECTED,
  VNC_INITIALIZED &amp; VNC_DISCONNETED events from QEMU monitor
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces a new event type

   VIR_DOMAIN_EVENT_ID_GRAPHICS

The same event can be emitted in 3 scenarios

  typedef enum {
      VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0,
      VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE,
      VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT,
  } virDomainEventGraphicsPhase;

Connect/disconnect are triggered at socket accept/close.
The initialize phase is immediately after the protocol
setup and authentication has completed. ie when the
client is authorized and about to start interacting with
the graphical desktop

This event comes with *a lot* of potential information

 - IP address, port &amp; address family of client
 - IP address, port &amp; address family of server
 - Authentication scheme (arbitrary string)
 - Authenticated subject identity. A subject may have
   multiple identities with some authentication schemes.
   For example, vencrypt+sasl results in a x509dname
   and saslUsername identities.

This results in a very complicated callback :-(

   typedef enum {
      VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4,
      VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6,
   } virDomainEventGraphicsAddressType;

   struct _virDomainEventGraphicsAddress {
       int family;
       const char *node;
       const char *service;
   };
   typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress;
   typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr;

   struct _virDomainEventGraphicsSubject {
      int nidentity;
      struct {
          const char *type;
          const char *name;
      } *identities;
   };
   typedef struct _virDomainEventGraphicsSubject virDomainEventGraphicsSubject;
   typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr;

   typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn,
                                                         virDomainPtr dom,
                                                         int phase,
                                                         virDomainEventGraphicsAddressPtr local,
                                                         virDomainEventGraphicsAddressPtr remote,
                                                         const char *authScheme,
                                                         virDomainEventGraphicsSubjectPtr subject,
                                                         void *opaque);

The wire protocol is similarly complex

   struct remote_domain_event_graphics_address {
     int family;
     remote_nonnull_string node;
     remote_nonnull_string service;
   };

   const REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX = 20;

   struct remote_domain_event_graphics_identity {
     remote_nonnull_string type;
     remote_nonnull_string name;
   };

   struct remote_domain_event_graphics_msg {
     remote_nonnull_domain dom;
     int phase;
     remote_domain_event_graphics_address local;
     remote_domain_event_graphics_address remote;
     remote_nonnull_string authScheme;
     remote_domain_event_graphics_identity subject&lt;REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX&gt;;
   };

This is currently implemented in QEMU for the VNC graphics
protocol, but designed to be usable with SPICE graphics in
the future too.

* daemon/remote.c: Dispatch graphics events to client
* examples/domain-events/events-c/event-test.c: Watch for
  graphics events
* include/libvirt/libvirt.h.in: Define new graphics event ID
  and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
  src/libvirt_private.syms: Extend API to handle graphics events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
  for VNC events and emit a libvirt graphics event
* src/remote/remote_driver.c: Receive and dispatch graphics
  events to application
* src/remote/remote_protocol.x: Wire protocol definition for
  graphics events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.c: Watch for VNC_CONNECTED,
  VNC_INITIALIZED &amp; VNC_DISCONNETED events from QEMU monitor
</pre>
</div>
</content>
</entry>
</feed>
