air_sdk.endpoints.ztp_scripts
air_sdk.endpoints.ztp_scripts
Classes
Module Contents
Bases: air_sdk.air_model.AirModel
A ZTP (Zero Touch Provisioning) script for a simulation.
ZTPScript objects should not be created directly. Use
simulation.create_ztp_script(content='...') instead.
When printed, the content field is truncated to 50 characters with newlines
collapsed to avoid flooding console/logs with large scripts.
Access the full content via ztp_script.content.
Examples:
When the script was created.
When the script was last modified.
The script content.
The simulation this script belongs to.
Returns the respective AirModelAPI type for this model
The current model API instance.
Update the content of this ZTP script.
Parameters:
content– The new script content to use.
Example:
Delete the instance.
After deletion, accessing simulation.ztp_script will return None.
Example:
Bases: air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.ztp_scripts.ZTPScript]
Retrieve, update, and delete ZTP scripts for simulations.
ZTPScripts should be created during import or off of Simulation objects:
Examples:
Get the ZTP script for the simulation if it exists.
Parameters:
simulation– The simulation object or simulation ID.
Returns:
The ZTP script for the simulation.
Raises:
AirUnexpectedResponse– If the simulation doesn’t have a ZTP script.
Example:
Update the content of the ZTPScript.
Parameters:
simulation– The simulation object or simulation ID.content– The new script content.
Returns:
The updated ZTP script.
Examples:
Update the content of the ZTPScript.
This is an alias for patch() provided for consistency with other endpoints.
Parameters:
simulation– The simulation object or simulation ID.content– The new script content.
Returns:
The updated ZTP script.
Examples:
Delete the ZTP script for the simulation.
After deletion, simulation.ztp_script will return None.
Parameters:
simulation– The simulation object or simulation ID.
Examples: