At Wed, 5 Mar 2014 12:02:08 +0100,
Pasquale Dir wrote:
I am currently using Connect(String,ConnectAuth,int) constructor, as I
decided to use tcp connection and I need the auth part.
It works, but I still need the read/write flag which, in the
Connect(String, boolean) is a boolean. I need to enable write permits.
In the javadoc no flags are defined...so which is the flag for allow write?
And where can I find a list?
You can always have a look at the C API documentation:
http://libvirt.org/html/libvirt-libvirt.html#virConnectOpenAuth
and
http://libvirt.org/html/libvirt-libvirt.html#virConnectFlags
In your case, not passing the READ_ONLY flag means you get a read-write
connection.
I'm going to push a patch[1] improving this situation shortly. IMO, it
is a bad thing (ab-)using an int for a flags parameter, where you
don't have a hint from the compiler / IDE what kind of flags are
acceptable. I'm going to improve this situation further in the future.
Claudio
[1]:
https://www.redhat.com/archives/libvir-list/2014-February/msg00879.html