Validation Fields¶
Every DRP object embeds a Validation struct that tracks whether the object has been validated and whether it is available for use. These fields are read-only and managed entirely by the server during object lifecycle events.
Objects are checked for validity and availability on initial startup of DRP when they are loaded into memory, and thereafter every time they are updated. The validation process checks both the semantic correctness of the object itself and its references to other objects (such as whether a Stage references a valid BootEnv). If validation succeeds without errors, both Validated and Available are set to true. If errors are found, the Errors list is populated with human-readable messages describing each problem, and Available is set to false.
It is important to understand the distinction between Validated and Available. An object that has been through the validation process will have Validated set to true regardless of the outcome. The Available field indicates whether the object actually passed all checks and can be used operationally. An invalid object can never be available, but an object that is semantically valid might still be unavailable if a referenced dependency is missing or broken. You should always check both fields on objects returned from the API before relying on them.
| Field | Type | Description |
|---|---|---|
Validated |
bool | Whether the object has been through the validation process. |
Available |
bool | Whether the object passed validation and is usable. An object that is not validated can never be available. |
Errors |
[]string | A list of human-readable error messages from the validation process. Empty when the object is valid. |