Re: [libvirt] [PATCH java] Add support for Libvirt Qemu Library

2015-11-16 Thread Claudio Bley
At Mon, 16 Nov 2015 21:26:57 +0100, Wido den Hollander wrote: > > > > > Since there are no flags currently, simply drop the flags > > parameter. We add flags (as enums) later when the function starts to > > support one. > > > > Good point, I'll come up with a revised patch. > > >

Re: [libvirt] [PATCH java] Add support for Libvirt Qemu Library

2015-11-15 Thread Claudio Bley
At Fri, 13 Nov 2015 14:59:52 +0100, Wido den Hollander wrote: > > > > On 12-11-15 23:04, Claudio Bley wrote: > > Hi. > > > > At Mon, 9 Nov 2015 13:48:18 +0100, > > Wido den Hollander wrote: > >> > >> This allows us to send Qemu Guest A

Re: [libvirt] [PATCH java] Add support for Libvirt Qemu Library

2015-11-12 Thread Claudio Bley
Hi. At Mon, 9 Nov 2015 13:48:18 +0100, Wido den Hollander wrote: > > This allows us to send Qemu Guest Agent commands to running domains. > > Signed-off-by: Wido den Hollander > --- > src/main/java/org/libvirt/Domain.java | 36 > ++ >

[libvirt] [java] [PATCH 1/2] Fix compilation error for unreported exceptions

2015-09-10 Thread Claudio Bley
In Java 1.6 source mode, javac reported the error: ``` src/main/java/org/libvirt/Library.java:93: unreported exception java.lang.Exception; must be caught or declared to be thrown ``` Since the code inside the try block does not throw any checked exceptions, we only need to handle unchecked

[libvirt] [java] [PATCH 2/2] Fix compilation error when using -source 1.x

2015-09-10 Thread Claudio Bley
When using JDK 1.8 with the compiler option `-source 1.6` or `-source 1.7` or JDK 1.7 with the `-source 1.6` compiler option, compilation failed with: ``` src/main/java/org/libvirt/event/DomainEvent.java:63: error: incompatible types: inference variable T#1 has incompatible upper bounds

[libvirt] [java] [PATCH 0/2] Fix a few compilation problems

2015-09-10 Thread Claudio Bley
Initially reported by Wido den Hollander here[1]. [1]: http://www.redhat.com/archives/libvir-list/2015-September/msg00052.html Claudio Bley (2): Fix compilation error for unreported exceptions Fix compilation error when using -source 1.x src/main/java/org/libvirt/Library.java

Re: [libvirt] [PATCH libvirt-java] Require at least Java 8

2015-09-10 Thread Claudio Bley
At Mon, 7 Sep 2015 11:36:38 +0200, Wido den Hollander wrote: > > > On 04-09-15 07:12, Claudio Bley wrote: > > The thing is: the code compiles just fine with an actual Java 7 > > compiler (OpenJDK 1.7.0_85), but not when using a Java 8 compiler > > (OpenJDK 1.8.0_60) wi

Re: [libvirt] [PATCH libvirt-java] Require at least Java 8

2015-09-03 Thread Claudio Bley
At Wed, 2 Sep 2015 17:38:03 +0200, Wido den Hollander wrote: > > > > > The current code doesn't compile under Java 7, but Java 7 is also EOL. > > > > > > That should not be the case. Can you provide the error messages or > > simply point to the place where Java 8 classes are used? > > >

Re: [libvirt] [PATCH libvirt-java] Require at least Java 8

2015-09-02 Thread Claudio Bley
On Wed, Sep 2, 2015 at 1:53 PM, Wido den Hollander wrote: > > > > I know nothing about libvirt-java, but maybe you can be more verbose why > > this change is needed. > > > > The current code doesn't compile under Java 7, but Java 7 is also EOL. > That should not be the case. Can

Re: [libvirt] [java] [PATCH 0/6] Fix JNA wrapping, fix memory leaks and wrap security model / label function

2015-07-09 Thread Claudio Bley
At Wed, 08 Jul 2015 14:42:52 +0200, Michal Privoznik wrote: Claudio Bley (6): JNA: fix wrong return type void vs. int JNA: add CString class and fix memory leaks JNA: simplify freeing memory for C strings Use the CString class for Arrays of CStrings too Implement

Re: [libvirt] [java] [PATCH 0/6] Fix JNA wrapping, fix memory leaks and wrap security model / label function

2015-07-07 Thread Claudio Bley
Hi. At Wed, 28 Jan 2015 21:45:41 +0100, Claudio Bley wrote: Hi. First and foremost, this series fixes a few mistakes in the wrapping code found by inspecting the org.libvirt.jna.Libvirt interface and the corresponding C types of the XML API file. The last two patches add two missing

[libvirt] [java] [PATCH 0/6] Fix JNA wrapping, fix memory leaks and wrap security model / label function

2015-01-28 Thread Claudio Bley
, this means libvirt-java has gained full coverage of the libvirt functions up to and including version 0.8.5. Yay! Claudio Bley (6): JNA: fix wrong return type void vs. int JNA: add CString class and fix memory leaks JNA: simplify freeing memory for C strings Use the CString class for Arrays

[libvirt] [java] [PATCH 4/6] Use the CString class for Arrays of CStrings too

2015-01-28 Thread Claudio Bley
Change the prototypes of the JNA library interface in order to take advantage of the CString class. This removes a fair amount of code in the org.libvirt.Library class and puts the decoding of C string data into a single place. --- src/main/java/org/libvirt/Connect.java | 20 +++---

[libvirt] [java] [PATCH 5/6] Implement Domain.getSecurityLabel and add SecurityLabel class

2015-01-28 Thread Claudio Bley
This wraps the native virDomainGetSecurityLabel libvirt function available since version 0.6.1. --- src/main/java/org/libvirt/Domain.java| 18 ++ src/main/java/org/libvirt/SecurityLabel.java | 49 src/main/java/org/libvirt/jna/Libvirt.java | 24

[libvirt] [java] [PATCH 3/6] JNA: simplify freeing memory for C strings

2015-01-28 Thread Claudio Bley
Make use of the CString class introduced recently and get rid of some boilerplate code required to release memory at the calling side. --- src/main/java/org/libvirt/Connect.java| 22 +++--- src/main/java/org/libvirt/Domain.java | 33 +++

[libvirt] [java] [PATCH 6/6] Implement Connect.getSecurityModel and add SecurityModel class

2015-01-28 Thread Claudio Bley
--- src/main/java/org/libvirt/Connect.java | 15 +++ src/main/java/org/libvirt/SecurityModel.java | 37 src/main/java/org/libvirt/jna/Libvirt.java | 16 +++- 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644

[libvirt] [java] [PATCH 2/6] JNA: add CString class and fix memory leaks

2015-01-28 Thread Claudio Bley
Some libvirt functions were wrapped using a Java String as return type, although they return a char*. That means the memory allocated by libvirt for those strings is never freed because JNA assumes a const char*. Start to refactor the String handling by using a type-safe Pointer for C Strings,

[libvirt] [java] [PATCH 1/6] JNA: fix wrong return type void vs. int

2015-01-28 Thread Claudio Bley
The functions virEventUpdateTimeout and virConnResetLastError have no return value, they return void. In Java they had been mistakenly wrapped as returning int. --- src/main/java/org/libvirt/jna/Libvirt.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [java] [PATCH] JNA: add missing flags parameter to wrapped functions

2015-01-19 Thread Claudio Bley
Some functions of the Libvirt interface were missing a required flags parameter as defined by the libvirt C API, namely: * virInterfaceCreate * virInterfaceDestroy * virNodeDeviceGetXMLDesc Calling these functions without the flags parameter would result in undefined behaviour, at best in an

Re: [libvirt] libvirt memory flags

2015-01-02 Thread Claudio Bley
[please, do not top-post on technical lists. And, can you teach your mailer to wrap long lines. Thanks.] At Fri, 2 Jan 2015 15:36:19 +, Narayanan, Krishnaprasad wrote: Hi Martin, Thanks for your reply. Please correct me if I am wrong here. The latest version of libvirt generates

[libvirt] [PATCH] Fix typo s/interpetation/interpretation/

2014-12-20 Thread Claudio Bley
Fix the typo in struct virSecurityModel's comment for its doi field. --- Pushed under the trivial rule. include/libvirt/libvirt-host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index 0704672..f760a55 100644

[libvirt] [PATCH] maint: update .mailmap

2014-12-20 Thread Claudio Bley
Add an email alias after updating my email address in commit 738a2ae. --- Pushed under the trivial rule. .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 826c63c..84a6dbe 100644 --- a/.mailmap +++ b/.mailmap @@ -5,6 +5,7 @@ bozzo...@gmail.com

Re: [libvirt] [PATCH] Update my email address in AUTHORS.in

2014-12-20 Thread Claudio Bley
At Sat, 20 Dec 2014 00:31:34 +0100, Jiri Denemark wrote: On Fri, Dec 19, 2014 at 22:32:42 +0100, Claudio Bley wrote: --- pushed under the trivial rule. AUTHORS.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.in b/AUTHORS.in index 3c783f7..329924f

Re: [libvirt] [PATCH] docs: split typedef and struct definition for apibuild.py

2014-12-19 Thread Claudio Bley
At Fri, 19 Dec 2014 08:40:26 +0100, Michal Privoznik wrote: On 18.12.2014 22:31, Claudio Bley wrote: The members of struct virSecurityLabel[1] and struct virSecurityModel[2] were not shown in the libvirt API docs because the corresponding field elements were missing from the libvirt

[libvirt] [PATCH] Update my email address in AUTHORS.in

2014-12-19 Thread Claudio Bley
a...@redhat.com Cédric Bosdonnat cbosdon...@suse.com Christophe Fergeau cferg...@redhat.com -Claudio Bley cb...@av-test.de +Claudio Bley claudio.b...@gmail.com Cole Robinson crobi...@redhat.com Daniel Berrange berra...@redhat.com Daniel Veillard veill...@redhat.com -- 2.2.1 -- libvir-list mailing

Re: [libvirt] virSecurityLabel

2014-12-18 Thread Claudio Bley
At Wed, 17 Dec 2014 09:55:58 +0100, Michal Privoznik wrote: On 16.12.2014 23:09, Claudio Bley wrote: Hi. Looking at the API docs, the virSecurityLabel is one of the undisclosed structs, making its members not publicly available. I don't think it is. It's defined in include/libvirt

[libvirt] [PATCH] docs: split typedef and struct definition for apibuild.py

2014-12-18 Thread Claudio Bley
The members of struct virSecurityLabel[1] and struct virSecurityModel[2] were not shown in the libvirt API docs because the corresponding field elements were missing from the libvirt-api.xml. The reason is that apibuild.py does not cope well with typedef's using inline struct definitions. It

Re: [libvirt] How to use blockcopy in libvirt-java

2014-12-16 Thread Claudio Bley
At Wed, 10 Dec 2014 18:16:57 +0800, Star Guo wrote: Hi, ALL, I just look for the class and method to use blockcopy in libvirt-java on this page: http://libvirt.org/sources/java/javadoc/ However, I can not find out. Libvirt-java Support blockcopy ? Thanks. No, currently libvirt-java

[libvirt] virSecurityLabel

2014-12-16 Thread Claudio Bley
Hi. Looking at the API docs, the virSecurityLabel is one of the undisclosed structs, making its members not publicly available. Is this a mistake? It seems the a virSecurityLabel or virSecurityLabelPtr retrieved by the virDomainGetSecurityLabel et. al. would be rather useless without being able

Re: [libvirt] [[PATCH libvirt-java]] Implement Connect.listAllDomains

2014-11-06 Thread Claudio Bley
Sorry for answering so late. But, nowadays, I only get to read emails every other day, if at all. At Mon, 03 Nov 2014 13:26:44 +0100, Cedric Bosdonnat wrote: Hello Claudio, On Fri, 2014-10-31 at 23:40 +0100, Claudio Bley wrote: At Sat, 25 Oct 2014 16:25:48 -0700, Cédric Bosdonnat wrote

Re: [libvirt] [libvirt-java] [PATCH 00/65]

2014-11-01 Thread Claudio Bley
At Fri, 21 Feb 2014 11:19:23 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:08PM +0100, Claudio Bley wrote: Hi. Here are a few patches that piled up in my local branch. Some of them I already submitted to this list, but there has been no reponse to them. Included

Re: [libvirt] [[PATCH libvirt-java]] Implement Connect.listAllDomains

2014-11-01 Thread Claudio Bley
At Fri, 31 Oct 2014 23:40:26 +0100, Claudio Bley wrote: Hi. At Sat, 25 Oct 2014 16:25:48 -0700, Cédric Bosdonnat wrote: From: Cédric Bosdonnat cedric.bosdon...@free.fr --- src/main/java/org/libvirt/Connect.java | 46 + src/main/java/org

Re: [libvirt] [[PATCH libvirt-java]] Implement Connect.listAllDomains

2014-10-31 Thread Claudio Bley
Hi. At Sat, 25 Oct 2014 16:25:48 -0700, Cédric Bosdonnat wrote: From: Cédric Bosdonnat cedric.bosdon...@free.fr --- src/main/java/org/libvirt/Connect.java | 46 + src/main/java/org/libvirt/jna/Libvirt.java | 2 ++

Re: [libvirt] How to reboot domain(virtual machine) after shutdown it through php-libvirt

2014-08-02 Thread Claudio Bley
Hi. At Sat, 2 Aug 2014 17:08:05 +0800, Subhu G wrote: How to reboot domain(virtual machine) after shutdown it through php-libvirt: Hi, Am new to php livbvirt. and i successfully listed the all domains in server. and get resource of particular domain and call the shutdown function.

Re: [libvirt] missing libvirt-sock after compile and install libvirt 1.2.6

2014-07-30 Thread Claudio Bley
At Wed, 30 Jul 2014 09:30:45 -0600, Eric Blake wrote: On 07/30/2014 08:55 AM, Yuanzhen Gu wrote: Hi folks, I compiled and installed libvirt latest version 1.2.6, based on this tutorial, http://blog.scottlowe.org/2012/11/05/compiling-libvirt-1-0-0-on-ubuntu-12-04-and-12-10/ I

Re: [libvirt] Facing problems in running QEMU guest agents in Windows 2008 guest machine.

2014-07-01 Thread Claudio Bley
At Tue, 1 Jul 2014 15:57:07 +0530, Puneet Bakshi wrote: Hi, I have a CenOS host machine running KVM and a Windows 2008 guest machine. I am able to run qemu-monitor-command but not qemu-agent-command. [root@sdsr720-14 Windows_ISO]# virsh qemu-monitor-command --hmp vm_win_05 'info

Re: [libvirt] [java] [PATCH] GetNodeCpuStat binding

2014-04-15 Thread Claudio Bley
At Tue, 15 Apr 2014 10:36:02 +0200, Pasquale Dir wrote: Working for the other corrections but I disegree with these ones: 1. This is an unsigned long long in C, so it must be a long, not NativeLong here. 2. flags is an unsigned int in C, so it must be an int in Java That is a hard

Re: [libvirt] [java] [PATCH] GetNodeCpuStat binding

2014-04-14 Thread Claudio Bley
At Thu, 10 Apr 2014 17:49:07 +0200, phate...@gmail.com wrote: From: Pasquale Di Rienzo phate...@gmail.com -Added the getNodeCpuStat binding to Libvirt class -Added virNodeCPUStats and CPUStat classes to support this binding -Added the method getCPUStats to Connect class --- AUTHORS

Re: [libvirt] [PATCH] -Added autocloseable to connect class (set close() return type to void so to adapt it to the autocloseable interface)

2014-04-08 Thread Claudio Bley
[forwarding my answer back to the list] Pasquale, please keep the discussion on the list, you should probably use the Reply To All (or whatever GMail calls it) button when answering. At Tue, 08 Apr 2014 16:09:31 +0200, Claudio Bley wrote: [Remember /not/ to top-post on technical lists

Re: [libvirt] [PATCH] -Added autocloseable to connect class (set close() return type to void so to adapt it to the autocloseable interface)

2014-04-07 Thread Claudio Bley
config format.subjectprefix 'java] [PATCH' in your local repository to let git automatically generate this for you. Regards, Claudio -- BSc (Comp) Claudio Bley - Principal Software Engineer AV-TEST GmbH, Klewitzstr. 7, 39112 Magdeburg, Germany Phone: +49 391 6075460, Fax: +49 391 6075469 Web: http

Re: [libvirt] [PATCH 1/2] Add close listener types

2014-03-26 Thread Claudio Bley
; + +public enum ConnectionCloseReason { +/** Misc I/O error */ +ERROR, + +/** End-of-file from server */ +EOF, + +/** Keepalive timer triggered */ +KEEPALIVE, + +/** Client requested it */ +CLIENT, + +UNKNOWN +} -- BSc (Comp) Claudio Bley - Principal Software Engineer

Re: [libvirt] [PATCH 2/2] Ensure JNA callbacks cannot get GCed

2014-03-26 Thread Claudio Bley
At Wed, 26 Mar 2014 02:43:49 +, Chris Ellis wrote: Currently nothing prevents the JNA callback objects used when registering for domain events from being garbage collected. JNA requires that callback objects are not GCed whilst they are in use by C code. To solve this we hold a

Re: [libvirt] [libvirt-java] [PATCH] Update pom to include Java source level

2014-03-26 Thread Claudio Bley
At Wed, 26 Mar 2014 03:29:34 +, Chris Ellis wrote: Update the pom to set the Java source level. This enables Eclipse to correctly configure itself. So, you let ant generate the pom.xml and use that with Eclipse, right? Also include plugins to publish the source and javadocs vai Maven.

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 11:03:49 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:47PM +0100, Claudio Bley wrote: Add initEventLoop(), processEvent(), runEventLoop() and stopEventLoop() static methods to the Library class. Signed-off-by: Claudio Bley cb...@av-test.de

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:33:44 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:10PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:32:08 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:09PM +0100, Claudio Bley wrote: Eclipse generates this kind of warning: org/libvirt/jna/virConnectCredential.java:20: List is a raw type. References to generic type ListE should

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:34:05 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:11PM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Error.java |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ACK

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:34:24 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:12PM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- src/test/java/org/libvirt/TestJavaBindings.java |2 +- 1 file changed, 1 insertion(+), 1 deletion

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:34:52 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:13PM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- src/test/java/org/libvirt/TestJavaBindings.java |2 ++ 1 file changed, 2 insertions(+) ACK Thanks

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:35:17 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:14PM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Error.java | 397 ++ 1 file changed, 262

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:35:42 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:15PM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- .gitignore |2 ++ 1 file changed, 2 insertions(+) ACK. Counts as a trivial patch that can be pushed

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:36:33 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:17PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:40:46 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:20PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 14:42:26 +0100, Claudio Bley wrote: At Fri, 21 Feb 2014 10:37:36 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:18PM +0100, Claudio Bley wrote: Libvirt function parameters having type (pointer to) size_t were wrapped via JNA using int, long

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:41:35 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:21PM +0100, Claudio Bley wrote: The libvirt function virNodeDeviceListCaps might return fewer elements than requested. Take this into account and properly decode the UTF-8 strings returned

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:42:22 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:22PM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- src/test/java/org/libvirt/TestJavaBindings.java | 14 ++ 1 file changed, 14 insertions(+) ACK

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:44:42 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:25PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also update erroneous javadoc comments stating that methods would return a value

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:45:01 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:26PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:43:15 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:23PM +0100, Claudio Bley wrote: Almost every class contains a processError() method with an identical definition, just forwarding the call to ErrorHandler.processError(Libvirt). This function

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:43:43 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:24PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:46:19 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:29PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:48:44 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:30PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:45:22 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:27PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:49:33 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:32PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:49:52 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:33PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:50:57 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:35PM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Library.java |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ACK

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:50:22 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:34PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..) and remove calls to the deprecated ErrorHandler.processError(Libvirt) method. Also

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:45:55 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:28PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:51:17 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:36PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:49:15 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:31PM +0100, Claudio Bley wrote: Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Adjust the doc comment for storageVolLookupByName to indicate that it might

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:57:10 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:38PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
eAt Fri, 21 Feb 2014 10:57:44 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:39PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:58:35 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:40PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:36:10 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:16PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:59:25 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:42PM +0100, Claudio Bley wrote: 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

Re: [libvirt] [libvirt-java] [PATCH 00/65]

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 11:21:17 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:08PM +0100, Claudio Bley wrote: Hi. Here are a few patches that piled up in my local branch. Some of them I already submitted to this list, but there has been no reponse to them. Included

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:59:02 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:41PM +0100, Claudio Bley wrote: 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

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

2014-03-26 Thread Claudio Bley
At Fri, 21 Feb 2014 10:59:44 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:43PM +0100, Claudio Bley wrote: 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

Re: [libvirt] Memory allocation/usage

2014-03-24 Thread Claudio Bley
At Mon, 24 Mar 2014 11:19:35 +0530, Vikas Kokare wrote: We are trying to understand the memory allocation and usage for a KVM guest using the libvirt java API version 0.5.0. A certain memoryStats(int) on the Domain class allows you to fetch MemoryStatistic values. Each of this statistic has a

Re: [libvirt] [libvirt-java][PATCH] make Flags used to manipulate Domain accessible from outside of the package

2014-03-24 Thread Claudio Bley
[FTR, I've noticed the same thing when I started to use the Java bindings. Back then, this made me wonder whether the bindings are actually used by someone, because the constants are rather useless without being public and nobody objected...] At Fri, 21 Mar 2014 14:05:26 -0600, Yoshikazu

Re: [libvirt] More java bindings functions

2014-03-17 Thread Claudio Bley
/hacking.html#patches for general tips. Also, you might want to use git config format.subjectprefix 'java][PATCH' in order to indicate the project you're working on in the subject. -- BSc (Comp) Claudio Bley - Principal Software Engineer AV-TEST GmbH, Klewitzstr. 7, 39112 Magdeburg, Germany Phone

Re: [libvirt] [libvirt-java] [PATCH] Implement equals and hashCode methods for Connect and Domain

2014-03-12 Thread Claudio Bley
At Tue, 11 Mar 2014 11:18:57 +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Connect.java | 39 + src/main/java/org/libvirt/Domain.java | 52 ++- src/test/java/org/libvirt

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

2014-03-11 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- src/main/java/org/libvirt/Connect.java | 39 + src/main/java/org/libvirt/Domain.java | 52 ++- src/test/java/org/libvirt/TestJavaBindings.java |4 ++ 3 files changed, 94 insertions

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

2014-03-11 Thread Claudio Bley
into account. Please have a look at the following patch. As a future improvement, I think it would be feasible to cache the URI and UUID per Connect and Domain instance, respectively. Claudio Bley (1): Implement equals and hashCode methods for Connect and Domain src/main/java/org/libvirt/Connect.java

Re: [libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains

2014-03-10 Thread Claudio Bley
At Mon, 24 Feb 2014 15:18:21 +0100, Michal Privoznik wrote: On 19.02.2014 13:03, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- OK, how about this patch? While at it, should I convert the VIR_DOMAIN_VCPU_* instances to VIR_DOMAIN_AFFECT_* instances

Re: [libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains

2014-03-10 Thread Claudio Bley
At Mon, 10 Mar 2014 09:22:53 +0100, Claudio Bley wrote: At Mon, 24 Feb 2014 15:18:21 +0100, Michal Privoznik wrote: On 19.02.2014 13:03, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- OK, how about this patch? While at it, should I convert

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

2014-03-04 Thread Claudio Bley
At Mon, 03 Mar 2014 13:06:50 -0700, Eric Blake wrote: [1 text/plain; UTF-8 (quoted-printable)] On 02/13/2014 08:22 AM, Claudio Bley wrote: Note: these are only used internally. Signed-off-by: Claudio Bley cb...@av-test.de --- +static final int CONTROL_ERROR = 7

Re: [libvirt] Libvirt Java Bindings - adding domain event support - pull request

2014-03-03 Thread Claudio Bley
At Thu, 27 Feb 2014 03:47:31 +, Chris Ellis wrote: Hi all I'm new to this list, I've been making use of the Libvirt Java bindings recently. I wanted to make use of domain events yesterday so my application can be alerted when the state of a domain changes etc. However I quickly

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

2014-03-03 Thread Claudio Bley
At Fri, 21 Feb 2014 11:01:47 +, Daniel P. Berrange wrote: ACK, if you also add the virEventUpdateTimeout method OK, but why should I add it? It's useless (for the user) and unused by the wrapping code. I want to keep the JNA library definition clean -- e.g. in a later patch I remove all

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

2014-03-03 Thread Claudio Bley
At Mon, 3 Mar 2014 15:58:25 +, Daniel P. Berrange wrote: On Mon, Mar 03, 2014 at 04:46:51PM +0100, Claudio Bley wrote: At Fri, 21 Feb 2014 11:01:47 +, Daniel P. Berrange wrote: ACK, if you also add the virEventUpdateTimeout method OK, but why should I add it? It's

Re: [libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains

2014-02-21 Thread Claudio Bley
At Thu, 20 Feb 2014 12:19:35 -0700, Jim Fehlig wrote: Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- OK, how about this patch? While at it, should I convert the VIR_DOMAIN_VCPU_* instances to VIR_DOMAIN_AFFECT_* instances for consistency? src/esx

Re: [libvirt] [libvirt-java] [PATCH 00/65]

2014-02-21 Thread Claudio Bley
At Fri, 21 Feb 2014 11:19:23 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:08PM +0100, Claudio Bley wrote: Hi. Here are a few patches that piled up in my local branch. Some of them I already submitted to this list, but there has been no reponse to them. Included

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

2014-02-21 Thread Claudio Bley
At Fri, 14 Feb 2014 11:06:12 +0100, Guido Günther wrote: On Thu, Feb 13, 2014 at 04:22:15PM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- .gitignore |2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b02fd55

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

2014-02-21 Thread Claudio Bley
At Fri, 21 Feb 2014 10:37:36 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:18PM +0100, Claudio Bley wrote: 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

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

2014-02-21 Thread Claudio Bley
At Fri, 21 Feb 2014 11:10:22 +, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:22:53PM +0100, Claudio Bley wrote: Add LifecycleListener interface which needs to be implemented when the user wishes to receive lifecycle change events on domains. The DomainEvent class represents

Re: [libvirt] Is it possible to set a timeout to the Connection class?

2014-02-19 Thread Claudio Bley
Am 18.02.2014 15:02, schrieb Pasquale Dir: I am using the java api bindings. I'd like to set a connection timeout on the Connect class as sometimes it takes just too long. This depends on the driver you're using. If the connection is established over the network, you'd have to change the

Re: [libvirt] java api bindings for detecting domain events

2014-02-19 Thread Claudio Bley
Am 18.02.2014 18:15, schrieb Avanti Ajay: Hi.. I am doing a project in which I need to detect KVM domain events and I am using java for my project. On the net I found many patches for the libvirt Java API bindings for event detection. Does the latest version 0.5 have these patches included

[libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains

2014-02-19 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- OK, how about this patch? While at it, should I convert the VIR_DOMAIN_VCPU_* instances to VIR_DOMAIN_AFFECT_* instances for consistency? src/esx/esx_driver.c |2 +- src/openvz/openvz_driver.c |2 +- src/phyp/phyp_driver.c

Re: [libvirt] Is it possible to set a timeout to the Connection class?

2014-02-19 Thread Claudio Bley
[please, don't top-post on technical lists and keep the conversation on list] At Wed, 19 Feb 2014 11:59:29 +0100, Pasquale Dir wrote: Thank you I didn't think about the Future, I'll try it and if it doesn't work I'll just try to edit the tcp connection timeout file. Can you answer me to the

Re: [libvirt] virDomainGetMaxVcpus does not work as expected

2014-02-17 Thread Claudio Bley
Hi. Any opinions on this? At Thu, 13 Feb 2014 14:50:08 +0100, Claudio Bley wrote: 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

  1   2   3   4   5   >