This chapter describes a new feature for this release of the N1 Service Provisioning System, which allows you to supply component variable values in the <install> step of a plan.
To specify component variable values for top-level components in a plan, it is no longer necessary to select component variable sets only in the Plan Run screen of the browser user interface, or to specify existing component variable sets only at plan run time using the command line interface. In this release of the N1 Service Provisioning System, you can supply component variable values in the <install> step of a plan.
As plan author, you no longer have to wait until the plan is accessible in the browser user interface or the command line interface. To be able to supply component variable values in the <install> step of a plan, two new elements have been provided.
The two optional new child elements of the <install> step are:
<compVarSet>
<compVarList>
Both elements can be used for the same target component. The <compVarSet> element enables you specify an existing named variable setting for the target component. The <compVarList> element enables you to override one or more specific variables for the target component. If the same variable is used in both elements, the values specified in <compVarList> override those of <compVarSet>. The <install> step is described in the Sun N1 Service Provisioning System 5.2 XML Schema Reference Guide.
The <compVarSet> element allows you to supply the name of an existing component variable setting in the <install> step of a plan, when a <component> child element of the same step exists.
The <compVarSet> element is a child of the <install> element and is valid only if the <install> element uses a <component> repository targeter.
The <compVarSet> element appears just after the <component> element. For information about <component> repository targeters, see Repository Component Targeters in Sun N1 Service Provisioning System 5.2 XML Schema Reference Guide.
The <compVarSet> element has one attribute: name. The name attribute for the <compVarSet> element supports variable substitution and must be an existing component variable setting name in the target component.
If a <compVarSet> element is specified for a targeter component in an install step, you cannot override the component's name either in the Plan Run screen of the browser interface, or when running the plan at the command line, with the pe.p.run command and the -vs argument.
The new <compVarList> element allows you to supply the values of component variable settings during the <install> step of a plan. The <compVarList> element is a child of the <install> element and is valid only if the <install> element uses a <component> repository targeter. For information about <component> repository targeters, see Repository Component Targeters in Sun N1 Service Provisioning System 5.2 XML Schema Reference Guide.
The purpose of the <compVarList> element is to specify a list of values to be used as overriding component variable settings for the component target when it is installed.
If a <compVarList> element is specified for a targeter component in an install step, you cannot override the component's version either in the Plan Run screen of the browser interface, or when running the plan at the command line, with the pe.p.run command and the -vs argument. This restriction applies in exactly the same way as with dynamic targeting. See Changes to Elements for Variable Substitution in Repository Component Targeters for more information on dynamic targeting.
Each attribute of the <compVarList> element names a variable in the resolved target component. The value of each of these attributes takes precedence when the resolved component is installed. If any of these attributes does not correspond to a variable that has been declared in the target component variable settings, the plan check-in does not succeed.
Any component variables that are not named in the <compVarList> element are given their default value when installed, and if the <compVarList> element is not used, all component variables are given their default values when installed.
All component variables named in the <compVarList> element must be accessible to the <install> step of the plan, and must be declared with access mode PUBLIC or PROTECTED.
Component variables named in the <compVarList> element cannot be declared with access mode FINAL or PRIVATE. If component variables named in the <compVarList> element are declared with access mode FINAL or PRIVATE, an error occurs during plan check-in.
Here is an example of the <compVarList> element, with a single variable, and variable substitution:
<install blockName='default'> <component name='foo' path='/tmp'/> <compVarList comp1var1='val1' comp1var2=':[localVar]'/> </install>