[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 01/10] linkstate: XML for modification of interface's link state.



Adds a optional element to XML definition of domains for
modification of link state of network interfaces.
---
 docs/formatdomain.html.in |   21 +++++++++++++++++++++
 docs/schemas/domain.rng   |   11 +++++++++++
 2 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 7d2ba8a..dc4cecb 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1997,6 +1997,27 @@ qemu-kvm -net nic,model=? /dev/null
       <span class="since">Since 0.9.4</span>
     </p>

+    <h5><a name="elementLink">Modyfing virtual link state</a></h5>
+<pre>
+  ...
+  &lt;devices&gt;
+    &lt;interface type='network'&gt;
+      &lt;source network='default'/&gt;
+      &lt;target dev='vnet0'/&gt;
+      <b>&lt;link state='down'/&gt;</b>
+    &lt;/interface&gt;
+  &lt;devices&gt;
+  ...</pre>
+
+    <p>
+      This element provides means of setting state of the virtual network link.
+      Possible values for atrribute <code>state</code> are <code>up</code> and
+      <code>down</code>. If <code>down</code> is specified as the value, the interface
+      behaves as if it had the network cable disconnected. Default behaviour, if this
+      element is unspecified is to have the link state <code>up</code>.
+      <span class="since">Since 0.9.5</span>
+    </p>
+
     <h4><a name="elementsInput">Input devices</a></h4>

     <p>
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 6ccbeed..a4282eb 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -1192,6 +1192,17 @@
       <optional>
         <ref name="bandwidth"/>
       </optional>
+      <optional>
+        <element name="link">
+          <attribute name="state">
+            <choice>
+              <value>up</value>
+              <value>down</value>
+            </choice>
+          </attribute>
+          <empty/>
+        </element>
+      </optional>
     </interleave>
   </define>
   <!--
-- 
1.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]