From 0842bacdee3ee6ca3bf6a8a27edb62df3e0f800c Mon Sep 17 00:00:00 2001 From: sobhanagit <86217539+sobhanagit@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:19:18 +0530 Subject: [PATCH 1/4] Update __init__.py --- spotinst_sdk2/clients/ocean/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spotinst_sdk2/clients/ocean/__init__.py b/spotinst_sdk2/clients/ocean/__init__.py index cd769c2b..ca02fa07 100644 --- a/spotinst_sdk2/clients/ocean/__init__.py +++ b/spotinst_sdk2/clients/ocean/__init__.py @@ -2586,9 +2586,9 @@ def update_right_sizing_rule(self, ocean_id: 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, + 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. From 294cf0d4a41d7ab71282246142c22285765c1c85 Mon Sep 17 00:00:00 2001 From: sobhanagit <86217539+sobhanagit@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:19:57 +0530 Subject: [PATCH 2/4] Update version.py --- spotinst_sdk2/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' From ba61e99ba5cec0cc5967d06aa60ccc370fea14b0 Mon Sep 17 00:00:00 2001 From: adityas1netapp Date: Wed, 18 Sep 2024 13:43:09 +0530 Subject: [PATCH 3/4] Made few more parameters as optional --- spotinst_sdk2/clients/ocean/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spotinst_sdk2/clients/ocean/__init__.py b/spotinst_sdk2/clients/ocean/__init__.py index ca02fa07..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,9 +2583,9 @@ 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], + 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, From 9fe5217137edf08934f3e7fc73cbc8f960723f5b Mon Sep 17 00:00:00 2001 From: Anurag Sharma Date: Thu, 19 Sep 2024 13:36:27 +0530 Subject: [PATCH 4/4] Documentation Update --- CHANGELOG.md | 4 ++++ docs/clients/ocean/ocean_rightsizing_client.md | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 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) ```