[libvirt] [libvirt-java] [PATCH] Fix javadoc comments

Claudio Bley cbley at av-test.de
Wed Jan 8 14:38:03 UTC 2014


Correct some typos and paste the right documentation from
virInterfaceCreate, virInterfaceDestroy to the Interface.create
and Interface.destroy doc comments.
---
Pushing under the trivial rule.

 src/main/java/org/libvirt/Domain.java              |  2 +-
 .../java/org/libvirt/DomainInterfaceStats.java     |  2 +-
 src/main/java/org/libvirt/DomainSnapshot.java      |  2 +-
 src/main/java/org/libvirt/Interface.java           | 22 ++++++++++++++++++----
 src/main/java/org/libvirt/Stream.java              |  4 ++--
 5 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/src/main/java/org/libvirt/Domain.java b/src/main/java/org/libvirt/Domain.java
index e4c45f6..2f70bf2 100644
--- a/src/main/java/org/libvirt/Domain.java
+++ b/src/main/java/org/libvirt/Domain.java
@@ -370,7 +370,7 @@ public class Domain {
     }
 
     /**
-     * Provides a boolean value indicating whether the network is configured to
+     * Provides a boolean value indicating whether the domain is configured to
      * be automatically started when the host machine boots.
      *
      * @return the result
diff --git a/src/main/java/org/libvirt/DomainInterfaceStats.java b/src/main/java/org/libvirt/DomainInterfaceStats.java
index 0e948d5..eab5c44 100644
--- a/src/main/java/org/libvirt/DomainInterfaceStats.java
+++ b/src/main/java/org/libvirt/DomainInterfaceStats.java
@@ -3,7 +3,7 @@ package org.libvirt;
 import org.libvirt.jna.virDomainInterfaceStats;
 
 /**
- * The Domain.interfaceStats method returns th network counters in this object
+ * The Domain.interfaceStats method returns the network counters in this object.
  *
  * @author stoty
  *
diff --git a/src/main/java/org/libvirt/DomainSnapshot.java b/src/main/java/org/libvirt/DomainSnapshot.java
index b58fd20..9409fef 100644
--- a/src/main/java/org/libvirt/DomainSnapshot.java
+++ b/src/main/java/org/libvirt/DomainSnapshot.java
@@ -27,7 +27,7 @@ public class DomainSnapshot {
      *      href="http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSnapshotDelete">Libvirt
      *      Documentation</a>
      * @param flags
-     *            controls teh deletion
+     *            controls the deletion
      * @return 0 if the selected snapshot(s) were successfully deleted, -1 on error.
      * @throws LibvirtException
      */
diff --git a/src/main/java/org/libvirt/Interface.java b/src/main/java/org/libvirt/Interface.java
index 7782fb9..6ea21b6 100644
--- a/src/main/java/org/libvirt/Interface.java
+++ b/src/main/java/org/libvirt/Interface.java
@@ -40,8 +40,13 @@ public class Interface {
     }
 
     /**
-     * Create and start a defined network. If the call succeed the network moves
-     * from the defined to the running networks pools.
+     * Activate an interface (i.e. call "ifup").
+     * <p>
+     * If there was an open network config transaction at the time
+     * this interface was defined (that is, if
+     * virInterfaceChangeBegin() had been called), the interface will
+     * be brought back down (and then undefined) if
+     * virInterfaceChangeRollback() is called.
      *
      * @throws LibvirtException
      */
@@ -52,8 +57,17 @@ public class Interface {
     }
 
     /**
-     * Destroy the network object. The running instance is shutdown if not down
-     * already and all resources used by it are given back to the hypervisor.
+     * Deactivate an interface (i.e. call "ifdown").
+     * <p>
+     * This does not remove the interface from the config, and does
+     * not free the associated virInterfacePtr object.
+     * <p>
+     * If there is an open network config transaction at the time this
+     * interface is destroyed (that is, if virInterfaceChangeBegin()
+     * had been called), and if the interface is later undefined and
+     * then virInterfaceChangeRollback() is called, the restoral of
+     * the interface definition will also bring the interface back
+     * up.
      *
      * @throws LibvirtException
      */
diff --git a/src/main/java/org/libvirt/Stream.java b/src/main/java/org/libvirt/Stream.java
index 84e300c..bd8e87f 100644
--- a/src/main/java/org/libvirt/Stream.java
+++ b/src/main/java/org/libvirt/Stream.java
@@ -100,10 +100,10 @@ public class Stream {
     }
 
     /**
-     * Receieves data from teh stream into the buffer provided.
+     * Receives data from the stream into the buffer provided.
      *
      * @param data
-     *            the put the sata into
+     *            buffer to put the data into
      * @return the number of bytes read, -1 on error, -2 if the buffer is empty
      * @throws LibvirtException
      */
-- 
1.8.5.2.msysgit.0




More information about the libvir-list mailing list