@@ -532,7 +532,7 @@ def populate_monthly_cost_sql(self, cost_type, rate_type, rate, start_date, end_
532
532
LOG .info (log_json (msg = "populating monthly costs" , context = ctx ))
533
533
self ._prepare_and_execute_raw_sql_query (table_name , sql , sql_params , operation = "INSERT" )
534
534
535
- def populate_monthly_tag_cost_sql ( # noqa: C901
535
+ def populate_tag_cost_sql (
536
536
self , cost_type , rate_type , tag_key , case_dict , start_date , end_date , distribution , provider_uuid
537
537
):
538
538
"""
@@ -563,8 +563,8 @@ def populate_monthly_tag_cost_sql( # noqa: C901
563
563
cpu_case , memory_case , volume_case = case_dict .get ("cost" )
564
564
labels = case_dict .get ("labels" )
565
565
566
- if cost_type in ( "Node" , "Node_Core_Month" ) :
567
- sql = pkgutil .get_data ("masu.database" , "sql/openshift/cost_model/monthly_cost_node_by_tag .sql" )
566
+ if "Node" in cost_type :
567
+ sql = pkgutil .get_data ("masu.database" , "sql/openshift/cost_model/node_cost_by_tag .sql" )
568
568
elif cost_type == "PVC" :
569
569
sql = pkgutil .get_data (
570
570
"masu.database" , "sql/openshift/cost_model/monthly_cost_persistentvolumeclaim_by_tag.sql"
@@ -593,7 +593,7 @@ def populate_monthly_tag_cost_sql( # noqa: C901
593
593
sql_params ["unallocated_cost_model_memory_cost" ] = unallocated_memory_case
594
594
sql_params ["unallocated_cost_model_volume_cost" ] = unallocated_volume_case
595
595
596
- LOG .info (log_json (msg = "populating monthly tag costs" , context = ctx ))
596
+ LOG .info (log_json (msg = "populating tag costs" , context = ctx ))
597
597
self ._prepare_and_execute_raw_sql_query (table_name , sql , sql_params , operation = "INSERT" )
598
598
599
599
def populate_usage_costs (self , rate_type , rates , start_date , end_date , provider_uuid ):
0 commit comments