Using State and Status Arguments in Postscripts
The functionality described in this topic (state and status arguments) applies only to postscripts for Use Data policies. Copy Data policies are not supported. Prescripts are not supported.
Certain positional arguments can be passed to a Use Data policy postscript for conditional logic. The arguments that can be passed are state and status. You can use the status argument, for example, if you want to perform an action only if a Use Data job completes successfully. Your script would perform the action only if the value of status were SUCCESS.
When passing the arguments via the Postscript field in the ECX user interface, the arguments must be surrounded by underscores ( _STATE_ and _STATUS_ ). When doing so, the arguments are replaced in the script with the actual corresponding values.
Specifically, to pass the arguments state and status, enter the following in the Postscript field:
/data/userscripts/<name of script> _STATE_ _STATUS_
The following is a simple example of code that can be added to a postscript (or can be its own postscript) in order to see the specific state and status values in the job log:
echo state $1
echo status $2
In the above script, $1 and $2 represent the arguments that are being passed in to the script from the Postscript field in the ECX user interface.
So for the above postscript example, the following output would display if the job ran in an Instant Access state and completed successfully:
state IA
status SUCCESS
Note: Passing _STATE_ or _STATUS_ to a script for an unsupported script type (such as prescripts) or an unsupported policy type (such as Copy Data policy scripts), simply passes “_STATE_” or “_STATUS_” as plain text.
The valid values for state and status vary depending on the Use Data policy type. Following is a table of valid state and status values.
Use Data policy type | State | Status |
---|---|---|
EMC VNX – Instant Access |
|
|
EMC VNX – Restore Volume(s) |
|
|
IBM – Instant Access |
|
|
IBM – Restore Volume(s) |
|
|
NetApp – Instant Access |
|
|
NetApp – Restore Volume(s) |
|
|
NetApp – Restore Files |
|
|
VMware – Instant Virtualization |
|
|
VMware – Instant Access |
|
|
Catalogic ECX™ 2.4
© 2016 Catalogic Software, Inc. | All rights reserved.
MySupport | Knowledge Base | Trademarks | info@catalogicsoftware.com