air_sdk.endpoints.os_templates
air_sdk.endpoints.os_templates
Classes
Module Contents
Bases: typing.TypedDict
Required fields for OSTemplateRenderFile.
Bases: air_sdk.endpoints.os_templates._OSTemplateRenderFileRequired
A single OS template render entry: file content plus POSIX metadata.
POSIX owner — user name or numeric uid. Defaults to root
POSIX group — group name or numeric gid. Defaults to root
POSIX octal file mode. Defaults to 0644
content
Template body, rendered with the merged vars/generate context
Bases: air_sdk.air_model.AirModel
An OS template: the files injected into a node at boot.
A template describes, for one OS type and version, which files to render
onto the node and which variables feed that rendering. An
OSImageManifest pins a specific template version per hardware model.
id: Unique identifier for the template
created: Timestamp when the template was created
modified: Timestamp when the template was last modified
os_type: The OS type this template applies to
os_template_version: Version of this template
org: Organization owning the template
render: Absolute POSIX path to render entry. Each value has a
required content plus optional owner, group and mode
(defaulting to root/root/0644)
creator: Email of the user who created the template
generate: Variable names mapped to generation strategies
vars: Variable names the render templates reference, declared for
upload-time verification. Must exactly match the variables used
across the render bodies.
Delete this OS template.
Returns:
None
Example:
Bases: air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.os_templates.OSTemplate]
Endpoint API for managing OS templates.
Provides listing, retrieval, creation, and deletion of the templates that define which files are rendered onto a booting node. The API does not support partial or full updates on this resource.
List OS templates.
Parameters:
os_type– Filter by OS typeos_template_version– Filter by template versionlimit– Number of results to return per pageoffset– Initial index from which to return resultsordering– Order by field (prefix with ”-” for descending)search– Search across template fields**kwargs– Additional filter parameters
Returns:
Iterator of OSTemplate instances
Example:
Retrieve a specific OS template.
Parameters:
pk– OS template UUID**kwargs– Additional query parameters
Returns:
OSTemplate instance
Example:
Create an OS template.
Parameters:
os_type– The OS type this template applies toos_template_version– Version of this templaterender– Render entries keyed by absolute POSIX path. Each value requirescontent;owner,groupandmodeare optional and default to root/root/0644generate– Variable names mapped to generation strategiesvars– Names of the variables this template expects**kwargs– Additional fields for future API compatibility
Returns:
The created OSTemplate instance
Example:
Delete an OS template.
Parameters:
pk– OS template UUID**kwargs– Additional parameters
Returns:
None
Example: