]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add <usage> to <secret> docs
authorMiloslav Trmač <mitr@redhat.com>
Tue, 1 Sep 2009 17:25:11 +0000 (19:25 +0200)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 10 Sep 2009 14:30:47 +0000 (15:30 +0100)
* docs/formatsecret.html.in, docs/formatsecret.html: Document <usage
  type='volume'>, replacing stand-alone <volume>.
* docs/schemas/secret.rng: Update schema to require <usage
  type='volume'>

docs/formatsecret.html
docs/formatsecret.html.in
docs/schemas/secret.rng

index 929eb86e542f053dab3c10b9b34632edaaed576b..5fd62227b704d2fbe180d174f8fa7d3eb3b3e191 100644 (file)
         An unique identifier for this secret (not necessarily in the UUID
         format).  If omitted when defining a new secret, a random UUID is
         generated.
-      </dd><dt><code>volume</code></dt><dd>Key of a volume this secret is associated with.  It is safe to delete
-        the secret after the volume is deleted.
       </dd><dt><code>description</code></dt><dd>A human-readable description of the purpose of the secret.
+      </dd><dt><code>usage</code></dt><dd>
+       Specifies what this secret is used for.  A mandatory
+       <code>type</code> attribute specifies the usage category, currently
+       only <code>volume</code> is defined.  Specific usage categories are
+       described below.
       </dd></dl>
+        <h3>Usage type "volume"</h3>
+        <p>
+      This secret is associated with a volume, and it is safe to delete the
+      secret after the volume is deleted.  The <code>&lt;usage
+      type='volume'&gt;</code> element must contain a
+      single <code>volume</code> element that specifies the key of the volume
+      this secret is associated with.
+    </p>
         <h2>
           <a name="example" id="example">Example</a>
         </h2>
         <pre>
       &lt;secret ephemeral='no' private='yes'&gt;
-         &lt;volume&gt;/var/lib/libvirt/images/mail.img&lt;/volume&gt;
          &lt;description&gt;LUKS passphrase for the main hard drive of our mail server&lt;/description&gt;
+         &lt;usage type='volume'&gt;
+            &lt;volume&gt;/var/lib/libvirt/images/mail.img&lt;/volume&gt;
+         &lt;/usage&gt;
       &lt;/secret&gt;</pre>
       </div>
     </div>
index 7471bf72070f33008ff62bd834ec9b43986bacd5..72022cb6430c61fd1fe51864f7ff06cca902fa43 100644 (file)
         format).  If omitted when defining a new secret, a random UUID is
         generated.
       </dd>
-      <dt><code>volume</code></dt>
-      <dd>Key of a volume this secret is associated with.  It is safe to delete
-        the secret after the volume is deleted.
-      </dd>
       <dt><code>description</code></dt>
       <dd>A human-readable description of the purpose of the secret.
       </dd>
+      <dt><code>usage</code></dt>
+      <dd>
+       Specifies what this secret is used for.  A mandatory
+       <code>type</code> attribute specifies the usage category, currently
+       only <code>volume</code> is defined.  Specific usage categories are
+       described below.
+      </dd>
     </dl>
 
+    <h3>Usage type "volume"</h3>
+
+    <p>
+      This secret is associated with a volume, and it is safe to delete the
+      secret after the volume is deleted.  The <code>&lt;usage
+      type='volume'&gt;</code> element must contain a
+      single <code>volume</code> element that specifies the key of the volume
+      this secret is associated with.
+    </p>
+
     <h2><a name="example">Example</a></h2>
 
     <pre>
       &lt;secret ephemeral='no' private='yes'&gt;
-         &lt;volume&gt;/var/lib/libvirt/images/mail.img&lt;/volume&gt;
          &lt;description&gt;LUKS passphrase for the main hard drive of our mail server&lt;/description&gt;
+         &lt;usage type='volume'&gt;
+            &lt;volume&gt;/var/lib/libvirt/images/mail.img&lt;/volume&gt;
+         &lt;/usage&gt;
       &lt;/secret&gt;</pre>
   </body>
 </html>
index 05e04f21c45dbfa52fdd2d989a1f2bc2e0fa623f..8cfbd8f00e7c9b01833d77d883b9cb66cc0fcbcf 100644 (file)
          </element>
        </optional>
        <optional>
-         <element name='volume'>
+         <element name='usage'>
+           <choice>
+             <ref name='usagevolume'>
+           </choice>
            <text/>
          </element>
        </optional>
       </interleave>
     </element>
   </define>
+
+  <define name='usagevolume'>
+    <attribute name='type'>
+      <value>volume</value>
+    </attribute>
+    <element name='volume'>
+      <text/>
+    </element>
+  </define>
 </grammar>