Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add boot_config and enum with new manual_only #2

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions aiohasupervisor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from aiohasupervisor.models.addons import (
AddonBoot,
AddonBootConfig,
AddonsConfigValidate,
AddonsOptions,
AddonsSecurityOptions,
Expand Down Expand Up @@ -42,6 +43,7 @@
"AvailableUpdate",
"AddonStage",
"AddonBoot",
"AddonBootConfig",
"CpuArch",
"Capability",
"AppArmor",
Expand Down
9 changes: 9 additions & 0 deletions aiohasupervisor/models/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ class AddonStage(StrEnum):
DEPRECATED = "deprecated"


class AddonBootConfig(StrEnum):
"""AddonBootConfig type."""

AUTO = "auto"
MANUAL = "manual"
MANUAL_ONLY = "manual_only"


class AddonBoot(StrEnum):
"""AddonBoot type."""

Expand Down Expand Up @@ -197,6 +205,7 @@ class InstalledAddonComplete(
dns: list[str]
protected: bool
boot: AddonBoot
boot_config: AddonBootConfig
options: dict[str, Any]
schema: list[dict[str, Any]] | None
machine: list[str]
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/addons_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"protected": true,
"rating": 7,
"boot": "auto",
"boot_config": "auto",
"options": {
"authorized_keys": [],
"password": "",
Expand Down
Loading