At Sun, 13 Jan 2013 19:09:29 +0100,
Wido den Hollander wrote:
The new migrateToUri method has the dxml argument which has been added
in virDomainMigrateToUri2.
The original migrateToUri method still uses virDomainMigrateToUri to
be sure we don't break backwards compatibility.
Signed-off-by: Wido den Hollander <wido(a)widodh.nl>
---
src/main/java/org/libvirt/Domain.java | 29 ++++++++++++++++++++++++++++
src/main/java/org/libvirt/jna/Libvirt.java | 2 ++
2 files changed, 31 insertions(+)
diff --git a/src/main/java/org/libvirt/Domain.java
b/src/main/java/org/libvirt/Domain.java
index 2758747..c903bac 100644
--- a/src/main/java/org/libvirt/Domain.java
+++ b/src/main/java/org/libvirt/Domain.java
@@ -907,6 +907,35 @@ public class Domain {
* given by duri.
There is no duri parameter for your new method.
I see, you just copied the comment from the old function.
But even worse, I found the same mistake in libvirt's
documentation. It wasn't easy to figure this out.
* @see <a
+ *
href="http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMigr...
+ * virDomainMigrateToURI</a>
+ *
+ * @param dconnuri
+ * (optional) URI for target libvirtd if @flags includes
VIR_MIGRATE_PEER2PEER
+ * @param miguri
+ * (optional) URI for invoking the migration, not if @flags includs
VIR_MIGRATE_TUNNELLED
+ * @param dxml
+ * (optional) XML config for launching guest on target
+ * @param flags
+ * Controls the migrate
+ * @param dname
+ * The name at the destnation
+ * @param bandwidth
+ * Specify the migration bandwidth
+ * @return 0 if successful
+ * @throws LibvirtException
+ */
+ public int migrateToURI(String dconnuri, String miguri, String dxml, long flags,
String dname, long bandwidth) throws LibvirtException {
ACK with this squashed in
--- >8 ----
diff --git a/src/main/java/org/libvirt/Domain.java
b/src/main/java/org/libvirt/Domain.java
index d68edbb..a72e8c6 100644
--- a/src/main/java/org/libvirt/Domain.java
+++ b/src/main/java/org/libvirt/Domain.java
@@ -926,8 +926,15 @@ public class Domain {
}
/**
- * Migrate the domain object from its current host to the destination host
- * given by duri.
+ * Migrate the domain object from its current host to the destination
+ * denoted by a given URI.
+ * <p>
+ * The destination is given either in dconnuri (if the
+ * {@link MigrateFlags#VIR_MIGRATE_PEER2PEER PEER2PEER}
+ * is flag set), or in miguri (if neither the
+ * {@link MigrateFlags#VIR_MIGRATE_PEER2PEER PEER2PEER} nor the
+ * {@link MigrateFlags#VIR_MIGRATE_TUNNELLED TUNNELLED} migration
+ * flag is set in flags).
*
* @see <a
*
href="http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMigr...
--
AV-Test GmbH, Henricistraße 20, 04155 Leipzig, Germany
Phone: +49 341 265 310 19
Web:<http://www.av-test.org>
Eingetragen am / Registered at: Amtsgericht Stendal (HRB 114076)
Geschaeftsfuehrer (CEO): Andreas Marx, Guido Habicht, Maik Morgenstern