[libvirt] [Question] Is it a bug about cpu model Westmere?

2014-02-13 Thread Wangyufei (James)
Hello, I find that the cpu model Westmere defined in recently qemu has the cupid CPUID_EXT_PCLMULQDQ, but the cpu model Westmere defined in libvirt doesn't have it, SandyBridge defined in libvirt has it. In my opinion, the same cpu model defined in qemu and libvirt should have the same

Re: [libvirt] [PATCH] rpm: create libvirt-wireshark sub-package

2014-02-13 Thread Michal Privoznik
On 12.02.2014 21:15, Eric Blake wrote: On 02/05/2014 02:51 AM, Daniel P. Berrange wrote: On Tue, Feb 04, 2014 at 03:15:56PM -0700, Eric Blake wrote: On Fedora 20, with wireshark-devel installed, 'make rpm' failed due to installed but unpackaged files related to wireshark. As F20 is already

[libvirt] [PATCH] Fix stream related spelling mistakes

2014-02-13 Thread Philipp Hahn
Remove double is. Consistent spelling of all-uppercase I/O. Signed-off-by: Philipp Hahn h...@univention.de --- src/libvirt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 9cc5b1c..666ab1e 100644 --- a/src/libvirt.c +++

[libvirt] [PATCH] Fix stream related spelling mistakes

2014-02-13 Thread Philipp Hahn
Consistent spelling of all-uppercase I/O. Signed-off-by: Philipp Hahn h...@univention.de --- libvirt-override-virStream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-override-virStream.py b/libvirt-override-virStream.py index 53000da..e9dd09a 100644 ---

[libvirt] [PATCH v6 0/6] Support keyboard device

2014-02-13 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com This patchset is to add keyboard input device. For PPC64, it doesn't support a default keyboard device when the graphic is enabled. Libvirt supports QEMU command line as -device VGA which won't create any keyboard device for it. So it requires libvirt

[libvirt] [PATCH v6 2/6] conf: Add one interface to add default input devices

2014-02-13 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add one new interface to add input devices. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/conf/domain_conf.c | 29 + src/conf/domain_conf.h | 4 src/libvirt_private.syms | 1 + 3

[libvirt] [PATCH v6 1/6] conf: Add a keyboard input device type

2014-02-13 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard for non-x86 platforms when graphics are enabled. It's preferred to add one USB keyboard. This patch is to add keyboard input device type. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- docs/schemas/domaincommon.rng | 1 +

[libvirt] [PATCH v6 4/6] qemu_cap: Add USB keyboard capability

2014-02-13 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com QEMU can support USB keyboard but libvirt haven't supportted it yet. This patch is to add USB keyboard capabilities and test cases. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/qemu/qemu_capabilities.c | 3 +++

[libvirt] [PATCH v6 3/6] conf: Remove the implicit PS2 mouse for non-X86 platforms and add an implicit PS2 keyboard device for X86 platforms.

2014-02-13 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com PS2 device only works for X86 platform, other platforms may need USB mouse. Athough it doesn't influence the QEMU command line, but it's not right to add one PS2 mouse for non-X86 platform. What's more, PS2 keyboard can be supported for X86. So, this

[libvirt] [PATCH v6 5/6] qemu: parse qemu command line for USB keyboard

2014-02-13 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to format qemu command line and xen driver for USB keyboard and add test cases for it. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/qemu/qemu_command.c| 41 --

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Michal Privoznik
On 11.02.2014 22:45, Eric Blake wrote: On 02/11/2014 02:37 PM, Marcelo Tosatti wrote: I think we may need both approaches. I too think that resume with syncing guest time is so common use case that is deserves to be exposed as a single operation outside the libvirt. On the other hand, we

[libvirt] [PATCH v6 6/6] Add a default USB keyboard and USB mouse for PPC64

2014-02-13 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard working on PPC64 and PS2 mouse is only for PPC64 when graphics are enabled. It needs to add a USB keyboard and USB mouse for it. This patch is to add a USB keyboard and USB mouse when graphics are enabled. Signed-off-by: Li Zhang

Re: [libvirt] [PATCH] spec: add missing dep of libvirt-daemon-config-nwfilter

2014-02-13 Thread Martin Kletzander
On Wed, Feb 12, 2014 at 02:34:50PM -0700, Eric Blake wrote: Similar to cf76c4b, if modules are used, then nwfilter configuration requires the nwfilter driver module. Signed-off-by: Eric Blake ebl...@redhat.com --- libvirt.spec.in | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [libvirt] [PATCH] spec: require libvirt-wireshark from libvirt metapackage

2014-02-13 Thread Michal Privoznik
On 12.02.2014 21:28, Eric Blake wrote: In general, the 'libvirt' metapackage should pull in all subpackages. Fix this for the wireshark subpackage created in commit f9ada9f. * libvirt.spec.in (Requires): Add dependency. Signed-off-by: Eric Blake ebl...@redhat.com --- libvirt.spec.in | 3 +++

Re: [libvirt] [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-02-13 Thread Igor Mammedov
On Thu, 13 Feb 2014 14:14:08 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: On Tue, 2014-01-21 at 11:10 +0100, Andreas Färber wrote: Am 21.01.2014 10:51, schrieb Chen Fan: On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov wrote: On Tue, 21 Jan 2014 15:12:45 +0800 Chen Fan

Re: [libvirt] [Question] Is it a bug about cpu model Westmere?

2014-02-13 Thread Martin Kletzander
On Thu, Feb 13, 2014 at 08:02:34AM +, Wangyufei (James) wrote: Hello, I find that the cpu model Westmere defined in recently qemu has the cupid CPUID_EXT_PCLMULQDQ, but the cpu model Westmere defined in libvirt doesn't have it, SandyBridge defined in libvirt has it. In my opinion,

Re: [libvirt] [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-02-13 Thread Igor Mammedov
On Tue, 21 Jan 2014 11:10:30 +0100 Andreas Färber afaer...@suse.de wrote: Am 21.01.2014 10:51, schrieb Chen Fan: On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov wrote: On Tue, 21 Jan 2014 15:12:45 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: On Mon, 2014-01-20 at 13:29 +0100, Igor

Re: [libvirt] [PATCH] cpu: break out when a right cpuCandidate found

2014-02-13 Thread Martin Kletzander
On Thu, Feb 13, 2014 at 07:44:20AM +, Wangyufei (James) wrote: From 8123c5d64f940fa0fb0de32fc5e68035980b6b01 Mon Sep 17 00:00:00 2001 From: WangYufei james.wangyu...@huawei.com Date: Thu, 13 Feb 2014 07:17:11 + Subject: [PATCH] cpu: break out when a right cpuCandidate found In

[libvirt] [PATCH REPOST] Introduce new OOM testing support

2014-02-13 Thread Daniel P. Berrange
The previous OOM testing support would re-run the entire main method each iteration, failing a different malloc each time. When a test suite has 'n' allocations, the number of repeats requires is (n * (n + 1) ) / 2. This gets very large, very quickly. This new OOM testing support instead

[libvirt] [PATCH v9] bhyve: add a basic driver

2014-02-13 Thread Roman Bogorodskiy
At this point it has a limited functionality and is highly experimental. Supported domain operations are: * define * start * destroy * dumpxml * dominfo * undefine It's only possible to have only one disk device and only one network, which should be of type bridge. --- configure.ac

[libvirt] [PATCH v9] bhyve: add a basic driver

2014-02-13 Thread Roman Bogorodskiy
Changes from v8: - Implement domainUndefine and two more functions it depends on: domainIsActive and domainIsPersistent Changes from v7: - Squashed in ACL support - Check for disk and bus type for bhyve and disk type for bhyveload - Handle case when URI == NULL in ConnectOpen - Call

Re: [libvirt] [PATCH] Fix stream related spelling mistakes

2014-02-13 Thread Martin Kletzander
On Thu, Feb 13, 2014 at 09:41:54AM +0100, Philipp Hahn wrote: Remove double is. Consistent spelling of all-uppercase I/O. Signed-off-by: Philipp Hahn h...@univention.de --- ACK pushed, Martin signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] Fix stream related spelling mistakes

2014-02-13 Thread Martin Kletzander
On Thu, Feb 13, 2014 at 09:46:19AM +0100, Philipp Hahn wrote: Consistent spelling of all-uppercase I/O. Signed-off-by: Philipp Hahn h...@univention.de --- libvirt-override-virStream.py | 4 ++-- According to the file changed, I guess this is for libvirt-python, so I'm taking it there, but

Re: [libvirt] [PATCH] cpu: break out when a right cpuCandidate found

2014-02-13 Thread Wangyufei (James)
-Original Message- From: Martin Kletzander [mailto:mklet...@redhat.com] Sent: Thursday, February 13, 2014 6:08 PM To: Wangyufei (James) Cc: libvir-list@redhat.com; Wangrui (K); Zhaoyanbin (A) Subject: Re: [libvirt] [PATCH] cpu: break out when a right cpuCandidate found On Thu,

Re: [libvirt] [PATCH] rpm: create libvirt-wireshark sub-package

2014-02-13 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 09:38:53AM +0100, Michal Privoznik wrote: On 12.02.2014 21:15, Eric Blake wrote: On 02/05/2014 02:51 AM, Daniel P. Berrange wrote: On Tue, Feb 04, 2014 at 03:15:56PM -0700, Eric Blake wrote: On Fedora 20, with wireshark-devel installed, 'make rpm' failed due to

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 02:05:11PM -0700, Eric Blake wrote: On 02/12/2014 01:45 PM, Marcelo Tosatti wrote: On Wed, Feb 12, 2014 at 10:22:11AM +, Daniel P. Berrange wrote: I agree that this should be a completely separate command, not merely a flag to the Resume API. The reason is that

Re: [libvirt] [PATCH] spec: require libvirt-wireshark from libvirt metapackage

2014-02-13 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 10:17:26AM +0100, Michal Privoznik wrote: On 12.02.2014 21:28, Eric Blake wrote: In general, the 'libvirt' metapackage should pull in all subpackages. Fix this for the wireshark subpackage created in commit f9ada9f. * libvirt.spec.in (Requires): Add dependency.

Re: [libvirt] [PATCH] cpu: break out when a right cpuCandidate found

2014-02-13 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 10:42:01AM +, Wangyufei (James) wrote: -Original Message- From: Martin Kletzander [mailto:mklet...@redhat.com] Sent: Thursday, February 13, 2014 6:08 PM To: Wangyufei (James) Cc: libvir-list@redhat.com; Wangrui (K); Zhaoyanbin (A) Subject: Re:

Re: [libvirt] [PATCH v4 2/3] network: Introduce network hooks

2014-02-13 Thread Laine Stump
On 02/12/2014 08:20 PM, Laine Stump wrote: It all looks fine (aside from the few small grammar corrections in the docs. I just want one last confirmation that we don't want both plug and plugged events, and in that case ACK. A few marginally related things came to my mind since I sent that

Re: [libvirt] [PATCH v4 3/3] network: Taint networks that are using hook script

2014-02-13 Thread Laine Stump
On 02/12/2014 07:07 PM, Michal Privoznik wrote: Basically, the idea is copied from domain code, where tainting exists for a while. Currently, only one taint reason exists - VIR_NETWORK_TAINT_HOOK to mark those networks which caused invoking of hook script. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH v3 04/21] LXC from native: migrate fstab and lxc.mount.entry

2014-02-13 Thread John Ferlan
New Coverity complaint regarding this change ... ...snip... virDomainDefPtr lxcParseConfigString(const char *config) { @@ -115,6 +343,7 @@ lxcParseConfigString(const char *config) _(failed to generate uuid)); goto error; } + vmdef-id = -1;

Re: [libvirt] [PATCH 1/2] virDomainTaintFlags: Introduce VIR_DOMAIN_TAINT_HOOK

2014-02-13 Thread Laine Stump
On 02/04/2014 05:49 PM, Michal Privoznik wrote: This new flag is to be used for tainting domains which XML definition was altered at runtime by a hook script. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/conf/domain_conf.c | 3 ++- src/conf/domain_conf.h | 1 + 2 files

Re: [libvirt] [PATCH v6 4/6] qemu_cap: Add USB keyboard capability

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com QEMU can support USB keyboard but libvirt haven't supportted it yet. This patch is to add USB keyboard capabilities and test cases. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com ---

Re: [libvirt] [PATCH v6 1/6] conf: Add a keyboard input device type

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard for non-x86 platforms when graphics are enabled. It's preferred to add one USB keyboard. This patch is to add keyboard input device type. Signed-off-by: Li Zhang

Re: [libvirt] [PATCH v6 3/6] conf: Remove the implicit PS2 mouse for non-X86 platforms and add an implicit PS2 keyboard device for X86 platforms.

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com PS2 device only works for X86 platform, other platforms may need USB mouse. Athough it doesn't influence the QEMU command line, but it's not right to add one PS2 mouse for non-X86 platform. What's more, PS2

Re: [libvirt] [PATCH v6 5/6] qemu: parse qemu command line for USB keyboard

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to format qemu command line and xen driver for USB keyboard and add test cases for it. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/qemu/qemu_command.c

Re: [libvirt] [PATCH v6 6/6] Add a default USB keyboard and USB mouse for PPC64

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard working on PPC64 and PS2 mouse is only for PPC64 when graphics are enabled. It needs to add a USB keyboard and USB mouse for it. This patch is to add a USB keyboard and USB mouse when

Re: [libvirt] [PATCH v6 2/6] conf: Add one interface to add default input devices

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add one new interface to add input devices. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/conf/domain_conf.c | 29 + src/conf/domain_conf.h |

Re: [libvirt] [PATCH v3 04/21] LXC from native: migrate fstab and lxc.mount.entry

2014-02-13 Thread Cedric Bosdonnat
On Thu, 2014-02-13 at 06:34 -0500, John Ferlan wrote: New Coverity complaint regarding this change ... ...snip... virDomainDefPtr lxcParseConfigString(const char *config) { @@ -115,6 +343,7 @@ lxcParseConfigString(const char *config) _(failed to generate

[libvirt] [PATCH] lxc from native: removed now remaining useless line

2014-02-13 Thread Cédric Bosdonnat
--- src/lxc/lxc_native.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index ee07635..2cf479d 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -900,7 +900,6 @@ lxcParseConfigString(const char *config) } /* Loop over

Re: [libvirt] [PATCH 1/2] virDomainTaintFlags: Introduce VIR_DOMAIN_TAINT_HOOK

2014-02-13 Thread Michal Privoznik
On 13.02.2014 12:40, Laine Stump wrote: On 02/04/2014 05:49 PM, Michal Privoznik wrote: This new flag is to be used for tainting domains which XML definition was altered at runtime by a hook script. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/conf/domain_conf.c | 3 ++-

Re: [libvirt] [PATCH] lxc from native: removed now remaining useless line

2014-02-13 Thread John Ferlan
On 02/13/2014 07:45 AM, Cédric Bosdonnat wrote: --- src/lxc/lxc_native.c | 1 - 1 file changed, 1 deletion(-) ACK and pushed. Tks, John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] spec: require libvirt-wireshark from libvirt metapackage

2014-02-13 Thread Martin Kletzander
On Thu, Feb 13, 2014 at 10:55:11AM +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 10:17:26AM +0100, Michal Privoznik wrote: On 12.02.2014 21:28, Eric Blake wrote: In general, the 'libvirt' metapackage should pull in all subpackages. Fix this for the wireshark subpackage created in

Re: [libvirt] [PATCH v4 2/3] network: Introduce network hooks

2014-02-13 Thread Michal Privoznik
On 13.02.2014 12:10, Laine Stump wrote: On 02/12/2014 08:20 PM, Laine Stump wrote: It all looks fine (aside from the few small grammar corrections in the docs. I just want one last confirmation that we don't want both plug and plugged events, and in that case ACK. A few marginally related

Re: [libvirt] [PATCH] spec: require libvirt-wireshark from libvirt metapackage

2014-02-13 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 02:11:38PM +0100, Martin Kletzander wrote: On Thu, Feb 13, 2014 at 10:55:11AM +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 10:17:26AM +0100, Michal Privoznik wrote: On 12.02.2014 21:28, Eric Blake wrote: In general, the 'libvirt' metapackage should pull

Re: [libvirt] [PATCH] rpm: create libvirt-wireshark sub-package

2014-02-13 Thread Eric Blake
On 02/13/2014 03:52 AM, Daniel P. Berrange wrote: yum install libvirt drags in wireshark as a dependency. There wouldn't be anything bad about it, except the wireshark plugin is expected to be used by developers, not an ordinary users. If I were an ordinary user I'd be very curious why I

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Eric Blake
On 02/13/2014 02:09 AM, Michal Privoznik wrote: Maybe even both additions would be appropriate (a knob for automatic libvirt syncing as well as a new API for explicit syncing outside the events where libvirt would normally do it automatically). I don't think we should add the on_resume/

Re: [libvirt] [PATCH] rpm: create libvirt-wireshark sub-package

2014-02-13 Thread Eric Blake
On 02/13/2014 06:30 AM, Eric Blake wrote: On 02/13/2014 03:52 AM, Daniel P. Berrange wrote: yum install libvirt drags in wireshark as a dependency. There wouldn't be anything bad about it, except the wireshark plugin is expected to be used by developers, not an ordinary users. If I were an

Re: [libvirt] [PATCH] spec: add missing dep of libvirt-daemon-config-nwfilter

2014-02-13 Thread Eric Blake
On 02/13/2014 02:16 AM, Martin Kletzander wrote: On Wed, Feb 12, 2014 at 02:34:50PM -0700, Eric Blake wrote: Similar to cf76c4b, if modules are used, then nwfilter configuration requires the nwfilter driver module. Signed-off-by: Eric Blake ebl...@redhat.com --- libvirt.spec.in | 3 +++ 1

Re: [libvirt] [PATCH] spec: require libvirt-wireshark from libvirt metapackage

2014-02-13 Thread Eric Blake
On 02/13/2014 06:20 AM, Daniel P. Berrange wrote: NB 'wireshark' is just the dissectors and command line utils. The GTK gui is a separate RPM. So I think this dep is reasonable as it is, and we shoulud just revert the previous patch. Revert complete. -- Eric Blake eblake redhat com

[libvirt] virDomainGetMaxVcpus does not work as expected

2014-02-13 Thread Claudio Bley
Hi. When calling virDomainGetMaxVcpus (http://libvirt.org/html/libvirt-libvirt.html#virDomainGetMaxVcpus) on an inactive domain, I receive this error: scala res2.getMaxVcpus() libvirt: Domain Config error : Requested operation is not valid: domain is not running org.libvirt.LibvirtException:

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Michal Privoznik
On 13.02.2014 14:32, Eric Blake wrote: On 02/13/2014 02:09 AM, Michal Privoznik wrote: Maybe even both additions would be appropriate (a knob for automatic libvirt syncing as well as a new API for explicit syncing outside the events where libvirt would normally do it automatically). I don't

Re: [libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed

2014-02-13 Thread Daniel P. Berrange
On Thu, Feb 13, 2014 at 03:02:38PM +0100, Michal Privoznik wrote: On 13.02.2014 14:32, Eric Blake wrote: On 02/13/2014 02:09 AM, Michal Privoznik wrote: Maybe even both additions would be appropriate (a knob for automatic libvirt syncing as well as a new API for explicit syncing outside the

[libvirt] [libvirt-java] [PATCH 20/65] Remove processError method from Network class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Network.java | 61

[libvirt] [libvirt-java] [PATCH 18/65] Remove processError from DomainSnapshot class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error happens. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/DomainSnapshot.java | 23

[libvirt] [libvirt-java] [PATCH 02/65] Fix warnings about accessing static methods

2014-02-13 Thread Claudio Bley
java/org/libvirt/Error.java:217: The static method wrap(int) from the type Error.ErrorDomain should be accessed in a static way Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Error.java |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[libvirt] [libvirt-java] [PATCH 03/65] Fix typos in Error.java

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Error.java |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/libvirt/Error.java b/src/main/java/org/libvirt/Error.java index 6f68f57..ef339bd 100644 ---

[libvirt] [libvirt-java] [PATCH 04/65] test: fix typo in testConnection()

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/test/java/org/libvirt/TestJavaBindings.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/libvirt/TestJavaBindings.java b/src/test/java/org/libvirt/TestJavaBindings.java index bba4cdb..9e7fa82 100644

[libvirt] [libvirt-java] [PATCH 13/65] Make Device.listCapabilities return only valid array elements

2014-02-13 Thread Claudio Bley
The libvirt function virNodeDeviceListCaps might return fewer elements than requested. Take this into account and properly decode the UTF-8 strings returned. Additionally, the given strings are freed before returning the resulting string array. Signed-off-by: Claudio Bley cb...@av-test.de ---

[libvirt] [libvirt-java] [PATCH 09/65] jna: load virt-0 or virt library depending on the platform

2014-02-13 Thread Claudio Bley
On Windows, the libvirt DLL is called libvirt-0.dll. Trying to load the virt library hence fails to find the file. Branch on the platform and load virt-0 if we're running on this OS, use virt otherwise. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/jna/Libvirt.java |

[libvirt] [libvirt-java] [PATCH 14/65] test: ensure the Device.listCapabilities method works

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/test/java/org/libvirt/TestJavaBindings.java | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/test/java/org/libvirt/TestJavaBindings.java b/src/test/java/org/libvirt/TestJavaBindings.java index a25c4f3..0123e6a 100644

[libvirt] [libvirt-java] [PATCH 10/65] Fix wrapping of native size_t data type

2014-02-13 Thread Claudio Bley
Libvirt function parameters having type (pointer to) size_t were wrapped via JNA using int, long or even NativeLong. Alas, none of these is actually correct as the size of size_t may be the same as the size of either (unsigned) int, long or even long long on different platforms. JNA provides the

[libvirt] [libvirt-java] [PATCH 19/65] Remove processError from Interface class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Interface.java | 43

[libvirt] [libvirt-java] [PATCH 05/65] test: ensure that exceptions are thrown when expected

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/test/java/org/libvirt/TestJavaBindings.java |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/libvirt/TestJavaBindings.java b/src/test/java/org/libvirt/TestJavaBindings.java index 9e7fa82..a25c4f3 100644 ---

[libvirt] [libvirt-java] [PATCH 08/65] Depend on JNA versions 3.4.1 to 4.0.0

2014-02-13 Thread Claudio Bley
Specify a version range for the net.java.dev.jna / jna artifact in order to accept any version we tested the libvirt Java bindings against. Signed-off-by: Claudio Bley cb...@av-test.de --- As discussed previously[1], with a little delay, here's the patch. [1]:

[libvirt] [libvirt-java] [PATCH 23/65] Remove processError method from StoragePool class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Adjust the doc comment for storageVolLookupByName to indicate that it might return null. Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. Signed-off-by: Claudio

[libvirt] [libvirt-java] [PATCH 21/65] Remove processError method from NetworkFilter class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/NetworkFilter.java | 43

[libvirt] [libvirt-java] [PATCH 39/65] Introduce event loop support

2014-02-13 Thread Claudio Bley
Add initEventLoop(), processEvent(), runEventLoop() and stopEventLoop() static methods to the Library class. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Library.java | 91 src/main/java/org/libvirt/jna/Libvirt.java |4 ++ 2

[libvirt] [libvirt-java] [PATCH 27/65] Call processError only when virInitialize signalled an error

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Library.java |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/libvirt/Library.java b/src/main/java/org/libvirt/Library.java index 33d3042..95c13cb 100644 ---

[libvirt] [libvirt-java] [PATCH 17/65] Remove processError from Domain class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also update erroneous javadoc comments stating that methods would return a value in case an error occurs. In case of a libvirt error, a LibvirtException is thrown. Add processErrorIfZero(long) to ErrorHandler class

[libvirt] [libvirt-java] [PATCH 15/65] Start refactoring of error handling

2014-02-13 Thread Claudio Bley
Almost every class contains a processError() method with an identical definition, just forwarding the call to ErrorHandler.processError(Libvirt). This function is always called after a libvirt function call (as per its javadoc comment). But, actually, there's no use in always calling

[libvirt] [libvirt-java] [PATCH 07/65] Ignore editor backup files

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- .gitignore |2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b02fd55..28ddc6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*~ +\#*\# .classpath .project .settings -- 1.7.9.5 -- libvir-list

[libvirt] [libvirt-java] [PATCH 11/65] Use virFree in order to release memory acquired from libvirt

2014-02-13 Thread Claudio Bley
When JNA is linked to a different runtime library than libvirt, using JNA's Native.free will probably lead to crashes as witnessed on Windows: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x77363290, pid=10180,

[libvirt] [libvirt-java] [PATCH 31/65] Fix memleak in Domain.snapshotListNames

2014-02-13 Thread Claudio Bley
We need to free the char* entries of the result array returned ourselves. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Domain.java | 14 +++--- src/main/java/org/libvirt/jna/Libvirt.java |2 +- 2 files changed, 8 insertions(+), 8 deletions(-)

[libvirt] [libvirt-java] [PATCH 36/65] jna: Wrap the virEvent(Add, Remove)Timeout libvirt functions

2014-02-13 Thread Claudio Bley
These functions are not (yet) exposed in the public org.libvirt package but only used internally. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/jna/Libvirt.java | 11 +++ 1 file changed, 11 insertions(+) diff --git

[libvirt] [libvirt-java] [PATCH 16/65] Remove processError from Device class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Device.java | 49 ++--- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git

[libvirt] [libvirt-java] [PATCH 24/65] Remove processError method from StorageVol class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/StorageVol.java | 56

[libvirt] [libvirt-java] [PATCH 12/65] tests: remove obsolete test driver

2014-02-13 Thread Claudio Bley
JUnit is used for quite some time now, which supercedes the tests defined in the old test class. Signed-off-by: Claudio Bley cb...@av-test.de --- src/test/java/test.java | 280 --- 1 file changed, 280 deletions(-) delete mode 100644

[libvirt] [libvirt-java] [PATCH 33/65] Fix memleak in DomainSnapshot.getXMLDesc

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/DomainSnapshot.java | 10 +- src/main/java/org/libvirt/jna/Libvirt.java|2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/libvirt/DomainSnapshot.java

[libvirt] [libvirt-java] [PATCH 26/65] Remove processError method from Connect class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..) and remove calls to the deprecated ErrorHandler.processError(Libvirt) method. Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. Signed-off-by: Claudio Bley

[libvirt] [libvirt-java] [PATCH 29/65] Implement equals and hashCode methods for Connect and Domain

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Connect.java | 35 + src/main/java/org/libvirt/Domain.java | 48 ++- src/test/java/org/libvirt/TestJavaBindings.java |4 ++ 3 files changed, 86 insertions(+),

[libvirt] [libvirt-java] [PATCH 49/65] Implement connection close callback support

2014-02-13 Thread Claudio Bley
There can only be a single connection close listener registered per connection object. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Connect.java | 57 src/main/java/org/libvirt/jna/Libvirt.java | 11 ++ 2 files changed, 68

[libvirt] [libvirt-java] [PATCH 38/65] Implement Connect.setKeepAlive

2014-02-13 Thread Claudio Bley
This wraps the virConnectSetKeepAlive libvirt function available since version 0.9.8. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Connect.java | 34 src/main/java/org/libvirt/jna/Libvirt.java |1 + 2 files changed, 35

[libvirt] [libvirt-java] [PATCH 22/65] Remove processError method from Secret class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Secret.java | 61

[libvirt] [libvirt-java] [PATCH 25/65] Remove processError method from Stream class

2014-02-13 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Stream.java | 64

[libvirt] [libvirt-java] [PATCH 42/65] Add constructIncRef factory method to Domain class

2014-02-13 Thread Claudio Bley
This method constructs a new Domain class instance while increasing the reference count on the virDomainPtr in order to make sure the Domain object owns the given virDomainPtr. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Domain.java | 14 ++

[libvirt] [libvirt-java] [PATCH 01/65] Fix warnings about using raw types

2014-02-13 Thread Claudio Bley
Eclipse generates this kind of warning: org/libvirt/jna/virConnectCredential.java:20: List is a raw type. References to generic type ListE should be parameterized Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/jna/virConnectAuth.java |4 ++--

[libvirt] [libvirt-java] [PATCH 30/65] Fix Domain.getSchedulerParameters / getSchedulerType

2014-02-13 Thread Claudio Bley
The getSchedulerType method returns a String (the name of the scheduler), not a String array containing a single element. It's OK to just pass null for the second argument to virDomainGetSchedulerType. Ensure to free the returned string. Signed-off-by: Claudio Bley cb...@av-test.de ---

[libvirt] [libvirt-java] [PATCH 28/65] Remove ErrorHandler.processError(Libvirt) method

2014-02-13 Thread Claudio Bley
It was deprecated and is no longer used. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/ErrorHandler.java | 12 1 file changed, 12 deletions(-) diff --git a/src/main/java/org/libvirt/ErrorHandler.java b/src/main/java/org/libvirt/ErrorHandler.java

[libvirt] [libvirt-java] [PATCH 06/65] Make comments proper javadoc comments for enum constants

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Error.java | 397 ++ 1 file changed, 262 insertions(+), 135 deletions(-) diff --git a/src/main/java/org/libvirt/Error.java b/src/main/java/org/libvirt/Error.java index ef339bd..15dd870

[libvirt] [libvirt-java] [PATCH 32/65] Fix memleak in StoragePool.listVolumes

2014-02-13 Thread Claudio Bley
We need to free the char* entries of the result array returned ourselves. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/StoragePool.java | 13 ++--- src/main/java/org/libvirt/jna/Libvirt.java |2 +- 2 files changed, 11 insertions(+), 4 deletions(-)

[libvirt] [libvirt-java] [PATCH 35/65] Fix memleak in StorageVol.getXMLDesc

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/StorageVol.java |8 +++- src/main/java/org/libvirt/jna/Libvirt.java |2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/libvirt/StorageVol.java

[libvirt] [libvirt-java] [PATCH 34/65] Fix memleak in StorageVol.getPath

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/StorageVol.java | 10 +- src/main/java/org/libvirt/jna/Libvirt.java |2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/libvirt/StorageVol.java

[libvirt] [libvirt-java] [PATCH 40/65] Add constants for enum virDomainEventID

2014-02-13 Thread Claudio Bley
Note: these are only used internally. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Connect.java | 20 1 file changed, 20 insertions(+) diff --git a/src/main/java/org/libvirt/Connect.java b/src/main/java/org/libvirt/Connect.java index

[libvirt] [libvirt-java] [PATCH 45/65] events: handle registration of domain lifecycle events

2014-02-13 Thread Claudio Bley
Add LifecycleListener interface which needs to be implemented when the user wishes to receive lifecycle change events on domains. The DomainEvent class represents the kind of event that occurred including details on that event. Signed-off-by: Claudio Bley cb...@av-test.de ---

[libvirt] [libvirt-java] [PATCH 61/65] Add helper for handling bit-flags

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/BitFlags.java | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 src/main/java/org/libvirt/BitFlags.java diff --git a/src/main/java/org/libvirt/BitFlags.java

[libvirt] [libvirt-java] [PATCH 41/65] Prepare to define proper domain event callback support

2014-02-13 Thread Claudio Bley
Remove the public domainEventRegisterAny and domainEventDeregisterAny methods. These methods basically were of no use since the only thing you could register was a generic callback. At runtime, you would have to provide a real callback function matching the prototype of the native callback type.

[libvirt] [libvirt-java] [PATCH 52/65] Implement Domain.memoryPeek

2014-02-13 Thread Claudio Bley
This wraps the virDomainMemoryPeek libvirt function, available since version 0.4.5. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Domain.java| 40 ++ src/main/java/org/libvirt/MemoryAddressMode.java | 19 ++

[libvirt] [libvirt-java] [PATCH 50/65] Implement Connect.getSysinfo

2014-02-13 Thread Claudio Bley
This wraps the virConnectGetSysinfo function available since libvirt version 0.8.8. Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Connect.java | 21 + src/main/java/org/libvirt/jna/Libvirt.java |1 + 2 files changed, 22 insertions(+)

[libvirt] [libvirt-java] [PATCH 46/65] test: add unit test for domain lifecycle events

2014-02-13 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/test/java/org/libvirt/TestJavaBindings.java | 69 +++ 1 file changed, 69 insertions(+) diff --git a/src/test/java/org/libvirt/TestJavaBindings.java b/src/test/java/org/libvirt/TestJavaBindings.java index 5cc77e7..a73148f

  1   2   >