N1 Grid Service Provisioning System 5.0 XML Schema Reference Guide

Chapter 2 Shared Schema Used by Components and Simple Plans

This chapter describes these shared entities that can be used by both simple plans and components:

Unless indicated, attributes described in this chapter cannot reference component-scoped substitution variables.

Shared Steps

This section lists steps that can be used in either a component or a simple plan.

<call> Step

Use the <call> step to execute a control block associated with a component installed on the target host.

The <call> step has the following child elements:

Attributes for the <call> Step

The <call> element has one required attribute of type entityName, blockName, which is the name of the control block to execute on the installed component.

<argList> Element

The <argList> element is a child of the <call>, <install>, <uninstall>, <execSubplan>, and <addSnapshot> steps. This element specifies a list of variables to be passed as arguments to the called service.

The called service declares the variables that it expects by using a <paramList> element. The variables within the <argList> and the called <paramList> need not be the same. However, for each variable in the called <paramList> that does not have a default value, a variable with the same name must be present in the <argList>, or a preflight error is raised at plan runtime. For each variable in the called <paramList> for which there is a corresponding variable in the <argList>, the value of the variable in <paramList> will obtain the value of the corresponding variable in <argList> for the duration of the execution of the called service.

Variables in <argList> that do not correspond to a variable in the called <paramList> are silently ignored. Thus, services can be redefined with additional parameters, while still ensuring backward compatibility. So, one plan could call both old and new versions of the service.

The arguments of the <argList> element are expressed as attributes. The order in which the attributes appear is not significant. The following <argList> declares two arguments, password and path:


<argList password=":[password]" path="/tmp"/>

Attributes for the <argList> Element

The <argList> element must have at least one attribute. Each attribute is treated as a named variable to be passed to the called service. The name of each attribute must be an identifier without substitution variable references. The attribute name should correspond to the name of a parameter in the called service. The value of each attribute is an arbitrary string that can include references to variables in the enclosing scope, but not other arguments within the <argList>.

<checkDependency> Step

Use the <checkDependency> step to verify that a particular component has been installed on the target host. If an appropriate component has not been installed, the step fails and execution stops.

The dependency is checked by using the contained component targeter. If the targeter successfully resolves a component, the dependency is satisfied. Otherwise, the dependency is failed.

The <checkDependency> step has one required child element, an installed component targeter, which identifies the component to check for dependency. See Installed Component Targeters.

<execJava> Step

This step executes a JavaTM Executor instance on the target host. If the executor instance raises an exception, the step fails and execution stops.

The <execJava> step has one optional child element, <argList>, which is a list of arguments to pass to the Executor instance. If you specify this element, it can only appear one time.

Attributes for the <execJava> Step

The <execJava> element has the following attributes:

When an <execJava> step is contained within a component, the step typically calls classes that are contained within one or more resources that are deployed by that component. When the step is contained within a plan, the classes called are already resident on the agent, either as a system class of the agent itself or as a resource that was deployed with an existing component.

<execNative> Step

The <execNative> step executes a command native to the operating system on the target host. If the command produces an unexpected result, the step fails and execution stops.

The <execNative< step has the following child elements:

Attributes for the <execNative> Step

The <execNative> step has the following attributes:

<env> Element

The <execNative> element can optionally have <env> elements to specify environment variables for the command. You can use <env> to supply new variables for the command's environment or to override existing variables.

The set of the command's environment variables is a union of the set of the remote agent's environment variables and the variables supplied by using the <env> elements.

Attributes for the <env> Element

The <env> element has the following attributes. They can reference simple substitution variables.

<background> Element

The <background> element is a child of the <execNative> element. When present, this element specifies that the command should be executed as a background process. This element has no attributes or child elements.

An <execNative> with a <background> element has the following constraints:

<outputFile> Element

The <outputFile> element is a child of the <execNative> element. The <outputFile> element specifies the path to a local file on the agent in which to store the standard output of the command that is being executed. Specify the path to the local file by using the <outputFile> name attribute. Relative paths are interpreted as being relative to the command's working directory.

You must specify the <outputFile> element if you specify the <background> element.

If <outputFile> is not specified and the <successCriteria> element does not specify outputMatches, the command output is not stored and will be lost. If outputMatches is specified, the standard output is stored in a temporary file that is deleted after the command finishes executing.

Attributes for the <outputFile> Element

The <outputFile> element has one required attribute, name, which is the name of the file to which the standard output of the command is written. This value should be a nonempty string. This attribute can reference simple substitution variables.

<errorFile> Element

The <errorFile> element specifies the path to a local file on the agent in which to store the error output of the command that is being executed. The path to the local file is specified by using the <errorFile> name attribute. Relative paths are interpreted as being relative to the command's working directory.

You must specify the <errorFile> element if you specify the <background> element.

If <errorFile> is not specified and the <successCriteria> element does not specify errorMatches, the command output is not stored and will be lost. If errorMatches is specified, the error output is stored in a temporary file that is deleted after the command finishes executing.

Attributes for the <errorFile> Element

The <errorFile> element has one required attribute, name, which is the name of the file to which the standard error output of the command is written. This value should be a nonempty string. This attribute can reference simple substitution variables.

<inputText> Element

The <inputText> element is a child element of the <execNative> element. This child element specifies the arbitrary text that should be used as standard input to the command. The text is specified as the contents of this element.


<execNative>
    <inputText>
        ls -l | fgrep `*test*' | sort -u > file.out
    </inputText>
    <command exec=”sh”/>
</execNative>

The body of the <inputText> element can be enclosed in a CDATA section to preserve the formatting of the input and to avoid parsing errors that might be caused by input that contains the & and < characters.

If the <inputText> is specified, it is always enclosed within a CDATA section when generating XML for the <execNative> step. All of the characters within <inputText> are passed as standard input to the command that is being executed. If <inputText> contains only white spaces, those white spaces are passed, exactly as specified, to the command that is being executed.

The contents of <inputText> are config-generated.

The <inputText> element has no attributes.

<inputFile> Element

The <inputFile> element is a child element of <execNative>. This child element specifies the path to a local file on the remote agent whose contents are used as standard input to the command being executed. The path to the local file is specified by using the <inputFile> name attribute.


Note –

The <inputFile> element cannot be used with the <inputText> element in an <execNative> command.


Attributes for the <inputFile> Element

The <inputFile> element as one required attribute, name, which is the file to act as standard input to the command. This value should be a nonempty string. If a relative path is specified, it is relative to the command's working directory. This attribute can reference simple substitution variables.

<exec> Element

An <execNative> step can contain only one <exec> element. The <exec> element specifies the details of the native command to be executed.

The <exec> element contains the following attributes:

<execNative> executes the command specified by cmd with the arguments in the order in which they are specified.

For example, the following <execNative> step executes the ps -fu sps command:


<execNative>
    <exec cmd=”ps”>
        <arg value=”-fu”/>
        <arg value=”sps”/>
    </exec>
</execNative>

The <exec> element has an optional child element, <arg>. Specify one <arg> element for each argument to the command that you want to execute.

The <arg> element has one required attribute, value, which is the argument value. This argument is supplied as the nth argument to the command, where <arg> is the nth child of the command element. This attribute can reference simple substitution variables.

Attributes for the <exec> Element

The <exec> element has one required attribute, cmd, which is the path of the command to execute. If the specified path is not absolute, the command is found by using the platform-specified PATH environment variable set for the remote agent. This value should be a nonempty string. This attribute can reference simple substitution variables.

<shell> Element

The <shell> element is a child element of <execNative>. The contents of the <shell> element specifies the command to be executed. The command to be executed is interpreted using an interpreter, which is specified by the cmd attribute. The command is executed by using sh -c “command” syntax for the platform. In this form, the cmd attribute must be specified to indicate the shell command to use to execute the command.

For example:


<execNative>
    <shell cmd=”/usr/bin/bash -c”>
        ls -l | fgrep `*test*' | sort -u > file.out
    </shell>
</execNative>

The previous <execNative> example executes the following command:


/usr/bin/bash -c `ls -l | fgrep `*test*' | sort -u > file.out'

To preserve formatting and to avoid XML parsing problems, the text contents of the command is always enclosed within a CDATA element when the XML representation is generated from the <execNative> step.

A command string cannot be empty or contain only white space characters. The command string is supplied exactly as it is specified, including surrounding white space, to the shell.

The contents of the <shell> element are config-generated.

Attributes for the <shell> Element

The <shell> element has one required attribute, cmd, which is the shell command in the sh -c syntax. The string should not contain any embedded quote characters. The string is parsed to retrieve the shell name and the arguments by using white space as delimiters. For example, /usr/bin/bash -c should be a nonempty string. This attribute can reference simple substitution variables.

<successCriteria> Element

The <successCriteria> element is a child element of <execNative>. This child element specifies the criteria to be used to evaluate whether an <execNative> step executed successfully. If this element is not specified, the default value is <successCriteria status=”0”/>.

If the specified <successCriteria> is empty, it is ignored.

If you specify <successCriteria/>, the step always succeeds no matter what output or exit code the command generated.

Attributes for the <successCriteria> Element

The <successCriteria> element has the following optional attributes. If more than one of the status, outputMatches, and errorMatches attributes are specified, they are ANDed together.

<if> Step

This step is used to conditionally execute a block of steps. This step has no attributes. Its child elements are <condition>, <then>, and <else>. The <condition> and <then> elements must appear one time. If you specify the <else> element, it can only appear one time.

If the contents of the <condition> element evaluates to true, the steps of the <then> block are executed. Otherwise, the steps of the <else> block are executed, if present.


Example 2–1 Using the <if> Step

The following example shows an <if> step that is used to conditionally restart.


<if>
    <condition><istrue value=":[restart]"/></condition>
    <then>
        <call blockName="restart"/>
    </then>
</if>

<condition> Element

The <condition> element is a child of the <if> step and specifies a Boolean expression. This element has no attributes and must contain exactly one Boolean operator child element. See Boolean Operators.

<then> Element

The <then> element is a child element of the <if> step. This element specifies the steps to execute if the associated condition is true. The <then> element can contain any number of steps that are permitted within the scope of the block that contains the <if> step.

<else> Element

The <else> element is a child element of the <if> step. This element specifies the steps to execute if the associated condition is not true. The <else> element can contain any number of steps that are permitted within the scope of the block that contains the <if> step.

<pause> Step

The <pause> step pauses the execution of a plan for a specified amount of time. You can use <pause> to make a plan wait for required services to come online after being started.

Attributes for the <pause> Step

The <pause> element has one required attribute of type positiveInteger, delaySecs, which is the number of seconds to wait.

<processTest> Step

The <processTest> step is used to verify that a particular process is running on the target host. If the specified process does not exist, the step fails and execution stops.


Note –

This step only applies to UNIX® systems.


Attributes for the <processTest> Step

The <processTest> step has the following attributes:

<raise> Step

The <raise> step is a step that always fails, though it can be caught and handled by a <try> step. This step has a single attribute, message, and has no child elements.

The <raise> step is used to indicate a failure condition without having to construct an artificial step to do so. This step most often appears within a <catch> block to propagate an error condition after cleaning up.

Attributes for the <raise> Step

The <raise> element has one optional attribute, message, which is a message that describes the error condition. By default, the message is a generic system-specified message. This attribute can reference simple substitution variables.


Example 2–2 Using the <raise> Step

The following example shows how the <raise> step is used to repropagate an error condition from within a <catch> block, after noting the error in a log.


<control blockName="default">
    <try>
        <block>
            <!-- some arbitrary processing here -->
        </block>
        <catch>
            <!-- note error in log -->
            <execNative>
                <exec cmd="appendLog">
                    <arg value="an error occurred"/>
                </exec>
            </execNative>
            <!-- rethrow error -->
            <raise/>
        </catch>
    </try>
</control>

MS Windows: <reboot> Step

This step causes the agent to reboot before running the rest of the plan. You can only use this step on Microsoft Windows (MS Windows) based systems. If encountered on a system other than MS Windows, an error is issued. If you reboot an agent that resides on the same host as the master server, an error is issued. These errors are preflight errors.

MS Windows: Attributes for the <reboot> Step

The <reboot> step has one optional attribute of type positiveInteger, timeout, which is the maximum number of seconds to wait for the server to reboot. If this attribute is omitted, the plan's <execNative> timeout period applies.

<retarget> Step

This step changes the execution target for a set of steps. Retarget steps can be nested.

The <retarget> step has the following child elements:

Attributes for the <retarget> Step

The <retarget> step has a required attribute, host, which is the host on which the contained steps should be executed. This attribute can reference simple substitution variables.

This attribute is used by the <retarget> step, as well as by various component targeter elements. Its value is the name of a host, which can include substitution variable references. The value can also include the symbolic name / to reference the root physical host of the current execution target, or ..(/..)* to reference a parent host of the current execution target.


Note –

When a host attribute is specified within a component targeter, it is semantically equivalent to enclosing the containing step in a <retarget> step.


<retarget> Step Execution Semantics

When a <retarget> step is encountered, the host attribute is first evaluated in the context of the current host of the caller.

If the value of the host attribute is different from the name of the current host, the provisioning software takes the following steps:

  1. Resolves the host name to an actual host. If no such host exists, an error is issued.

  2. Verifies that the current user has “execute” permission on the given host for the plan's folder or for the component that contains this step. If not, an error is issued.

  3. Verifies that the following conditions are met for the root physical host of the host:

    • It contains a remote agent.

    • You can connect to it.

    • It is updated and prepared.

    If these conditions are not met, an error is issued.

  4. Obtains a lock on the host, while retaining locks on all previously visited hosts. If the current execution thread already locks the host, this operation is effectively a no-op. If the host is already locked by another execution thread, this operation blocks until the host is unlocked. If the request for a lock would result in a deadlock, an error is issued.

  5. Resets the host to become the new “current” host. The “physical” host is reset based on the new “current” host. The “initial” host does not change.

After the previous steps complete, variables of the <varList> element are evaluated in the context of the new current host. Local variables can hide variables of enclosing scopes. Then, each of the steps is executed in the context of the new current host.

Finally, if the retarget operation changed the current host, it is unlocked, as appropriate, and the current host is reset to the current host of the caller. If the host was locked previously in the current execution thread, it remains locked until the block that first acquired the lock completes.

You can use an empty <retarget> block to prevalidate that the current user has the appropriate permissions and that the host is properly prepared.


Example 2–3 Using the <retarget> Step

This example shows a “restart” control service that you might find on a WebLogic managed server. This control service is implemented by calling a control on the administrative server to stop the managed server. Then it makes a call on the local server to start the server.

The adminHostName variable is evaluated on the current host of the caller, which is assumed to be the virtual host that contains the managed server. The domainName variable is evaluated on the retargeted host, which is assumed to be the virtual host that contains the administrative server. The ADMIN_SERVER component is also resolved on the retargeted host.


<control name="restart">
    <varList>
        <var name="adminHostName" default=":[target:adminHostName]"/>
    </varList>
    <retarget host=":[adminHostName]">
        <varList>
            <var name="domainName" default=":[target:domainName]"/>
        </varList>
        <call blockName="stopServer">
            <argList serverName=":[serverName]"
	      domainName=":[domainName]"/>
            <installedComponent name="ADMIN_SERVER"/>
        </call>
    </retarget>
    <call blockName="start"/>
</control>

<sendCustomEvent> Step

The <sendCustomEvent> step is used to generate a custom event with a particular message. This step can be used in conjunction with the notification rules module to send an email any time this step is encountered on a particular host.

Attributes for the <sendCustomEvent> Step

The <sendCustomEvent> step has one required attribute, message, which is the message to include as the event text. This attribute can reference simple substitution variables.

<transform> Step

The <transform> step is used to perform a text-based transformation on a file on the target host. Currently, Perl-type and XSLT-based transformations are supported.

The <transform> child elements specify the transformation to be applied to the input file. The child elements can be any one of the following elements:

Attributes for the <transform> Step

The <transform> step has the following attributes:

The input and output attributes can reference the same or distinct files. The value of these attributes is a generalized path that can include zip archives or zip derivatives, such as JAR, as directory elements. For example, a path might be webapp/myapp.jar/config.xml.

<stylesheet> Element

The <stylesheet> element is a child of the <transform> step and specifies an XSLT transformation to apply to the input source. At most one <stylesheet> element can appear as a child of a particular <transform> element. You cannot use the <stylesheet> element in conjunction with other child elements.

The <stylesheet> element is an XSLT Version 1.0 element as defined by the http://www.w3.org/1999/XSL/Transform name space. For more information, see Version 1.0 of the XSL Transformations (XSLT) specification at http://www.w3.org/TR/xslt.html. Only the XSLT <stylesheet> element is accepted as a child of the <transform> element. In particular, neither the XSLT synonym <transform> nor the simplified XSLT transform syntax described in Section 2.3 of the XSLT specification is supported as a child of the <transform> element.

The <stylesheet> element body can include substitution variable references if the body is still a valid XSLT without first undergoing variable substitution.

When a <stylesheet> element is used as a transformation, the input file must be written in XML. For more information, see Version 1.0 of the XSL Transformations (XSLT) specification.


Example 2–4 Using the <stylesheet> Element


<transform output="/etc/hosts">
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="/">
            <xsl:for-each select="a">
                <xsl:value-of select="b"/>
            </xsl:for-each>
        </xsl:template>
    </xsl:stylesheet>
</transform>

<subst> Element

The <subst> element is a child of the <transform> step. This element specifies a Perl-like substitution pattern to apply as a transformation. One or more <subst> elements can appear as children of the <transform> element, but they cannot be used in conjunction with other child elements. When more than one <subst> element appears, they are applied sequentially.

All occurrences of the pattern in the input file are replaced, including multiple occurrences within a line.

For information about the supported syntax, see Java documentation (class java.util.regex.Pattern).

Attributes for the <subst> Element

The <subst> element has the following attributes:


Example 2–5 Using the <subst> Element

The following transformation converts all occurrences of the string 127.0.0.xxx to 10.10.0.xxx in the /etc/hosts file:


<transform output=”/etc/hosts”>
    <subst match="127\.0\.0\.(\d+)"
    replace="10.10.0.$1"/>
</transform>

<source> Element

The <source> element is a child of the <transform> step. This element specifies an external file on the target host that contains the transformation to be applied to the input file. At most one <source> element can appear as a child of a particular <transform> element. You cannot use the <source> element in conjunction with other child elements.

Configuration generation is not performed on the specified source file as part of the <transform> step. However, the specified source file can be a config-type resource file that is deployed as part of a component installation. In such as case, substitution variables that are contained in the source file would have been substituted when the file was deployed.

Attributes for the <source> Element

The <source> element has the following attributes:

<try> Step

The <try> step is used to specify typical error handling and cleanup logic for a block of steps. This step has no attributes. This step has these child elements: <block>, <catch>, and <finally>.

The <try> step is executed as follows:

The <catch> element is used to suppress and recover from errors that are encountered in the <block> element. The <finally> element is used to unconditionally perform some cleanup, regardless of whether typical errors were encountered.

The <try> step either succeeds or fails as follows:

Failures in the <block> element are suppressed by the presence of a <catch> element.

The <try> step has the following child elements:

<block> Element

The <block> element is a child element of the <try> step. This element specifies the primary steps that are executed by the <try> step. The <block> element contains one or more steps that are permitted within the scope of the block that contains the <try> step.

<catch> Element

The <catch> element is a child element of the <try> step. This element specifies the steps to execute if a typical error occurs while executing the steps of the <block> element. The <catch> element can contain any number of steps that are permitted within the scope of the block that contains the <try> step.

The <catch> element serves both to suppress typical errors of the <block> element and to define typical error recovery actions. This element can be empty, in which case <catch> only suppresses typical errors.

<finally> Element

A child element of the <try> step. <finally> specifies the steps to execute regardless of whether a typical error occurred earlier within the <try> or <catch> steps. An atypical error can be a plan abort or a plan timeout, in which case the steps of the <finally> element are skipped. <finally> can contain any number of steps that are permitted within the scope of the block that contains the <try> step.

The <finally> element is used primarily to specify cleanup steps that should always be run regardless of an error. To run cleanup steps in response to an error, put them in the <catch> element instead.


Example 2–6 Using the <try> Step

In this example, the component installation consists of resource deployment followed by a restart. In this case, the component is considered to be installed after its resources are deployed, and a failure during restart should not affect its installed state. Typical errors can be suppressed during the restart as follows:


<installSteps blockName="default">
    <deployResource/>
    <try>
        <block>
            <call blockName="restart"><thisComponent/></call>
        </block>
        <catch/><!-- suppress all typical errors -->  
    </try>
</installSteps>

You can use <try> blocks to model intelligent auto-upgrades. Version 1.1 of a component has two different installation routines. One performs a fresh installation of the component. The other performs an upgrade installation if Version 1.0 of that component was previously installed. You can model this situation in a single installation block, as follows:


<installSteps blockName="default">
    <try>
        <block>
          <checkDependency>
              <installedComponent name="foo" version="1.0"/>
          </checkDependency>
          <!-- 1.0 installation exists, do upgrade -->
        </block>
        <catch>
          <!-- 1.0 installation doesn't exist, do fresh installation -->
        </catch>
    </try>
</installSteps>

The <finally> block is most often used to clean up temporary resources. The following example creates a temporary file, processes it, and then removes it.


<control blockName="default">
    <varList>
        <var name="file" default="/tmp/file.txt"/>
    </varList>
    <execNative outputFile=":[file]">
        <exec cmd="ls"><arg value="-l"/></exec>
    </execNative>
    <try>
        <block>
            <!-- process file in some way -->
        </block>
        <finally>
            <execNative>
                <exec cmd="rm"><arg value=":[file]"/></exec>
            </execNative>
        </finally>
    </try>
</control>

<urlTest> Step

This step is used to verify that the contents of a particular URL match an expected pattern. If the desired pattern is not matched, the step fails and execution stops.

Attributes for the <urlTest> Step

The <urlTest> step has the following attributes:

Installed Component Targeters

This section describes the elements that identify an installed component as the target of the containing step (for example, control service call). All targeters cannot be used with all targeted steps. Each targeter specifies the steps with which it can be used.

<installedComponent> Installed Component Targeter

The <installedComponent> element identifies a particular installed component that is assumed to be installed on the target host.

This element can be used as a targeter for the <checkDependency>, <createDependency>, <call>, <uninstall>, and <addSnapshot> steps.

This targeter matches the specified component directly and cannot be used to match derived instances of that component. Use the <systemType> targeter to target components that are derived from a particular type.

Attributes for the <installedComponent> Targeter

This targeter has the following attributes:

<systemService> Installed Component Targeter

The <systemService> element identifies a particular system service component that is assumed to be installed on the current physical host. If the system service is defined by a plug-in, the service name should be prefixed with the plug-in name, such as pluginName#serviceName.

This element can be used as a targeter for the <checkDependency>, <createDependency>, <call>, <uninstall>, and <addSnapshot> steps.

Use of the <systemService> targeter implicitly retargets to the root physical host of the current host. If you need to target a system service on a different host, a <retarget> step must be used. You cannot otherwise specify a new host within the <systemService> targeter.

Attributes for the <systemService> Targeter

The <systemService> targeter has one required attribute of type systemName, name, which is the name of the system service component. If the system service is defined by a plug-in, the system service name should be prefixed with the plug-in name, such as pluginName#serviceName.

<systemType> Installed Component Targeter

The <systemType> element identifies a component that is an instance of a particular type that is assumed to be installed on the target host. If more than one installed component matches the specified criteria, the component that was most recently installed is used.

The <systemType> element can be used as a targeter for the <checkDependency>, <createDependency>, <call>, <uninstall>, and <addSnapshot> steps.

Attributes for the <systemType> Targeter

The <systemType> targeter has the following attributes:

<thisComponent> Installed Component Targeter

The <thisComponent> element specifies that the component that contains the step should be used as target of the step. Only steps that are contained in a component can use this targeter. This element has no attributes.

The <thisComponent> element can be used as a targeter for the <call>, <uninstall>, and <addSnapshot> steps.

If the steps listed do not contain a component targeter element, <thisComponent> is assumed by default.

<superComponent> Installed Component Targeter

The <superComponent> element specifies that the base component of the component that contains the step should be used as target of the step. Only steps that are contained in a derived component can use this targeter.

The <superComponent> element can be used as a targeter for the <call>, <uninstall>, and <addSnapshot> steps. This element has no attributes.

This targeter always binds to the base component's definition of the step in question, even if the derived component overrides it.

<nestedRef> Installed Component Targeter

The <nestedRef> element identifies a nested component reference declared or inherited by the current composite component. Only steps that are in a composite component can use this targeter.

The <nestedRef> element can be used as a targeter for the <checkDependency>, <call>, <uninstall>, and <addSnapshot> steps.

The specified component reference is assumed to already be installed by the calling component. Otherwise, an error is issued. If the nested component reference was installed on a host other than the current target host, use of the <nestedRef> targeter implicitly retargets the associated step to that host.

Attributes for the <nestedRef> Targeter

The <nestedRef> targeter has one required attribute of type identifier, name, which is the name of a nested component reference in this component.

<allNestedRefs> Installed Component Targeter

The <allNestedRefs> element identifies the set of all nested component references that are declared or inherited by the current composite component. Only steps within composite components can use this targeter.

This element can be used as a targeter for the <call>, <uninstall>, and <addSnapshot> steps.

This targeter can identify any number of components. If it identifies no components, the step is a no-op. If it identifies more than one component, the step is semantically expanded as if a separate occurrence of the step that uses the <nestedRef> targeter exists for each of the identified components. The steps are executed serially rather than in parallel. The ordering of the steps varies based on the step type. If the execution of the step on one of the components causes an error, the step is not executed on the remaining matching components.

When used as a targeter for a <call> or <addSnapshot> step, this targeter matches all of the nested component references that are currently installed by this component. The component matches are in the order of installation.

When used as a targeter for an <uninstall> step, the targeter matches all of the nested component references that are currently installed by this component. The component matches are in the reverse order of installation.

<toplevelRef> Installed Component Targeter

The <toplevelRef> element identifies a top-level component reference that is declared or inherited by the current composite component. Only steps that are in composite components can use this targeter.

The <toplevelRef> element can be used as a targeter for the <checkDependency>, <createDependency>, <call>, <uninstall>, and <addSnapshot> steps.

This targeter is semantically equivalent to the <installedComponent> targeter, except that the name, path, and version attributes are predefined based on the referenced component. See <installedComponent> Installed Component Targeter.

Attributes for the <toplevelRef> Targeter

The <toplevelRef> targeter has the following attributes:

<dependee> Installed Component Targeter

The <dependee> element identifies an installed component on which the calling component has a declared dependency that was created by <createDependency>. Only steps that are in components can use this targeter.

The <dependee> element can be used as a targeter for the <call>, <uninstall>, and <addSnapshot> steps.

Attributes for the <dependee> Targeter

The <dependee> targeter has one required attribute of type identifier, name, which is the name of a dependency that is created by this component.

<allDependants> Installed Component Targeter

The <allDependants> element identifies the set of installed components that have a declared dependency on the calling component, which was created by <createDependency>. Only steps in components can use this targeter.

The <allDependants> element can be used as a targeter for the <call>, <uninstall>, and <addSnapshot> steps.

This targeter functions similarly to the <addNestedRefs> targeter in that it causes the containing step to be mapped over all of the matching components. The order of the mapping over the dependent components is unspecified.

Attributes for the <allDependants> Targeter

The <allDependants> targeter has one required attribute of type identifier, name, which is the name of a dependency that is created on this component by other components.

<targetableComponent> Installed Component Targeter

The <targetableComponent> element identifies a targetable component that is associated with a particular component targeting host.

The <targetableComponent> element can be used as a targeter for the <call>, <uninstall>, <checkDependency>, <createDependency>, and <addSnapshot> steps.

Attributes for the <targetableComponent> Targeter

The <targetableComponent> targeter has one optional attribute, name, which is the name of a component targeting host. If this attribute is omitted, the value is the current target host. This attribute can reference simple substitution variables.

Universal Install Path Format

You can specify an install path within an installed component reference. In these cases, the installPath attribute value is converted to universal format before the installed component reference is resolved. This conversion occurs because the install path of the installed component is also stored in universal format.

In universal format, all occurrences of the path separator in the install path are replaced by a slash (/). The path separator is specific to the operating system that is running on the master server. Trailing slashes are dropped. The root install path (/) is not converted to the empty path.

When the Master Server application is running on UNIX based systems, trailing slashes are ignored. Thus, both /opt/apache/ and /opt/apache can be used to refer to the component that is installed in the /opt/apache directory.

Repository Component Targeters

This section describes elements that identify a particular component that resides in the master server repository as the target of the containing step, such as install. All targeters cannot be used with all targeted steps. Each targeter specifies the steps with which it can be used.

<component> Repository Component Targeter

The <component> element identifies a particular component that is assumed to exist in the component repository. Only steps that are contained in a simple plan can use this targeter.

This element can be used as a targeter for the <install> step.

Attributes for the <component> Targeter

The <component> targeter has the following attributes:

<thisComponent> Repository Component Targeter

The <thisComponent> element specifies that the component that contains the step should be used as the target of the step. Only steps that are contained in a component can use this targeter. This element has no attributes.

This element can be used as a targeter for the <install> step.

If the steps listed do not contain a component targeter element, <thisComponent> is assumed by default.

<superComponent> Repository Component Targeter

The <superComponent> element specifies that the base component of the component that contains the step should be used as the target of the step. Only steps that are contained in a derived component can use this targeter. This element has no attributes.

This element can be used as a targeter for the <install> step.

This targeter always binds to the base component's definition of the step in question, even if the derived component overrides it.

<nestedRef> Repository Component Targeter

The <nestedRef> element identifies a nested component reference that is declared or inherited by the current composite component. Only steps in a composite component can use this targeter.

This element can be used as a targeter for the <install> step.

The named component reference is assumed to not be previously installed by the calling component. Otherwise, an error is issued. If a nested referenced component is to be installed on a different host, a <retarget> step must be used. You cannot otherwise specify a new host within the <nestedRef> targeter. You cannot install a nested component reference on more than one host for a given containing component.

Attributes for the <nestedRef> Targeter

The <nestedRef> targeter has one required attribute of type identifier, name, which is the name of a nested component reference that is in this component.

<allNestedRefs> Repository Component Targeter

The <allNestedRefs> element identifies the set of all nested component references that are declared or inherited by the current composite component. Only steps in a composite component can use this targeter.

This element can be used as a targeter for the <install> step.

This targeter can identify any number of components. If it identifies no components, the step is a no-op. If it identifies more than one component, the step is semantically expanded as if a separate occurrence of the step that uses the <nestedRef> targeter exists for each of the identified components. The steps are executed serially rather than in parallel. The ordering of the steps varies based on the step type. If the execution of the step on one of the components causes an error, the step is not executed on the remaining matching components.

When used as a targeter for an <install> step, this targeter matches all of the nested component references that are declared in this component. The component matches are in the order of declaration.

<toplevelRef> Repository Component Targeter

The <toplevelRef> element identifies a top-level component reference that is declared or inherited by the current composite component. Only steps in a composite component can use this targeter.

This element can be used as a targeter for the <install> step.

This targeter is semantically equivalent to the <component> targeter, except that the name, path, and version attributes are predefined based on the referenced component. A top-level component reference can be installed any number of times on any number of hosts.

Attributes for the <toplevelRef> Targeter

The <toplevelRef> targeter has the following attributes:

Boolean Operators

This section describes elements that serve as Boolean operators. These elements appear in the condition of an <if> step. Boolean operators can evaluate only to true or false.

<istrue> Boolean Operator

This Boolean operator is used to determine whether a particular value is true. <istrue> contains a single attribute, value, and has no child elements. <istrue> evaluates to true if and only if value equals true. The comparison is case-insensitive.

Attributes for the <istrue> Boolean Operator

The <istrue> operator has one required attribute, value, which is the value to compare against true. This attribute can reference simple substitution variables.


Example 2–7 Using the <istrue> Boolean Operator

The following examples show how <istrue> is used and the results:


<equals> Boolean Operator

This Boolean operator is used to determine whether a particular value is equal to another value. This operator has the value1, value2, and exact attributes. This operator has no child elements, and evaluates to true if and only if value1 and value2 are equal. If exact is true, the values must be exactly the same, including case. If exact is false, the comparison is case-insensitive.

<istrue value="..."/> is a syntactic shorthand for the following statement:


<equals value1="..." value2="true"/>

Attributes for the <equals> Boolean Operator

The <equals> operator has the following attributes:


Example 2–8 Using the <equals> Boolean Operator

The following examples show how <equals> is used and the results:


<matches> Boolean Operator

This Boolean operator is used to determine whether a particular value matches a pattern. This operator has the value, pattern, and exact attributes. This operator has no child elements and evaluates to true if and only if the value of value matches the glob-style pattern contained in pattern. If exact is true, the values must be a case-sensitive match. Otherwise, the values can be a case-insensitive match.

Attributes for the <matches> Boolean Operator

The <matches> operator has the following attributes:


Example 2–9 Using the <matches> Boolean Operator

The following examples show how <matches> is used and the results:


<not> Boolean Operator

This Boolean operator negates the result of another Boolean operator. This operator has no attributes and has a single child element, which is one of the other Boolean operators. This operator evaluates to true only if the value of its contained operator is not true.


Example 2–10 Using the <not> Boolean Operator

The following examples show how <not> is used and the results:


<and> Boolean Operator

This Boolean operator logically ANDs the results of other Boolean operators. This operator has no attributes and can contain any number of child elements, which are the other Boolean operators. The <and> operator evaluates to true only if all of its child elements evaluate to true.


Example 2–11 Using the <and> Boolean Operator

The following examples show how <and> is used and the results:


<or> Boolean Operator

This Boolean operator logically ORs the results of other Boolean operators. This operator has no attributes and can contain any number of child elements, which are the other Boolean operators. The <or> operator evaluates to true only if it contains at least one child element that evaluates to true.


Example 2–12 Using the <or> Boolean Operator

The following examples show how <or> is used and the results: