By Owen Allen-Oracle on Mar 05, 2015
I saw a question recently about variables in operational plans, which I thought I'd discuss. If you're unfamiliar with them, operational plans let you create or upload scripts, then run those scripts on targeted systems through Ops Center.
The question was about the variables you can use in these scripts. There are two kinds of variables you can use: user-defined ones, which you have to create, or system defined variables which are defined by Ops Center. The system defined variables are listed in the documentation, but the questioner wasn't sure what each variable actually was. So, here's a list of the useful system variables and what they do:
$OC_UFN - The target asset's user-friendly name - the same name that's used in the UI.
$OC_JOB_ID - The Job ID number for the job that's applying the operational plan. A lot of users use this variable to help track changes that are made by a script.
$OC_TARGET_NAME - This is Ops Center's internal name for the target asset.
$OC_TARGET_TYPE - This is the type of asset that the script is being applied to.
There's more information about creating and applying Operational Plans in the Feature Reference Guide.