diff --git a/CHANGELOG.md b/CHANGELOG.md index 66e43720..7f10bc93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [3.2.0] - 2024-05-22 +### Added +- Added support for `Task` in Ocean AKS `Scheduling` model. + ## [3.1.0] - 2024-05-17 ### Added - Added support for `GpuType` in Ocean AKS `Filters` model. diff --git a/docs/models/ocean/azure.md b/docs/models/ocean/azure.md index e6635b10..e236bfd5 100644 --- a/docs/models/ocean/azure.md +++ b/docs/models/ocean/azure.md @@ -97,17 +97,81 @@ __Arguments__ - __is_enabled__: bool - __time_windows__: List[str] +

ClusterRoll

+ +```python +ClusterRoll( + self, + batch_min_healthy_percentage: int = 'd3043820717d74d9a17694c176d39733', + batch_size_percentage: int = 'd3043820717d74d9a17694c176d39733', + comment: str = 'd3043820717d74d9a17694c176d39733', + respect_pdb: bool = 'd3043820717d74d9a17694c176d39733', + respect_restrict_scale_down: bool = 'd3043820717d74d9a17694c176d39733', + vng_ids: typing.List[str] = 'd3043820717d74d9a17694c176d39733') +``` + +__Arguments__ + +- __batch_min_healthy_percentage__: int +- __batch_size_percentage__: int +- __comment__: str +- __respect_pdb__: bool +- __respect_restrict_scale_down__: bool +- __vng_ids__: List[str] + +

Parameters

+ +```python +Parameters(self, + cluster_roll: ClusterRoll = 'd3043820717d74d9a17694c176d39733' + ) +``` + +__Arguments__ + +- __cluster_roll__: ClusterRoll + +

TaskType

+ +```python +TaskType(cls, value, names=None, *, module, qualname, type, start) +``` +An enumeration. +

cluster_roll

+ + +

Task

+ +```python +Task(self, + cron_expression: str = 'd3043820717d74d9a17694c176d39733', + is_enabled: bool = 'd3043820717d74d9a17694c176d39733', + parameters: Parameters = 'd3043820717d74d9a17694c176d39733', + task_type: TaskType = 'd3043820717d74d9a17694c176d39733') +``` + +__Arguments__ + +- __cron_expression__: str +- __is_enabled__: bool +- __parameters__: Parameters +- __task_type__: TaskType +

Scheduling

```python Scheduling( - self, - shutdown_hours: ShutdownHours = 'd3043820717d74d9a17694c176d39733') + self, + shutdown_hours: ShutdownHours = 'd3043820717d74d9a17694c176d39733', + tasks: + typing.List[spotinst_sdk2.models.ocean.azure.Task] = 'd3043820717d74d9a17694c176d39733' +) ``` __Arguments__ - __shutdown_hours__: ShutdownHours +- __tasks__: List[Task]

Health

diff --git a/requirements.txt b/requirements.txt index 72dbdcdc..fb810e02 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ PyYaml==6.0.1 -requests==2.31.0 +requests==2.32.0 pydoc-markdown==2.1.3 mock==5.1.0 pytest==7.4.4 \ No newline at end of file diff --git a/spotinst_sdk2/models/ocean/azure/__init__.py b/spotinst_sdk2/models/ocean/azure/__init__.py index 25905161..d3aa94ea 100644 --- a/spotinst_sdk2/models/ocean/azure/__init__.py +++ b/spotinst_sdk2/models/ocean/azure/__init__.py @@ -120,16 +120,83 @@ def __init__( self.time_windows = time_windows +class ClusterRoll: + """ + # Arguments + batch_min_healthy_percentage: int + batch_size_percentage: int + comment: str + respect_pdb: bool + respect_restrict_scale_down: bool + vng_ids: List[str] + """ + + def __init__( + self, + batch_min_healthy_percentage: int = none, + batch_size_percentage: int = none, + comment: str = none, + respect_pdb: bool = none, + respect_restrict_scale_down: bool = none, + vng_ids: List[str] = none): + self.batch_min_healthy_percentage = batch_min_healthy_percentage + self.batch_size_percentage = batch_size_percentage + self.comment = comment + self.respect_pdb = respect_pdb + self.respect_restrict_scale_down = respect_restrict_scale_down + self.vng_ids = vng_ids + + +class Parameters: + """ + # Arguments + cluster_roll: ClusterRoll + """ + + def __init__( + self, + cluster_roll: ClusterRoll = none): + self.cluster_roll = cluster_roll + + +class TaskType(Enum): + cluster_roll = "clusterRoll" + + +class Task: + """ + # Arguments + cron_expression: str + is_enabled: bool + parameters: Parameters + task_type: TaskType + """ + + def __init__( + self, + cron_expression: str = none, + is_enabled: bool = none, + parameters: Parameters = none, + task_type: TaskType = none): + self.cron_expression = cron_expression + self.is_enabled = is_enabled + self.parameters = parameters + self.task_type = task_type + + class Scheduling: """ # Arguments shutdown_hours: ShutdownHours + tasks: List[Task] """ def __init__( self, - shutdown_hours: ShutdownHours = none): + shutdown_hours: ShutdownHours = none, + tasks: List[Task] = none): self.shutdown_hours = shutdown_hours + self.tasks = tasks # endregion # region Health @@ -336,16 +403,16 @@ class VmType(Enum): class GpuType(Enum): - nvidia_tesla_v100 = "nvidia-tesla-v100" + nvidia_tesla_v100 = "nvidia-tesla-v100" amd_radeon_instinct_mi25 = "amd-radeon-instinct-mi25" - nvidia_a10 = "nvidia-a10" - nvidia_tesla_a100 = "nvidia-tesla-a100" - nvidia_tesla_k80 = "nvidia-tesla-k80" - nvidia_tesla_m60 = "nvidia-tesla-m60" - nvidia_tesla_p100 = "nvidia-tesla-p100" - nvidia_tesla_p40 = "nvidia-tesla-p40" - nvidia_tesla_t4 = "nvidia-tesla-t4" - nvidia_tesla_h100 = "nvidia-tesla-h100" + nvidia_a10 = "nvidia-a10" + nvidia_tesla_a100 = "nvidia-tesla-a100" + nvidia_tesla_k80 = "nvidia-tesla-k80" + nvidia_tesla_m60 = "nvidia-tesla-m60" + nvidia_tesla_p100 = "nvidia-tesla-p100" + nvidia_tesla_p40 = "nvidia-tesla-p40" + nvidia_tesla_t4 = "nvidia-tesla-t4" + nvidia_tesla_h100 = "nvidia-tesla-h100" class Filters: