N1 Grid Service Provisioning System 5.0 Plan and Component Developer's Guide

Target Substitution Variable References

You can use target substitution variables to obtain values directly from a particular host.

Target substitution variable references use the following syntax:


:[target:varname]
:[target(host-redirect):varname]

A variable name that begins with target refers to the logical host on which a plan is currently being run.

varname represents an attribute value that is specified in the target host's definition for the application that you install. Two types of host variables can be referenced: predefined and dynamic. See Predefined Host Variable Names and Dynamic Host Variable Names.

If you also specify host-redirect, the value for varname is retrieved from that particular host. That host can be a host other than the host on which the plan is currently being run. You can also specify another substitution variable for hostname that, when expanded, resolves to the name of a host. The syntax for host-redirect is described in Host Redirects.

Predefined Host Substitution Shorthands

You can use these predefined host substitution shorthands anywhere that a host substitution reference can be used:

Host Redirects

Target host substitution variable references and external component substitution variable references can optionally include a host redirect. This means that the host on which the variable or component lookup occurs is the specified host rather than the current target. host-redirect has one of the following forms:

hostname is either the name of a host or a substitution variable reference that, when expanded, resolves to the name of a host.

parent-ref is one of the following:

The parent-ref operators are used primarily for virtual hosts, but they can also be used for physical hosts. Applying either operator to a physical host is a no-op.


Example 6–3 Using Target Substitution Variable References


Predefined Host Variable Names

These predefined host variable names refer to the associated attribute of the referenced host:


Example 6–4 Using Host Substitution Variable References

The following are examples of host substitution variable references and their values:


Dynamic Host Variable Names

A dynamic host variable name is any attribute name that is declared by the host type of the referenced host. In this case, the value to be substituted for the variable reference is the corresponding value of the attribute that is defined by the referenced host. The value must be expanded prior to substitution, if applicable.