-
Story
-
Resolution: Done
-
Major
-
None
-
COST-16 - Cost model enhancements: support rates based on tags and overall improvements
-
COST Sprint 52, COST Sprint 53
In our current installation, there can be only one rate for each type (i.e. CPU-hour or node-monthly)
However, there are many times where the customer will need to have several elements of the same type (i.e. modeling monthly costs due to licensing and due to support as different elements of the price list).
This is important because the life cycle of those can vary (i.e. your support contract is different for one company to another so the changes in price occur in different months of the year)
Notes
- In the serializer this check is currently what is preventing us from having multiple rates for the same metric: https://github.com/project-koku/koku/blob/8da52d53112e30010d6c52fff99cf61b7cb5558c/koku/cost_models/serializers.py#L342. It might be as simple as deleting this
- In the cost model db accessor we currently just grab the rates for each metric, it might be that we just loop through the rates and add the rates of the same metric type and return them as 1. https://github.com/project-koku/koku/blob/master/koku/masu/database/cost_model_db_accessor.py#L65-L80
- There can be only 1. #Highlander