diff --git a/src/spaceone/cost_analysis/manager/data_source_rule_manager.py b/src/spaceone/cost_analysis/manager/data_source_rule_manager.py index cf15511..91b000b 100644 --- a/src/spaceone/cost_analysis/manager/data_source_rule_manager.py +++ b/src/spaceone/cost_analysis/manager/data_source_rule_manager.py @@ -138,7 +138,6 @@ def _change_cost_data_with_actions( workspace_id: str = None, ): for action, value in actions.items(): - if action == "match_workspace" and value: source = value["source"] target_key = value.get("target", "workspace_id") @@ -261,9 +260,9 @@ def _get_project( if total_count > 0: project_info = results[0] - self._project_info[f"project:{domain_id}:{target_key}:{target_value}"] = ( - project_info - ) + self._project_info[ + f"project:{domain_id}:{target_key}:{target_value}" + ] = project_info return project_info def _get_workspace( @@ -288,9 +287,9 @@ def _get_workspace( if total_count > 0: workspace_info = results[0] - self._workspace_info[f"workspace:{domain_id}:{target_key}:{target_value}"] = ( - workspace_info - ) + self._workspace_info[ + f"workspace:{domain_id}:{target_key}:{target_value}" + ] = workspace_info return workspace_info def _change_cost_data_by_rule( diff --git a/src/spaceone/cost_analysis/service/job_service.py b/src/spaceone/cost_analysis/service/job_service.py index 6acde63..c03da99 100644 --- a/src/spaceone/cost_analysis/service/job_service.py +++ b/src/spaceone/cost_analysis/service/job_service.py @@ -799,7 +799,7 @@ def _distinct_job_id( query["filter"].append({"k": "billed_month", "v": end, "o": "lte"}) _LOGGER.debug(f"[_distinct_job_id] query: {query}") - response = self.cost_mgr.stat_monthly_costs(query, domain_id) + response = self.cost_mgr.stat_costs(query, domain_id) values = response.get("results", []) _LOGGER.debug(f"[_distinct_job_id] job_ids: {values}")