-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAS-133206 / 25.10 / Convert boot.* to versioned API (#15524)
* add NotRequired default value * unit test * add alias test case * add expose_secrets test case * ForUpdateMetaclass unit test * use new model * Move unit tests to github CI * validator has to be recursive * fix test_excluded_field * recursion actually not necessary * add roles, convert boot.format * missing comma * use BOOT_ENV_WRITE * update roles * fix usage of NotRequired * do NOT set new roles on private endpoints * move to 25.10 * don't version private endpoints * move BOOT_POOL_NAME_VALID * don't import from boot
- Loading branch information
1 parent
c6d51cb
commit fd73750
Showing
12 changed files
with
130 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from pydantic import Field, PositiveInt | ||
|
||
from middlewared.api.base import BaseModel | ||
|
||
|
||
__all__ = [ | ||
"BootGetDisksArgs", "BootGetDisksResult", "BootAttachArgs", "BootAttachResult", "BootDetachArgs", | ||
"BootDetachResult", "BootReplaceArgs", "BootReplaceResult", "BootScrubArgs", "BootScrubResult", | ||
"BootSetScrubIntervalArgs", "BootSetScrubIntervalResult", | ||
] | ||
|
||
|
||
class BootAttachOptions(BaseModel): | ||
expand: bool = False | ||
|
||
|
||
class BootGetDisksArgs(BaseModel): | ||
pass | ||
|
||
|
||
class BootGetDisksResult(BaseModel): | ||
result: list[str] | ||
|
||
|
||
class BootAttachArgs(BaseModel): | ||
dev: str | ||
options: BootAttachOptions = Field(default_factory=BootAttachOptions) | ||
|
||
|
||
class BootAttachResult(BaseModel): | ||
result: None | ||
|
||
|
||
class BootDetachArgs(BaseModel): | ||
dev: str | ||
|
||
|
||
class BootDetachResult(BaseModel): | ||
result: None | ||
|
||
|
||
class BootReplaceArgs(BaseModel): | ||
label: str | ||
dev: str | ||
|
||
|
||
class BootReplaceResult(BaseModel): | ||
result: None | ||
|
||
|
||
class BootScrubArgs(BaseModel): | ||
pass | ||
|
||
|
||
class BootScrubResult(BaseModel): | ||
result: None | ||
|
||
|
||
class BootSetScrubIntervalArgs(BaseModel): | ||
interval: PositiveInt | ||
|
||
|
||
class BootSetScrubIntervalResult(BaseModel): | ||
result: PositiveInt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters