[libvirt] [PATCH] qemu: Unref domain on error of opening qemu monitor
by Hu Tao
The domain refed will be left unrefed when there is error when opening
qemu monitor, so unref it.
---
src/qemu/qemu_driver.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 25695df..4bcfb27 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1385,7 +1385,7 @@ qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
(driver->securityDriver,vm) < 0) {
VIR_ERROR(_("Failed to set security context for monitor for %s"),
vm->def->name);
- goto error;
+ return ret;
}
/* Hold an extra reference because we can't allow 'vm' to be
@@ -1420,8 +1420,10 @@ qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
qemuDomainObjExitMonitorWithDriver(driver, vm);
error:
- if (ret < 0)
+ if (ret < 0) {
qemuMonitorClose(priv->mon);
+ virDomainObjUnref(vm);
+ }
return ret;
}
--
1.7.3
14 years, 1 month
Re: [libvirt] SPAM-LOW: Re: Re: Guide for libvirt C# bindings
by arnaud.champion@devatom.fr
?In fact, I think it's better to let the choice to the libvirt team. I think they should have a good reason to not expose windows binary.
Regards
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 10:28 AM
To: arnaud.champion(a)devatom.fr
Subject: Re: Re: Re: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
yes. Compiling them can be really tough. And thanks for your job that we may invoke api of libvirt in Windows.
Maybe you can upload the dll somewhere if libvirt.org won't host, just a suggestion.
Regards.
2010-10-28
--------------------------------------------------------------------------------
Lancer
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-10-28 16:10:54
收件人: 黄亮
抄送: libvir-list(a)redhat.com
主题: Re: Re: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
Yes all the dlls will be produced by this script.
In fact, thanks for the script to it's author, it's the harder part (especially for windows users as I am, we are not used to compile in the linux wa )
I hope in the future that the libvirt windows dll will be directly hosted on libvirt.org, but I don't know.
Regards,
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 10:05 AM
To: arnaud.champion(a)devatom.fr
Subject: Re: Re: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
Really appreciated!
Just to confirm that, all the dlls you mentioned is produced after I use photron scripts, right?
That's great. And really thank you for what you've done.
Regards and best wishes
2010-10-28
--------------------------------------------------------------------------------
黄亮
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-10-28 15:45:15
收件人: 黄亮
抄送: libvir-list(a)redhat.com
主题: Re: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
Okay,
libvirt-0.dll is the libvirt project compilation under windows. To produced it, there is two ways, the hard way and the smooth way
the hard way is to install msys, mingwin and so one to have all needed tools, then download needed sources compile them. It's hard, and long.
the smooth way is to use photron (Matthias) scripts to produce it. You can find scripts here : http://github.com/photron/msys_setup
You download the scripts and foolow the readme.txt which is inside.
Once you have compiled libvirt, you need to put these dll in an accessible way for your application (usually, I put it under the .exe produced by .Net) :
- libcurl-4.dll (if compiled with esx support)
- libgcrypt-11.dll
- libgnutls-26.dll
- libgpg-error-0.dll
- libportablexdr-0.dll
- libtasn1-3.dll
- libvirt-0.dll
- libxml2-2.dll
Regards,
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 9:29 AM
To: arnaud.champion(a)devatom.fr
Subject: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
Thank you for your reply.
I've downloaded the source code by git. It seems the project needs a dll called libvirt-0.dll.
It would be appreciated that you can tell me where to get the dll or how to produce it. Then I can try your examples and write my own.
Regards
2010-10-28
--------------------------------------------------------------------------------
Lancer
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-10-28 15:12:43
收件人: 黄亮
抄送: libvir-list(a)redhat.com
主题: Re: Guide for libvirt C# bindings
Hi,
the C# bindings provides 3 sample code to show how to use them. All functions are not in the examples, but examples show how to connect and get domain events (callbacks...)
I use these bindings for another project : DAVIM ( www.devatom.fr sorry it's in french only ) and they work well.
Anyway, I can help you if you have questions.
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 4:30 AM
To: arnaud.champion
Subject: Guide for libvirt C# bindings
Dear Arnaud Champion
I learned you are making C# bindings for libvirt on libvirt.org. I'm interested in it and want to have a try on Windows.
Do you have any guide books or introductions for using your C# bindings? I'm using .Net Framework 3.5 and VS 2005.
Look forward to your reply.
Regards
2010-10-28
--------------------------------------------------------------------------------
Lancer
__________ Information from ESET Smart Security, version of virus signature database 5569 (20101027) __________
The message was checked by ESET Smart Security.
http://www.eset.com
__________ Information from ESET Smart Security, version of virus signature database 5569 (20101027) __________
The message was checked by ESET Smart Security.
http://www.eset.com
14 years, 1 month
Re: [libvirt] SPAM-LOW: Re: Re: Guide for libvirt C# bindings
by arnaud.champion@devatom.fr
?Okay,
libvirt-0.dll is the libvirt project compilation under windows. To produced it, there is two ways, the hard way and the smooth way
the hard way is to install msys, mingwin and so one to have all needed tools, then download needed sources compile them. It's hard, and long.
the smooth way is to use photron (Matthias) scripts to produce it. You can find scripts here : http://github.com/photron/msys_setup
You download the scripts and foolow the readme.txt which is inside.
Once you have compiled libvirt, you need to put these dll in an accessible way for your application (usually, I put it under the .exe produced by .Net) :
- libcurl-4.dll (if compiled with esx support)
- libgcrypt-11.dll
- libgnutls-26.dll
- libgpg-error-0.dll
- libportablexdr-0.dll
- libtasn1-3.dll
- libvirt-0.dll
- libxml2-2.dll
Regards,
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 9:29 AM
To: arnaud.champion(a)devatom.fr
Subject: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
Thank you for your reply.
I've downloaded the source code by git. It seems the project needs a dll called libvirt-0.dll.
It would be appreciated that you can tell me where to get the dll or how to produce it. Then I can try your examples and write my own.
Regards
2010-10-28
--------------------------------------------------------------------------------
Lancer
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-10-28 15:12:43
收件人: 黄亮
抄送: libvir-list(a)redhat.com
主题: Re: Guide for libvirt C# bindings
Hi,
the C# bindings provides 3 sample code to show how to use them. All functions are not in the examples, but examples show how to connect and get domain events (callbacks...)
I use these bindings for another project : DAVIM ( www.devatom.fr sorry it's in french only ) and they work well.
Anyway, I can help you if you have questions.
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 4:30 AM
To: arnaud.champion
Subject: Guide for libvirt C# bindings
Dear Arnaud Champion
I learned you are making C# bindings for libvirt on libvirt.org. I'm interested in it and want to have a try on Windows.
Do you have any guide books or introductions for using your C# bindings? I'm using .Net Framework 3.5 and VS 2005.
Look forward to your reply.
Regards
2010-10-28
--------------------------------------------------------------------------------
Lancer
__________ Information from ESET Smart Security, version of virus signature database 5569 (20101027) __________
The message was checked by ESET Smart Security.
http://www.eset.com
14 years, 1 month
[libvirt] [PATCH] docs: updated the C# bindings page with arnauds latest changes
by Justin Clift
---
Going to push this directly, as Arnaud has already confirmed (on list) the
generated output is correct.
docs/csharp.html.in | 129 +++++++++++++++++++++++++++++++++------------------
1 files changed, 83 insertions(+), 46 deletions(-)
diff --git a/docs/csharp.html.in b/docs/csharp.html.in
index a32fbd2..dc67d7c 100644
--- a/docs/csharp.html.in
+++ b/docs/csharp.html.in
@@ -24,6 +24,8 @@
<p>
These bindings depend upon the libvirt libraries being installed.
+ </p>
+ <p>
In the .NET case, this is <b>libvirt-0.dll</b>, produced from
compiling libvirt for windows.
</p>
@@ -67,18 +69,51 @@ git clone git://libvirt.org/libvirt-csharp.git
<h2><a name="usage">Usage</a></h2>
<p>
- The class library exposes the <b>LibvirtBindings</b> namespace.
- This namespace exposes all of the needed types (enum, struct),
- and 2 main classes, <b>libVirt</b> and <b>libvirtError</b>.
+ The libvirt C# bindings class library exposes the <b>Libvirt</b>
+ namespace. This namespace exposes all of the needed types (enum,
+ struct), plus many classes exposing the libvirt API methods.
+ </p>
+ <p>
+ These classes are grouped into functional areas, with each class
+ exposing libvirt methods related to that area.
</p>
<p>
- The <b>libVirt</b> class exposes all of the interfaces of the
- libvirt library for handling virtualized domains.
+ For example, the libvirt methods related to connections, such as
+ <b>virConnectOpenAuth</b> and <b>virConnectNumOfDomains</b>, are in
+ the <b>Connect</b> class.
+ <br />
+ They are accessed as <b>Connect.OpenAuth</b>, and
+ <b>Connect.NumOfDomains</b> respectively.
</p>
<p>
- The <b>libvirtError</b> class exposes all of the interfaces of
- the libvirt library for handling errors raised while using the library.
+ In the same manner, the other class name mappings are:
+ </p>
+ <table class="top_table">
+ <tr><th>Name of libvirt function</th><th>C# class name</th></tr>
+ <tr><td>virDomain...</td><td>Domain</td></tr>
+ <tr><td>virEvent...</td><td>Event</td></tr>
+ <tr><td>virInterface...</td><td>Interface</td></tr>
+ <tr><td>virNetwork...</td><td>Network</td></tr>
+ <tr><td>virNode...</td><td>Node</td></tr>
+ <tr><td>virSecret...</td><td>Secret</td></tr>
+ <tr><td>virStoragePool...</td><td>StoragePool</td></tr>
+ <tr><td>virStorageVolume...</td><td>StorageVolume</td></tr>
+ <tr><td>virStream...</td><td>Stream</td></tr>
+ </table>
+ <p>
+ There are some additions as well:
</p>
+ <ul>
+ <li>
+ There is a class named <b>Library</b>, exposing the
+ <b>virGetVersion</b> and <b>virInitialize</b> methods
+ </li>
+ <li>
+ There is a class named <b>Errors</b>, exposing the error
+ related methods. For example, <b>virSetErrorFunc</b> and
+ <b>virConnResetLastError</b>.
+ </li>
+ </ul>
<p> </p>
@@ -92,14 +127,16 @@ git clone git://libvirt.org/libvirt-csharp.git
<p> </p>
- <h2><a name="notes">Notes on testing</a></h2>
+ <h2><a name="notes">Test Configuration</a></h2>
<p>
- Windows testing is performed on Windows 7, with .NET 4, Visual Studio 2010, and MonoDevelop 2.4.
- </p>
- <p>
- Linux testing is performed on Fedora 13 i686, with MonoDevelop 2.2.
+ Testing is performed using the following configurations:
</p>
+ <ul>
+ <li>Windows 7 (64 bits) / .Net 4</li>
+ <li>Windows 7 (64 bits) / Mono 2.6.7 (compiled in 32 bits)</li>
+ <li>Ubuntu 10.10 amd64 / Mono 2.6.7 (compiled in 64 bits)</li>
+ </ul>
<p> </p>
@@ -109,7 +146,7 @@ git clone git://libvirt.org/libvirt-csharp.git
Coverage of the libvirt types is:
</p>
<table class="top_table">
- <tr><th>Type</th><th>Name</th><th>Binding?</th><th>Tested?</th><th>Sample Code?</th><th>Works?</th><th>Tested .Net/Windows Works?</th><th>Tested Mono/Windows Works?</th><th>Tested Mono/Linux Works?</th></tr>
+ <tr><th>Type</th><th>Name</th><th>Binding?</th><th>Tested?</th><th>Sample Code?</th><th>Works?</th><th>Tested .Net/Windows Works?</th><th>Tested Mono (32-bit)/Windows Works?</th><th>Tested Mono (64-bit)/Linux Works?</th></tr>
<tr><td>enum</td><td>virCPUCompareResult</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virConnect</td><td>Yes, an IntPtr as the struct is not public</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virConnectAuth</td><td>Yes</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
@@ -122,7 +159,7 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>enum</td><td>virDomainCoreDumpFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virDomainCreateFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virDomainDeviceModifyFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>enum</td><td>virDomainEventDefinedDetailType</td><td>Yes</td><td> </td><td>Yes</td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>enum</td><td>virDomainEventDefinedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>struct</td><td>virDomainEventGraphicsAddress</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virDomainEventGraphicsAddressType</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virDomainEventGraphicsPhase</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
@@ -130,12 +167,12 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>struct</td><td>virDomainEventGraphicsSubjectIdentity</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virDomainEventID</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virDomainEventIOErrorAction</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>enum</td><td>virDomainEventResumedDetailType</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>enum</td><td>virDomainEventStartedDetailType</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>enum</td><td>virDomainEventStoppedDetailType</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>enum</td><td>virDomainEventSuspendedDetailType</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>enum</td><td>virDomainEventType</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>enum</td><td>virDomainEventUndefinedDetailType</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>enum</td><td>virDomainEventResumedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
+ <tr><td>enum</td><td>virDomainEventStartedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
+ <tr><td>enum</td><td>virDomainEventStoppedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
+ <tr><td>enum</td><td>virDomainEventSuspendedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
+ <tr><td>enum</td><td>virDomainEventType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
+ <tr><td>enum</td><td>virDomainEventUndefinedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>enum</td><td>virDomainEventWatchdogAction</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virDomainInfo</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virDomainInterfaceStatsStruct</td><td>Yes</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
@@ -149,7 +186,7 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>enum</td><td>virDomainSnapshotDeleteFlags</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virDomainState</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virDomainXMLFlags</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>enum</td><td>virEventHandleType</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>enum</td><td>virEventHandleType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>struct</td><td>virInterface</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virInterfaceXMLFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virNWFilter</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
@@ -162,10 +199,10 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>enum</td><td>virSecretUsageType</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virSecurityLabel</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virSecurityModel</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>struct</td><td>virStoragePool</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virStoragePoolBuildFlags</td><td>Yes</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virStoragePoolDeleteFlags</td><td>Yes</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virStoragePoolInfo</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>struct</td><td>virStoragePool</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virStoragePoolState</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>struct</td><td>virStorageVol</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>enum</td><td>virStorageVolDeleteFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
@@ -186,10 +223,10 @@ git clone git://libvirt.org/libvirt-csharp.git
Coverage of the libvirt functions is:
</p>
<table class="top_table">
- <tr><th>Name</th><th>Binding?</th><th>Type?</th><th>Tested?</th><th>Sample Code?</th><th>Working?</th><th>Tested .Net/Windows Works?</th><th>Tested Mono/Windows Works?</th><th>Tested Mono/Linux Works?</th></tr>
- <tr><td>virConnectAuthCallbackPtr</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td> </td></tr>
+ <tr><th>Name</th><th>Binding?</th><th>Type?</th><th>Tested?</th><th>Sample Code?</th><th>Working?</th><th>Tested .Net/Windows Works?</th><th>Tested Mono (32-bit)/Windows Works?</th><th>Tested Mono (64-bit)/Linux Works?</th></tr>
+ <tr><td>virConnectAuthCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virConnectBaselineCPU</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virConnectClose</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td> </td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
+ <tr><td>virConnectClose</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virConnectCompareCPU</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectDomainEventCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectDomainEventDeregister</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
@@ -199,7 +236,7 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virConnectDomainEventIOErrorCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectDomainEventIOErrorReasonCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectDomainEventRTCChangeCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virConnectDomainEventRegister</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virConnectDomainEventRegister</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virConnectDomainEventRegisterAny</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectDomainEventWatchdogCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectDomainXMLFromNative</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
@@ -219,11 +256,11 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virConnectListDefinedNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectListDefinedStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectListDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
- <tr><td>virConnectListInterfaces</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes, if the host handles the method</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virConnectListInterfaces</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes, if the host handle the method</td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectListNWFilters </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectListNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectListSecrets</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virConnectListStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virConnectListStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virConnectNumOfDefinedDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virConnectNumOfDefinedInterfaces</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectNumOfDefinedNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
@@ -233,8 +270,8 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virConnectNumOfNWFilters</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectNumOfNetworks </td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectNumOfSecrets</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virConnectNumOfStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virConnectOpen</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virConnectNumOfStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
+ <tr><td>virConnectOpen</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen, virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virConnectOpenAuth</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virConnectOpenReadOnly</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>virConnectRef</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
@@ -272,29 +309,29 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virDomainGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainHasCurrentSnapshot</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainHasManagedSaveImage</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virDomainInterfaceStats</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virDomainInterfaceStats </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainIsActive</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainIsPersistent</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainLookupByID</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virDomainLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainLookupByUUID</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainLookupByUUIDString</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virDomainManagedSave</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virDomainManagedSave </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainManagedSaveRemove</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainMemoryPeek</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainMemoryStats</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainMigrate</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainMigrateSetMaxDowntime</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virDomainMigrateToURI</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virDomainMigrateToURI </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainPinVcpu</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainReboot</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virDomainRef</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virDomainRef </td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainRestore</td><td>Yes </td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virDomainResume</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virDomainResume </td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainRevertToSnapshot</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainSave</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainSetAutostart</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virDomainSetMaxMemory</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virDomainSetMaxMemory </td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainSetMemory</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainSetSchedulerParameters</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virDomainSetVcpus</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
@@ -312,14 +349,14 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virDomainUpdateDeviceFlags</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virEventAddHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virEventAddTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virEventHandleCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virEventRegisterImpl</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virEventHandleCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
+ <tr><td>virEventRegisterImpl</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virEventRemoveHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virEventRemoveTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virEventTimeoutCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virEventTimeoutCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virEventUpdateHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virEventUpdateTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
- <tr><td>virFreeCallback</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virFreeCallback</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
<tr><td>virGetVersion</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virInitialize</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virInterfaceCreate</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
@@ -333,7 +370,7 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virInterfaceIsActive</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virInterfaceLookupByMACString</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virInterfaceLookupByName</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virInterfaceRef</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virInterfaceRef </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virInterfaceUndefine</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virNWFilterDefineXML</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virNWFilterFree</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
@@ -344,7 +381,7 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virNWFilterLookupByName </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virNWFilterLookupByUUID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virNWFilterLookupByUUIDString</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virNWFilterRef</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virNWFilterRef </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virNWFilterUndefine</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virNetworkCreate</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virNetworkCreateXML</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
@@ -386,10 +423,10 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virNodeListDevices</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virNodeNumOfDevices</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virSecretDefineXML</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virSecretFree</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virSecretFree </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virSecretGetConnect</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virSecretGetUUID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virSecretGetUUIDString</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virSecretGetUUIDString </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virSecretGetUsageID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virSecretGetUsageType</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virSecretGetValue</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
@@ -441,13 +478,13 @@ git clone git://libvirt.org/libvirt-csharp.git
<tr><td>virStorageVolLookupByPath</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
<tr><td>virStorageVolRef</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>No</td><td> </td><td> </td><td> </td></tr>
<tr><td>virStorageVolWipe</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virStreamAbort</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virStreamAbort </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virStreamEventAddCallback</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virStreamEventCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virStreamEventRemoveCallback</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virStreamEventUpdateCallback</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virStreamFinish </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
- <tr><td>virStreamFree</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
+ <tr><td>virStreamFree </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virStreamNew</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virStreamRecv</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>virStreamRecvAll</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
--
1.7.2.3
14 years, 1 month
Re: [libvirt] SPAM-LOW: Re: Re: Guide for libvirt C# bindings
by arnaud.champion@devatom.fr
?Yes all the dlls will be produced by this script.
In fact, thanks for the script to it's author, it's the harder part (especially for windows users as I am, we are not used to compile in the linux wa )
I hope in the future that the libvirt windows dll will be directly hosted on libvirt.org, but I don't know.
Regards,
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 10:05 AM
To: arnaud.champion(a)devatom.fr
Subject: Re: Re: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
Really appreciated!
Just to confirm that, all the dlls you mentioned is produced after I use photron scripts, right?
That's great. And really thank you for what you've done.
Regards and best wishes
2010-10-28
--------------------------------------------------------------------------------
黄亮
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-10-28 15:45:15
收件人: 黄亮
抄送: libvir-list(a)redhat.com
主题: Re: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
Okay,
libvirt-0.dll is the libvirt project compilation under windows. To produced it, there is two ways, the hard way and the smooth way
the hard way is to install msys, mingwin and so one to have all needed tools, then download needed sources compile them. It's hard, and long.
the smooth way is to use photron (Matthias) scripts to produce it. You can find scripts here : http://github.com/photron/msys_setup
You download the scripts and foolow the readme.txt which is inside.
Once you have compiled libvirt, you need to put these dll in an accessible way for your application (usually, I put it under the .exe produced by .Net) :
- libcurl-4.dll (if compiled with esx support)
- libgcrypt-11.dll
- libgnutls-26.dll
- libgpg-error-0.dll
- libportablexdr-0.dll
- libtasn1-3.dll
- libvirt-0.dll
- libxml2-2.dll
Regards,
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 9:29 AM
To: arnaud.champion(a)devatom.fr
Subject: SPAM-LOW: Re: Re: Guide for libvirt C# bindings
Thank you for your reply.
I've downloaded the source code by git. It seems the project needs a dll called libvirt-0.dll.
It would be appreciated that you can tell me where to get the dll or how to produce it. Then I can try your examples and write my own.
Regards
2010-10-28
--------------------------------------------------------------------------------
Lancer
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-10-28 15:12:43
收件人: 黄亮
抄送: libvir-list(a)redhat.com
主题: Re: Guide for libvirt C# bindings
Hi,
the C# bindings provides 3 sample code to show how to use them. All functions are not in the examples, but examples show how to connect and get domain events (callbacks...)
I use these bindings for another project : DAVIM ( www.devatom.fr sorry it's in french only ) and they work well.
Anyway, I can help you if you have questions.
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 4:30 AM
To: arnaud.champion
Subject: Guide for libvirt C# bindings
Dear Arnaud Champion
I learned you are making C# bindings for libvirt on libvirt.org. I'm interested in it and want to have a try on Windows.
Do you have any guide books or introductions for using your C# bindings? I'm using .Net Framework 3.5 and VS 2005.
Look forward to your reply.
Regards
2010-10-28
--------------------------------------------------------------------------------
Lancer
__________ Information from ESET Smart Security, version of virus signature database 5569 (20101027) __________
The message was checked by ESET Smart Security.
http://www.eset.com
14 years, 1 month
[libvirt] C# bindins web page changes
by arnaud.champion@devatom.fr
?Hi Justin,
since renaming of the C# bindings is done, the usage described has also to be changed.
I'll try to explain you :
the project no more expose the namespace "libvirtBindings", in place the new namespace is "Libvirt".
The Libvirt namespace expose all types needed (struct, enum...)
Now there is more classes to expose API methods :
- virConnect... methods (virConnectOpen, virConnectNumOfDomains,etc) are in the "Connect" class. For example, "virConnectOpenAuth" is "Connect.OpenAuth" method in bindings, "virConnectNumOfDomains" is "Connect.NumOfDomains"
In the same manner :
virDomain... methods are in the "Domain" class
virEvent... in the "Event" class
virInterface... in the "Interface" class
virNetwork... in the "Network" class
virNode... in the "Node" class
virSecret... in the "Secret" class (even if nothing is binded in it :S but it will be)
virStoragePool... in the "StoragePool" class
virStorageVolume... in the "StorageVolume" class
virStream... in the "Stream" class
There is some exceptions in fact :
- there is a class "Library" which expose "virGetVersion" and "virInitialize" methods
- the class "Errors" which expose error related methods (for example "virSetErrorFunc" or "virConnResetLastError")
Best regards,
Arnaud
14 years, 1 month
Re: [libvirt] Guide for libvirt C# bindings
by arnaud.champion@devatom.fr
?Hi,
the C# bindings provides 3 sample code to show how to use them. All functions are not in the examples, but examples show how to connect and get domain events (callbacks...)
I use these bindings for another project : DAVIM ( www.devatom.fr sorry it's in french only ) and they work well.
Anyway, I can help you if you have questions.
Arnaud
From: 黄亮
Sent: Thursday, October 28, 2010 4:30 AM
To: arnaud.champion
Subject: Guide for libvirt C# bindings
Dear Arnaud Champion
I learned you are making C# bindings for libvirt on libvirt.org. I'm interested in it and want to have a try on Windows.
Do you have any guide books or introductions for using your C# bindings? I'm using .Net Framework 3.5 and VS 2005.
Look forward to your reply.
Regards
2010-10-28
--------------------------------------------------------------------------------
Lancer
14 years, 1 month
[libvirt] [PATCH] docs: update ruby bindings maintainer to chris lalancette
by Justin Clift
---
docs/bindings.html.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/bindings.html.in b/docs/bindings.html.in
index b190a38..41114f0 100644
--- a/docs/bindings.html.in
+++ b/docs/bindings.html.in
@@ -60,7 +60,7 @@
</p>
</li>
<li>
- <strong>Ruby</strong>: David Lutterkort develops
+ <strong>Ruby</strong>: Chris Lalancette develops
<a href="http://libvirt.org/ruby/">Ruby bindings</a>.
</li>
</ul>
--
1.7.2.3
14 years, 1 month
[libvirt] [PATCH] docs: revamp api_extension example, using vcpu patch series
by Eric Blake
Complete patch is compressed and attached, because it is so large. But
the bulk of it consisted mainly of running 'git format-patch -15
b0137887' to pick up the top of my vcpu series, then replacing the
contents of docs/api_extension/ with the new patches.
The meat of the patch is the overview html file, copied here if you
don't want to unzip the attachment:
2010-10-20 Eric Blake <eblake(a)redhat.com>
docs: revamp api_extension example, using vcpu patch series
* docs/api_extension/*: Replace example files.
* docs/api_extension.html.in: Rewrite to match new example files.
diff --git c/docs/api_extension.html.in w/docs/api_extension.html.in
index de6eedc..1396e91 100644
--- c/docs/api_extension.html.in
+++ w/docs/api_extension.html.in
@@ -10,8 +10,12 @@
<p>
This document walks you through the process of implementing a new
- API in libvirt. It uses as an example the addition of the node
device
- create and destroy APIs.
+ API in libvirt. It uses as an example the addition of
+ separating maximum from current vcpu usage of a domain.
+ Remember that new API includes any new public functions, but it
+ also includes addition of flags or extension of XML used through
+ existing functions. The example in this document adds both
+ types of API, and not all extensions require quite as many patches.
</p>
<p>
@@ -23,7 +27,12 @@
added to libvirt. Someone may already be working on the feature you
want. Also, recognize that everything you write is likely to
undergo
significant rework as you discuss it with the other developers, so
- don't wait too long before getting feedback.
+ don't wait too long before getting feedback. In the vcpu example
+ below, list feedback was first requested
+ <a
href="https://www.redhat.com/archives/libvir-list/2010-September/msg00423.html">here</a>,
+ and resulted in several rounds of improvements before coding
+ began, and this example is slightly rearranged from the actual
+ order of the commits.
</p>
<p>
@@ -46,11 +55,22 @@
<li>define the public API</li>
<li>define the internal driver API</li>
<li>implement the public API</li>
- <li>define the wire protocol format</li>
- <li>implement the RPC client</li>
- <li>implement the server side dispatcher</li>
- <li>implement the driver methods</li>
+ <li>implement the remote protocol:
+ <ol>
+ <li>define the wire protocol format</li>
+ <li>implement the RPC client</li>
+ <li>implement the server side dispatcher</li>
+ </ol>
+ </li>
+ <li>use new API where appropriate in drivers</li>
<li>add virsh support</li>
+ <li>add common handling for new API</li>
+ <li>for each driver that can support the new API:
+ <ol>
+ <li>add prerequisite support</li>
+ <li>fully implement new API</li>
+ </ol>
+ </li>
</ol>
<p>
@@ -66,11 +86,10 @@
functionality--get the whole thing working and make sure you're
happy
with it. Then use git or some other version control system that
lets
you rewrite your commit history and break patches into pieces so you
- don't drop a big blob of code on the mailing list at one go. For
- example, I didn't follow my own advice when I originally
submitted the
- example code to the libvirt list but rather submitted it in several
- large chunks. I've used git's ability to rewrite my commit
history to
- break the code apart into the example patches shown.
+ don't drop a big blob of code on the mailing list at one go.
+ The example code used in this document was rebased several
+ times between the original list posting and the final committed
+ version.
</p>
<p>
@@ -86,9 +105,23 @@
<h2><a name='publicapi'>Defining the public API</a></h2>
- <p>The first task is to define the public API and add it to:</p>
+ <p>The first task is to define the public API. If the addition
+ involves XML, this includes enhancing the RelaxNG schema and
+ documenting the new elements or attributes:</p>
- <p><code>include/libvirt/libvirt.h.in</code></p>
+ <p><code>
+ docs/schemas/domain.rng<br/>
+ docs/formatdomain.html.in
+ </code></p>
+
+ <p>If the addition involves a new function, this involves adding
+ a declaration in the public header, and arranging to export the
+ symbol:</p>
+
+ <p><code>
+ include/libvirt/libvirt.h.in
+ src/libvirt_public.syms
+ </code></p>
<p>
This task is in many ways the most important to get right, since
once
@@ -99,12 +132,9 @@
rework it as you go through the process of implementing it.
</p>
- <p>Once you have defined the API, you have to add the symbol names
to:</p>
-
- <p><code>src/libvirt_public.syms</code></p>
-
- <p class="example">See <a
href="api_extension/0001-Step-1-of-8-Define-the-public-API.patch">0001-Step-1-of-8-Define-the-public-API.patch</a>
for example code.</p>
-
+ <p class="example">See <a
href="api_extension/0001-Step-1-of-15-add-to-xml.patch">0001-Step-1-of-15-add-to-xml.patch</a>
+ and <a
href="api_extension/0002-Step-2-of-15-add-new-public-API.patch">0002-Step-2-of-15-add-new-public-API.patch</a>
+ for example code.</p>
<h2><a name='internalapi'>Defining the internal API</a></h2>
@@ -118,7 +148,7 @@
<p>
Of course, it's possible that the new API will involve the
creation of
- an entire new driver type, in which case the changes will include the
+ an entirely new driver type, in which case the changes will
include the
creation of a new struct type to represent the new driver type.
</p>
@@ -129,10 +159,11 @@
<p>
To define the internal API, first typedef the driver function
prototype and then add a new field for it to the relevant driver
- struct.
+ struct. Then, update all existing instances of the driver to
+ provide a <code>NULL</code> stub for the new function.
</p>
- <p class="example">See <a
href="api_extension/0002-Step-2-of-8-Define-the-internal-driver-API.patch">0002-Step-2-of-8-Define-the-internal-driver-API.patch</a></p>
+ <p class="example">See <a
href="api_extension/0003-Step-3-of-15-define-internal-driver-API.patch">0003-Step-3-of-15-define-internal-driver-API.patch</a></p>
<h2><a name='implpublic'>Implementing the public API</a></h2>
@@ -166,16 +197,23 @@
<p><code>src/libvirt.c</code></p>
- <p class="example">See <a
href="api_extension/0003-Step-3-of-8-Implement-the-public-API.patch">0003-Step-3-of-8-Implement-the-public-API.patch</a></p>
+ <p class="example">See <a
href="api_extension/0004-Step-4-of-15-implement-the-public-APIs.patch">0004-Step-4-of-15-implement-the-public-APIs.patch</a></p>
+
+ <h2><a name='remoteproto'>Implementing the remote protocol</a></h2>
+
+ <p>
+ Implementing the remote protocol is essentially a
+ straightforward exercise which is probably most easily
+ understood by referring to the existing code and the example
+ patch. It involves several related changes, followed by
+ regenerating derived files.</p>
+ <p class="example">See <a
href="api_extension/0005-Step-5-of-15-implement-the-remote-protocol.patch">0005-Step-5-of-15-implement-the-remote-protocol.patch</a></p>
- <h2><a name='wireproto'>Defining the wire protocol format</a></h2>
+ <h3><a name='wireproto'>Defining the wire protocol format</a></h3>
<p>
- Defining the wire protocol is essentially a straightforward exercise
- which is probably most easily understood by referring to the existing
- remote protocol wire format definitions and the example patch. It
- involves making two additions to:
+ Defining the wire protocol involves making additions to:
</p>
<p><code>src/remote/remote_protocol.x</code></p>
@@ -185,7 +223,7 @@
to the API. One struct describes the parameters to be passed to the
remote function, and a second struct describes the value returned by
the remote function. The one exception to this rule is that
functions
- that return only integer status do not require a struct for returned
+ that return only 0 or -1 for status do not require a struct for
returned
data.
</p>
@@ -194,23 +232,19 @@
added to the API.
</p>
- <p class="example">See <a
href="api_extension/0004-Step-4-of-8-Define-the-wire-protocol-format.patch">0004-Step-4-of-8-Define-the-wire-protocol-format.patch</a></p>
-
<p>
Once these changes are in place, it's necessary to run 'make rpcgen'
in the src directory to create the .c and .h files required by the
remote protocol code. This must be done on a Linux host using the
GLibC rpcgen program. Other rpcgen versions may generate code which
- results in bogus compile time warnings
+ results in bogus compile time warnings.
</p>
-
- <h2><a name='rpcclient'>Implement the RPC client</a></h2>
+ <h3><a name='rpcclient'>Implement the RPC client</a></h3>
<p>
- Implementing the RPC client is also relatively mechanical, so
refer to
- the exising code and example patch for guidance. The RPC client uses
- the rpcgen generated .h files. The remote method calls go in:
+ Implementing the uses the rpcgen generated .h files. The remote
+ method calls go in:
</p>
<p><code>src/remote/remote_internal.c</code></p>
@@ -227,17 +261,10 @@
<li>unlocks the remote driver.</li>
</ol>
- <p>
- Once you have created the remote method calls, you have to add fields
- for them to the driver structs for the appropriate remote driver.
- </p>
-
- <p class="example">See <a
href="api_extension/0005-Step-5-of-8-Implement-the-RPC-client.patch">0005-Step-5-of-8-Implement-the-RPC-client.patch</a></p>
-
- <h2><a name="serverdispatch">Implement the server side
dispatcher</a></h2>
+ <h3><a name="serverdispatch">Implement the server side
dispatcher</a></h3>
<p>
- Implementing the server side of the remote function calls is simply a
+ Implementing the server side of the remote function call is simply a
matter of deserializing the parameters passed in from the remote
caller and passing them to the corresponding internal API function.
The server side dispatchers are implemented in:
@@ -247,8 +274,65 @@
<p>Again, this step uses the .h files generated by make rpcgen.</p>
- <p class="example">See <a
href="api_extension/0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch">0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch</a></p>
+ <p>
+ After all three pieces of the remote protocol are complete, and
+ the generated files have been updated, it will be necessary to
+ update the file:</p>
+
+ <p><code>src/remote_protocol-structs</code></p>
+
+ <p>
+ This file should only have new lines added; modifications to
+ existing lines probably imply a backwards-incompatible API change.
+ </p>
+
+ <p class="example">See <a
href="api_extension/0005-Step-5-of-15-implement-the-remote-protocol.patch">0005-Step-5-of-15-implement-the-remote-protocol.patch</a></p>
+
+ <h2><a name="internaluseapi">Use the new API internally</a></h2>
+
+ <p>
+ Many times, a new API is merely an extension of existing
+ concepts that accomplished a subset of the same actions. When
+ this is the case, it makes sense to share a common
+ implementation by making the older API become a trivial wrapper
+ around the new API, rather than duplicating the common code.
+ This step should not introduce any semantic differences for the
+ old API. This step is optional if the new API has no relation
+ to existing API.
+ </p>
+
+ <p class="example">See <a
href="api_extension/0006-Step-6-of-15-make-old-API-trivially-wrap-to-new-API.patch">0006-Step-6-of-15-make-old-API-trivially-wrap-to-new-API.patch</a></p>
+
+ <h2><a name="virshuseapi">Expose the new API in virsh</a></h2>
+
+ <p>
+ All new API should be manageable from the virsh command line
+ shell. This proves that the API is sufficient for the purpose,
+ and makes it possible to identify if the proposed API needs slight
+ changes for easier usage. However, remember that virsh is used
+ to connect to hosts running older versions of libvirtd, so the
+ new commands should have fallbacks to the older API when
+ possible; implementing the virsh hooks at this point makes it
+ very easy to test these fallbacks. Also remember to document
+ virsh additions.
+ </p>
+
+ <p>
+ A virsh command is composed of a few pieces of code. You need to
+ define an array of vshCmdInfo structs for each new command that
+ contain the help text and the command description text. You also
need
+ an array of vshCmdOptDef structs to describe the command options.
+ Once you have those pieces of data in place you can write the
function
+ implementing the virsh command. Finally, you need to add the new
+ command to the commands[] array. The following files need changes:
+ </p>
+ <p><code>
+ tools/virsh.c<br/>
+ tools/virsh.pod
+ </code></p>
+
+ <p class="example">See <a
href="api_extension/0007-Step-7-of-15-add-virsh-support.patch">0007-Step-7-of-15-add-virsh-support.patch</a></p>
<h2><a name="driverimpl">Implement the driver methods</a></h2>
@@ -261,42 +345,72 @@
adding.
</p>
+ <h3><a name="commonimpl">Implement common handling</a></h3>
+
<p>
- In the example code, the extension is only an additional two function
- calls in the node device API, so most of the new code is additions to
- existing files. The only new files are there for multi-platform
- implementation convenience, as some of the new code is Linux
specific.
+ If the new API is applicable to more than one driver, it may
+ make sense to provide some utility routines, or to factor some
+ of the work into the dispatcher, to avoid reimplementing the
+ same code in every driver. In the example code, this involved
+ adding a member to the virDomainDefPtr struct for mapping
+ between the XML API addition and the in-memory representation of
+ a domain, along with updating all clients to use the new member.
+ Up to this point, there have been no changes to existing
+ semantics, and the new APIs will fail unless they are used in
+ the same way as the older API wrappers.
</p>
+ <p class="example">See <a
href="api_extension/0008-Step-8-of-15-support-new-xml.patch">0008-Step-8-of-15-support-new-xml.patch</a></p>
+
+ <h3><a name="drivercode">Implement driver handling</a></h3>
+
<p>
- The example code is probably uninteresting unless you're concerned
- with libvirt storage, but I've included it here to show how new files
- are added to the build environment.
+ The remaining patches should only touch one driver at a time.
+ It is possible to implement all changes for a driver in one
+ patch, but for review purposes, it may still make sense to break
+ things into simpler steps. Here is where the new APIs finally
+ start working.
</p>
- <p class="example">See <a
href="api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch">0007-Step-7-of-8-Implement-the-driver-methods.patch</a></p>
+ <p>
+ In the example patches, three separate drivers are supported:
+ test, qemu, and xen. It is always a good idea to patch the test
+ driver in addition to the target driver, to prove that the API
+ can be used for more than one driver. The example updates the
+ test driver in one patch:
+ </p>
- <h2><a name="virsh">Implement virsh commands</a></h2>
+ <p class="example">See <a
href="api_extension/0009-Step-9-of-15-support-all-flags-in-test-driver.patch">0009-Step-9-of-15-support-all-flags-in-test-driver.patch</a></p>
<p>
- Once you have the new functionality in place, the easiest way to test
- it and also to provide it to end users is to implement support for it
- in virsh.
+ The qemu changes were easier to split into two phases, one for
+ updating the mapping between the new XML and the hypervisor
+ command line arguments, and one for supporting all possible
+ flags of the new API:
</p>
+ <p class="example">See <a
href="api_extension/0010-Step-10-of-15-improve-vcpu-support-in-qemu-command-line.patch">0010-Step-10-of-15-improve-vcpu-support-in-qemu-command-line.patch</a>
+ and <a
href="api_extension/0011-Step-11-of-15-complete-vcpu-support-in-qemu-driver.patch">0011-Step-11-of-15-complete-vcpu-support-in-qemu-driver.patch</a></p>
+
<p>
- A virsh command is composed of a few pieces of code. You need to
- define an array of vshCmdInfo structs for each new command that
- contain the help text and the command description text. You also
need
- an array of vshCmdOptDef structs to describe the command options.
- Once you have those pieces of data in place you can write the
function
- implementing the virsh command. Finally, you need to add the new
- command to the commands[] array.
+ Finally, the example breaks the xen driver changes across four
+ patches, mapping the XML changes to the hypervisor command
+ lines, implementing the getter API independently of the setter
+ API, and cleanup of up code rendered dead by the new API:
</p>
- <p class="example">See <a
href="api_extension/0008-Step-8-of-8-Add-virsh-support.patch">0008-Step-8-of-8-Add-virsh-support.patch</a></p>
+ <p class="example">See <a
href="api_extension/0012-Step-12-of-15-improve-vcpu-support-in-xen-command-line.patch">0012-Step-12-of-15-improve-vcpu-support-in-xen-command-line.patch</a>,
+ <a
href="api_extension/0013-Step-13-of-15-improve-support-for-getting-xen-vcpu-counts.patch">0013-Step-13-of-15-improve-support-for-getting-xen-vcpu-counts.patch</a>,
+ <a
href="api_extension/0014-Step-14-of-15-improve-support-for-setting-xen-vcpu-counts.patch">0014-Step-14-of-15-improve-support-for-setting-xen-vcpu-counts.patch</a>,
+ and <a
href="api_extension/0015-Step-15-of-15-remove-dead-xen-code.patch">0015-Step-15-of-15-remove-dead-xen-code.patch</a></p>
+
+ <p>
+ The exact details of the example code are probably uninteresting
+ unless you're concerned with virtual cpu management.
+ </p>
<p>Once you have working functionality, run make check and make
- syntax-check before generating patches.</p>
+ syntax-check on each patch of the series before submitting
+ patches.</p>
</body>
</html>
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
14 years, 1 month