mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-18 20:58:06 +00:00
Adding auto scale via cli (#1717)
* Initial implementation for adding auto scale via cli * Remove unused argument * Remove unused import * I had a 👻extra line👻
This commit is contained in:
@ -661,6 +661,17 @@ class Scaleset(BaseModel):
|
||||
tags: Dict[str, str] = Field(default_factory=lambda: {})
|
||||
|
||||
|
||||
class AutoScale(BaseModel):
|
||||
scaleset_id: UUID
|
||||
min: int = Field(ge=1)
|
||||
max: int = Field(ge=1)
|
||||
default: int = Field(ge=1)
|
||||
scale_out_amount: int = Field(ge=1)
|
||||
scale_out_cooldown: int = Field(ge=1)
|
||||
scale_in_amount: int = Field(ge=1)
|
||||
scale_in_cooldown: int = Field(ge=1)
|
||||
|
||||
|
||||
class NotificationConfig(BaseModel):
|
||||
config: NotificationTemplate
|
||||
|
||||
|
@ -169,6 +169,16 @@ class ScalesetUpdate(BaseRequest):
|
||||
size: Optional[int] = Field(ge=1)
|
||||
|
||||
|
||||
class AutoScaleOptions(BaseModel):
|
||||
min: int = Field(ge=1)
|
||||
max: int = Field(ge=1)
|
||||
default: int = Field(ge=1)
|
||||
scale_out_amount: int = Field(ge=1)
|
||||
scale_out_cooldown: int = Field(ge=1)
|
||||
scale_in_amount: int = Field(ge=1)
|
||||
scale_in_cooldown: int = Field(ge=1)
|
||||
|
||||
|
||||
class ScalesetCreate(BaseRequest):
|
||||
pool_name: PoolName
|
||||
vm_sku: str
|
||||
@ -178,6 +188,7 @@ class ScalesetCreate(BaseRequest):
|
||||
spot_instances: bool
|
||||
ephemeral_os_disks: bool = Field(default=False)
|
||||
tags: Dict[str, str]
|
||||
auto_scale: Optional[AutoScaleOptions]
|
||||
|
||||
|
||||
class ContainerGet(BaseRequest):
|
||||
|
Reference in New Issue
Block a user