Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/dstack/_internal/core/backends/template/models.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class {{ backend_name }}BackendConfig(CoreModel):
It also serves as a base class for other backend config models.
Should not include creds.
"""

type: Annotated[
Literal["{{ backend_name|lower }}"],
Field(description="The type of backend"),
Expand All @@ -37,6 +38,7 @@ class {{ backend_name }}BackendConfigWithCreds({{ backend_name }}BackendConfig):
"""
Same as `{{ backend_name }}BackendConfig` but also includes creds.
"""

creds: Annotated[Any{{ backend_name }}Creds, Field(description="The credentials")]


Expand All @@ -48,11 +50,13 @@ class {{ backend_name }}StoredConfig({{ backend_name }}BackendConfig):
The backend config used for config parameters in the DB.
Can extend `{{ backend_name }}BackendConfig` with additional parameters.
"""

pass


class {{ backend_name }}Config({{ backend_name }}StoredConfig):
"""
The backend config used by `{{ backend_name }}Backend` and `{{ backend_name }}Compute`.
"""

creds: Any{{ backend_name }}Creds
Loading