Skip to content

Commit

Permalink
Python SDK | Azure Stateful Node | Update Apis and new parameters (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramrutha497 authored Nov 25, 2023
1 parent e88e99c commit 0f4f679
Show file tree
Hide file tree
Showing 6 changed files with 777 additions and 73 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.3.0] - 2023-11-25
### Added
- Added support for Azure Stateful Node APIs: `swap_os_disk_to_stateful_node`, `get_all_stateful_node_costs`,
`get_all_stateful_node_aggregated_daily_costs`, `get_stateful_node_size_usage`.

### Fixed
- Updated fields in all Azure Stateful Node model classes as per latest schema.

## [2.2.2] - 2023-11-20
### Fixed
- Passing query parameters in `delete_virtual_node_group` API for AWS Ocean.
Expand Down Expand Up @@ -37,7 +45,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [2.1.40] - 2023-07-31
### Added
- Add support for GCP Eastigroup APIs: `get_elastilog`, `get_cost_per_account`, `get_instance_status`,
- `lock_instance`, `unlock_instance`
`lock_instance`, `unlock_instance`

## [2.1.39] - 2023-07-17
### Added
Expand Down
78 changes: 77 additions & 1 deletion docs/clients/stateful_node/stateful_node_azure_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ __Returns__
<h2 id="spotinst_sdk2.clients.stateful_node.StatefulNodeAzureClient.get_all_stateful_nodes">get_all_stateful_nodes</h2>

```python
StatefulNodeAzureClient.get_all_stateful_nodes()
StatefulNodeAzureClient.get_all_stateful_nodes(name: str = None,
region: str = None)
```

Get all Stateful Nodes
Expand Down Expand Up @@ -267,3 +268,78 @@ __Returns__

`(Object)`: Stateful Node API response

<h2 id="spotinst_sdk2.clients.stateful_node.StatefulNodeAzureClient.swap_os_disk_to_stateful_node">swap_os_disk_to_stateful_node</h2>

```python
StatefulNodeAzureClient.swap_os_disk_to_stateful_node(
node_id: str, swap_osdisk_configuration: SwapOsDiskConfiguration)
```

Configure a new managed OS disk for an OS persisted paused Stateful Node

__Arguments__

- __node_id (String)__: Stateful Node ID
- __swap_osdisk_configuration (SwapOsDiskConfiguration)__: Configuration of OS Disk

__Returns__

`(Object)`: StatefulNode API response

<h2 id="spotinst_sdk2.clients.stateful_node.StatefulNodeAzureClient.get_all_stateful_node_costs">get_all_stateful_node_costs</h2>

```python
StatefulNodeAzureClient.get_all_stateful_node_costs(
from_date: str, to_date: str, owner_id: str = None)
```

Get the total costs of a single stateful node/all stateful nodes and for a specific time period.

__Arguments__

- __to_date (String)__: On or Before this date
- __from_date (String)__: On or After this date
- __ownerId (String) (Optional)__: Log level severity

__Returns__

`(Object)`: Stateful Node API response

<h2 id="spotinst_sdk2.clients.stateful_node.StatefulNodeAzureClient.get_all_stateful_node_aggregated_daily_costs">get_all_stateful_node_aggregated_daily_costs</h2>

```python
StatefulNodeAzureClient.get_all_stateful_node_aggregated_daily_costs(
from_date: str, to_date: str, owner_id: str = None)
```

Get the total costs per day of a single stateful node/all stateful nodes and for a specific time period.

__Arguments__

- __to_date (String)__: On or Before this date
- __from_date (String)__: On or After this date
- __ownerId (String) (Optional)__: Log level severity

__Returns__

`(Object)`: Stateful Node API response

<h2 id="spotinst_sdk2.clients.stateful_node.StatefulNodeAzureClient.get_stateful_node_size_usage">get_stateful_node_size_usage</h2>

```python
StatefulNodeAzureClient.get_stateful_node_size_usage(
from_date: str, to_date: str, owner_id: str = None)
```

Get the daily costs per VM size of a single stateful node/all stateful nodes and for a specific time period.

__Arguments__

- __to_date (String)__: On or Before this date
- __from_date (String)__: On or After this date
- __ownerId (String) (Optional)__: Log level severity

__Returns__

`(Object)`: Stateful Node API response

Loading

0 comments on commit 0f4f679

Please sign in to comment.