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

Session Substitution Variable References

Session variables enable you to enter data, such as your WebLogic credentials, one time per user session. You can also securely save the contents of these variables and not have to re-enter data each time you log in. Session variables are integrated at the modeling level by using substitution variables.

A session substitution variable reference has the following syntax:


:[session:varname]

varname is the name of a session variable.

A session substitution variable reference resolves to the value of the session variable in the current user's session. An attempt to resolve a session variable that is not defined in the current user's session results in an error. When a failure to generate a session variable is encountered, an attempt is made to add the session variable, with an empty value, to the user's current session variable set.

A session variable can be used anywhere that a simple substitution variable reference can be used. However, a session variable cannot be used in the value of another session variable.

Predefined Session Variables

sys:sessionID is a predefined session variable that resolves to the ID of the current user session. The system sessionID variable enables you to write steps that call back into the master server through the CLI by using the same credentials as the user who ran the plan. The system sessionID variable can only be resolved in the context of certain hosts, per the config.allowSessionIDOnHosts configuration variable. Thus, the system sessionID variable can only be resolved if the target host of the current generation context is included within the hosts named by the config.allowSessionIDOnHosts configuration variable.

When configuring a CLI for use in callbacks during plan execution, a Remote Agent and CLI Client must be installed on the same server. For maximum security, you should install the CLI Client and the Remote Agent on the same server as the Master Server. In this scenario, plans and components that want to make a callback through the CLI would use a <retarget> step to redirect execution to the single host that contains the CLI. In addition, the system sessionID variable would be resolved after the <retarget> step, and the config.allowSessionIDOnHosts configuration variable would name only the master server host.