~ubuntu-branches/debian/jessie/resource-agents/jessie

« back to all changes in this revision

Viewing changes to doc/ra2refentry.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2011-06-21 13:45:36 UTC
  • Revision ID: james.westby@ubuntu.com-20110621134536-155vq8sf8p2p18wt
Tags: upstream-3.9.1
ImportĀ upstreamĀ versionĀ 3.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
  <xsl:template match="content" mode="parameters">
227
227
    <xsl:if test="@type != '' or @default != ''">
228
228
      <xsl:text> (</xsl:text>
 
229
      <xsl:if test="../@unique = 1">
 
230
        <xsl:text>unique, </xsl:text>
 
231
      </xsl:if>
229
232
      <xsl:choose>
230
233
        <xsl:when test="../@required = 1">
231
234
          <xsl:text>required</xsl:text>
365
368
        <xsl:text> shell:</xsl:text>
366
369
      </para>
367
370
      <programlisting>
368
 
        <xsl:text>primitive example_</xsl:text>
 
371
        <xsl:text>primitive p_</xsl:text>
369
372
        <xsl:value-of select="@name"/>
370
373
        <xsl:text> </xsl:text>
371
374
        <xsl:value-of select="$class"/>
372
375
        <xsl:text>:</xsl:text>
373
376
        <xsl:value-of select="$provider"/>
374
377
        <xsl:text>:</xsl:text>
375
 
        <xsl:value-of select="@name"/>
376
 
        <xsl:text> \
377
 
</xsl:text>
378
 
        <xsl:if test="parameters/parameter[@required = 1]">
379
 
          <xsl:text>  params \
380
 
</xsl:text>
381
 
          <xsl:apply-templates select="parameters" mode="example"/>
382
 
        </xsl:if>
 
378
        <xsl:choose>
 
379
          <xsl:when test="parameters/parameter[@required = 1]">
 
380
            <xsl:value-of select="@name"/>
 
381
            <xsl:text> \
 
382
  params \
 
383
</xsl:text>
 
384
            <xsl:apply-templates select="parameters" mode="example"/>
 
385
          </xsl:when>
 
386
          <xsl:otherwise>
 
387
          <xsl:value-of select="@name"/><xsl:text> \</xsl:text>
 
388
          </xsl:otherwise>
 
389
        </xsl:choose>
383
390
        <!-- Insert a suggested allow-migrate meta attribute if the
384
391
             resource agent supports migration -->
385
392
        <xsl:if test="actions/action/@name = 'migrate_from' or actions/action/@name = 'migrate_to'">
388
395
        </xsl:if>
389
396
        <xsl:apply-templates select="actions" mode="example"/>
390
397
      </programlisting>
 
398
      <!-- Insert a master/slave set definition if the resource
 
399
      agent supports promotion and demotion -->
 
400
      <xsl:if test="actions/action/@name = 'promote' and actions/action/@name = 'demote'">
 
401
        <programlisting>
 
402
          <xsl:text>ms ms_</xsl:text>
 
403
          <xsl:value-of select="@name"/>
 
404
          <xsl:text> p_</xsl:text>
 
405
          <xsl:value-of select="@name"/>
 
406
        <xsl:text> \
 
407
  meta notify="true" interleave="true"</xsl:text>
 
408
        </programlisting>
 
409
      </xsl:if>
391
410
    </refsection>
392
411
  </xsl:template>
393
412
 
431
450
    <xsl:value-of select="@name"/>
432
451
    <xsl:text> </xsl:text>
433
452
    <xsl:apply-templates select="@*" mode="example"/>
 
453
    <xsl:if test="following-sibling::action/@name = 'monitor'">
 
454
      <xsl:text>\</xsl:text>
 
455
    </xsl:if>
434
456
  </xsl:template>
435
457
 
436
458
  <xsl:template match="action/@*" mode="example">