-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
7077f2c OS-3904. Fix resource type for RDD resources detected as volumes c880339 OS-4883. Rightsizing RDS archive recommendation
- Loading branch information
Showing
5 changed files
with
289 additions
and
170 deletions.
There are no files selected for viewing
232 changes: 84 additions & 148 deletions
232
bumiworker/bumiworker/modules/archive/rightsizing_instances.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from bumiworker.bumiworker.consts import ArchiveReason | ||
from bumiworker.bumiworker.modules.recommendations.rightsizing_rds import ( | ||
RightsizingRds as RightsizingRdsRecommendation) | ||
from bumiworker.bumiworker.modules.rightsizing_base import ( | ||
RightsizingArchiveBase | ||
) | ||
|
||
|
||
class RightsizingRds(RightsizingArchiveBase, RightsizingRdsRecommendation): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.reason_description_map[ArchiveReason.RECOMMENDATION_APPLIED] = ( | ||
'flavor changed') | ||
|
||
def set_additional_reasons(self, cloud_resource_map, cloud_account, | ||
cloud_resource_id_instance_map, | ||
optimizations_dict, days_threshold, result): | ||
for optimization in optimizations_dict.values(): | ||
if 'reason' not in optimization: | ||
self._set_reason_properties( | ||
optimization, ArchiveReason.OPTIONS_CHANGED) | ||
result.append(optimization) | ||
|
||
|
||
def main(organization_id, config_client, created_at, **kwargs): | ||
return RightsizingRds( | ||
organization_id, config_client, created_at).get() |
Oops, something went wrong.