Skip to content

Commit

Permalink
SPOTAUT-19562 Added support for suspension hours in Ocean Azure (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
IGUDE2 authored Aug 23, 2024
1 parent b819892 commit 8da7ac4
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
15 changes: 15 additions & 0 deletions docs/models/ocean/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ __Arguments__
- __is_enabled__: bool
- __time_windows__: List[str]

<h2 id="spotinst_sdk2.models.ocean.azure.SuspensionHours">SuspensionHours</h2>

```python
SuspensionHours(
self,
is_enabled: bool = 'd3043820717d74d9a17694c176d39733',
time_windows: typing.List[str] = 'd3043820717d74d9a17694c176d39733')
```

__Arguments__

- __is_enabled__: bool
- __time_windows__: List[str]

<h2 id="spotinst_sdk2.models.ocean.azure.ClusterRoll">ClusterRoll</h2>

```python
Expand Down Expand Up @@ -163,6 +177,7 @@ __Arguments__
Scheduling(
self,
shutdown_hours: ShutdownHours = 'd3043820717d74d9a17694c176d39733',
suspension_hours: SuspensionHours = 'd3043820717d74d9a17694c176d39733',
tasks:
typing.List[spotinst_sdk2.models.ocean.azure.Task] = 'd3043820717d74d9a17694c176d39733'
)
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PyYaml==6.0.1
requests==2.32.0
PyYaml==6.0.2
requests==2.32.3
pydoc-markdown==2.1.3
mock==5.1.0
pytest==7.4.4
pytest==8.3.2
16 changes: 16 additions & 0 deletions spotinst_sdk2/models/ocean/azure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ def __init__(
self.is_enabled = is_enabled
self.time_windows = time_windows

class SuspensionHours:
"""
# Arguments
is_enabled: bool
time_windows: List[str]
"""

def __init__(
self,
is_enabled: bool = none,
time_windows: List[str] = none):
self.is_enabled = is_enabled
self.time_windows = time_windows


class ClusterRoll:
"""
Expand Down Expand Up @@ -194,8 +208,10 @@ class Scheduling:
def __init__(
self,
shutdown_hours: ShutdownHours = none,
suspension_hours : SuspensionHours = none,
tasks: List[Task] = none):
self.shutdown_hours = shutdown_hours
self.suspension_hours = suspension_hours
self.tasks = tasks
# endregion

Expand Down
2 changes: 1 addition & 1 deletion spotinst_sdk2/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.12.0'
__version__ = '3.13.0'

0 comments on commit 8da7ac4

Please sign in to comment.