From d820b59d02c303c667c7a8b7a9691aaf2a490add Mon Sep 17 00:00:00 2001 From: sobhanagit <86217539+sobhanagit@users.noreply.github.com> Date: Thu, 19 Sep 2024 13:40:15 +0530 Subject: [PATCH] Spotaut 19855 update rightsizing rule (#183) --- CHANGELOG.md | 4 ++++ docs/clients/ocean/ocean_rightsizing_client.md | 15 ++++++++------- spotinst_sdk2/clients/ocean/__init__.py | 14 +++++++------- spotinst_sdk2/version.py | 2 +- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 063d7651..bfaf1019 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.15.1] - 2024-09-19 +### Fixed +- Create/Update rightsizing rule APIs fixed for optional parameters. + ## [3.15.0] - 2024-09-06 ### Added - Updated documentation for Ocean rightsizing APIs. diff --git a/docs/clients/ocean/ocean_rightsizing_client.md b/docs/clients/ocean/ocean_rightsizing_client.md index d54fdab8..eadf9ec0 100644 --- a/docs/clients/ocean/ocean_rightsizing_client.md +++ b/docs/clients/ocean/ocean_rightsizing_client.md @@ -15,10 +15,10 @@ OceanRightSizingClient(self, OceanRightSizingClient.create_right_sizing_rule( ocean_id: str, rule_name: str, - restart_replicas: RestartReplicas, - exclude_preliminary_recommendations: bool, application_intervals: typing.List[spotinst_sdk2.models.ocean.rightsizing.RecommendationApplicationInterval], + restart_replicas: RestartReplicas = None, + exclude_preliminary_recommendations: bool = None, application_min_threshold: RecommendationApplicationMinThreshold = None, application_boundaries: RecommendationApplicationBoundaries = None, application_overhead_values: @@ -69,13 +69,14 @@ __Returns__ OceanRightSizingClient.update_right_sizing_rule( ocean_id: str, rule_name: str, - restart_replicas: RestartReplicas, - exclude_preliminary_recommendations: bool, application_intervals: typing.List[spotinst_sdk2.models.ocean.rightsizing.RecommendationApplicationInterval], - application_min_threshold: RecommendationApplicationMinThreshold, - application_boundaries: RecommendationApplicationBoundaries, - application_overhead_values: RecommendationApplicationOverheadValues, + restart_replicas: RestartReplicas = None, + exclude_preliminary_recommendations: bool = None, + application_min_threshold: RecommendationApplicationMinThreshold = None, + application_boundaries: RecommendationApplicationBoundaries = None, + application_overhead_values: + RecommendationApplicationOverheadValues = None, application_hpa: RecommendationApplicationHPA = None) ``` diff --git a/spotinst_sdk2/clients/ocean/__init__.py b/spotinst_sdk2/clients/ocean/__init__.py index cd769c2b..7a18902a 100644 --- a/spotinst_sdk2/clients/ocean/__init__.py +++ b/spotinst_sdk2/clients/ocean/__init__.py @@ -2501,9 +2501,9 @@ def launch_nodes_in_vng(self, ocean_launch_spec_id: str, amount: int): class OceanRightSizingClient(Client): def create_right_sizing_rule(self, ocean_id: str, rule_name: str, - restart_replicas: right_sizing_ocean.RestartReplicas, - exclude_preliminary_recommendations: bool, application_intervals: List[right_sizing_ocean.RecommendationApplicationInterval], + restart_replicas: right_sizing_ocean.RestartReplicas = None, + exclude_preliminary_recommendations: bool = None, application_min_threshold: right_sizing_ocean.RecommendationApplicationMinThreshold = None, application_boundaries: right_sizing_ocean.RecommendationApplicationBoundaries = None, application_overhead_values: right_sizing_ocean.RecommendationApplicationOverheadValues = None, @@ -2583,12 +2583,12 @@ def delete_right_sizing_rule(self, ocean_id: str, rule_names: List[str]): def update_right_sizing_rule(self, ocean_id: str, rule_name: str, - restart_replicas: right_sizing_ocean.RestartReplicas, - exclude_preliminary_recommendations: bool, application_intervals: List[right_sizing_ocean.RecommendationApplicationInterval], - application_min_threshold: right_sizing_ocean.RecommendationApplicationMinThreshold, - application_boundaries: right_sizing_ocean.RecommendationApplicationBoundaries, - application_overhead_values: right_sizing_ocean.RecommendationApplicationOverheadValues, + restart_replicas: right_sizing_ocean.RestartReplicas = None, + exclude_preliminary_recommendations: bool = None, + application_min_threshold: right_sizing_ocean.RecommendationApplicationMinThreshold = None, + application_boundaries: right_sizing_ocean.RecommendationApplicationBoundaries = None, + application_overhead_values: right_sizing_ocean.RecommendationApplicationOverheadValues = None, application_hpa: right_sizing_ocean.RecommendationApplicationHPA = None): """ Update a right sizing rule for an Ocean cluster. diff --git a/spotinst_sdk2/version.py b/spotinst_sdk2/version.py index 254db7b7..f3bb9e91 100644 --- a/spotinst_sdk2/version.py +++ b/spotinst_sdk2/version.py @@ -1 +1 @@ -__version__ = '3.15.0' +__version__ = '3.15.1'