Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust savings plan rate to match cost and usage #528

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nise/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "4.6.9"
__version__ = "4.6.10"


VERSION = __version__.split(".")
2 changes: 1 addition & 1 deletion nise/generators/aws/data_transfer_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _update_data(self, row, start, end, **kwargs):
row["pricing/term"] = "OnDemand"
row["pricing/unit"] = "GB"
row["savingsPlan/SavingsPlanEffectiveCost"] = str(saving)
row["savingsPlan/SavingsPlanRate"] = str(saving)
row["savingsPlan/SavingsPlanRate"] = str(round(float(saving) / amount, 4)) if saving else str(saving)

# Overwrite lineItem/LineItemType for items with applied Savings plan
if saving is not None:
Expand Down
2 changes: 1 addition & 1 deletion nise/generators/aws/ec2_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _update_data(self, row, start, end, **kwargs):
row["pricing/term"] = "OnDemand"
row["pricing/unit"] = "Hrs"
row["savingsPlan/SavingsPlanEffectiveCost"] = saving
row["savingsPlan/SavingsPlanRate"] = saving
row["savingsPlan/SavingsPlanRate"] = round(float(saving) / float(amount), 4) if saving and amount else saving

# Overwrite lineItem/LineItemType for items with applied Savings plan
if saving is not None:
Expand Down
Loading