Action Best Practices
This page includes the following:
When creating a custom Pack, the following naming convention should be followed:
- PCK.CUSTOM_<TECHNOLOGY>
To create an Action within this Pack, the following naming convention should be used:
- PCK.CUSTOM_<TECHNOLOGY>.PUB.<ACTION_NAME>
Custom Packs should be stored in the Packs folder, at the same level as the out-of-the-box Packs.
Structurally, a Pack consists of all of the following:
- An Action workflow
- A set of sub-tasks for the actual execution
- Optional: at least one prompt set for input parameters
Actions are parameterized input/output variables in prompts within the action workflows. This means that they can be created to be used in any environment and for any deployment that may use this action.
All custom Actions should be created under the same Pack, which holds the specific technology defined. If another set of actions belongs to a new technology, a new Pack must be created to store these new Actions.
Documentation for the custom action must be provided at the time of creation. This must include as much information as possible to explain how to use the Action.
The documentation that is provided for the action should include a short description to make clear what the Action is meant to be used for.
After each critical UNIX/Linux command, use the following include statement to retrieve the return code and exit/block accordingly:
-
UNIX
:INCLUDE PCK.ITPA_SHARED.PRV.INCLUDE.CHECK_SHELL_CMD@UNIX
-
Windows
:INCLUDE PCK.ITPA_SHARED.PRV.INCLUDE.CHECK_POWERSHELL_CMD@WINDOWS
or
:INCLUDE PCK.ITPA_SHARED.PRV.INCLUDE.CHECK_CMDLINE_CMD@WINDOWS