The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
When you create a custom task script, it is good practice to create a corresponding rollback script. The rollback script undoes whatever change was made in the custom task script. For example, if the custom task creates a resource, the rollback script should remove the resource.
Of course, many rollback scenarios require information about the state of the system before the custom task was executed. The CloupiaScript library contains a ChangeTracker API to enable you to reverse the effects of a custom task. Using the ChangeTracker API, you create an UndoableResource object that collects state information before creating a resource. During rollback, the UndoableResource uses this information to restore the resource to its previous state.
The ChangeTracker API contains two methods to enable rolling back of modification and deletion of a resource, respectively:
For an example of how to use the ChangeTracker API to create a rollback script, see the Cisco UCS Director CloupiaScript Cookbook available at the following URL: http://www.cisco.com/c/en/us/support/servers-unified-computing/ucs-director/products-programming-reference-guides-list.html.