You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Required Subroutines
- pre_capture
- post_load
- sanitize
- Description
- The sanitize subroutine reverts the changes which were made when preparing a resource for a particular reservation.
- A resource needs to be sanitized if it was successfully reserved for a reservation but not used.
- The goal of the sanitize subroutine should be to clean up and reconfigure a resource so that it can be provisioned for another reservation without having to be reloaded.
- An attempt is made to sanitize the resource by reclaim.pm if it determines that the resource was never used for a reservation. This will occur if a reservation is made, enters the reserved state, but never enters the inuse state.
- Examples of tasks performed by the sanitize subroutine:
- Delete user accounts which were created for a reservation
- Revoke access to the resource which was granted for a reservation
- Called By
- reclaim.pm::process()
- May be called by the same OS module's pre_capture() subroutine to sanitize the resource after it was reserved and used by the image creator.
- Calling Environment - must only be called as an object method of an OS object ($os->sanitize())
- Arguments - none
- Return Values
- 1
- Sanitization was completely successful
- Resource is ready to be provisioned and reserved for another reservation
- Resource does not need to be reloaded
- 0
- Sanitization could not be completed but a critical error did not occur
- Resource needs to be reloaded
- Undefined
- Sanitization could not be completed because a critical error occurred
- A critical error may occur if the resource cannot be accessed by the sanitize subroutine
- reboot
- shutdown
- get_current_image
-