From f16d2de522351a1c0dd4b3351b9263af6972d570 Mon Sep 17 00:00:00 2001 From: Thirumalesh Aaraveti <97395760+athiruma@users.noreply.github.com> Date: Thu, 1 Aug 2024 01:38:58 +0530 Subject: [PATCH] Changed the cloudability GSheet report name (#816) --- cloud_governance/common/utils/configs.py | 1 + .../policy/common_policies/cloudability_cost_reports.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cloud_governance/common/utils/configs.py b/cloud_governance/common/utils/configs.py index fe413ae8..ed408b2b 100644 --- a/cloud_governance/common/utils/configs.py +++ b/cloud_governance/common/utils/configs.py @@ -2,6 +2,7 @@ MONTHS = 12 DEFAULT_ROUND_DIGITS = 3 PUBLIC_ACCOUNTS_COST_REPORTS = 'Accounts' +IT_ACCOUNTS_COST_REPORTS_LIST = 'IT_ACCOUNTS' HOURS_IN_SECONDS = 3600 HOURS_IN_DAY = 24 HOURS_IN_MONTH = 720 diff --git a/cloud_governance/policy/common_policies/cloudability_cost_reports.py b/cloud_governance/policy/common_policies/cloudability_cost_reports.py index 006ef5d1..40b16935 100644 --- a/cloud_governance/policy/common_policies/cloudability_cost_reports.py +++ b/cloud_governance/policy/common_policies/cloudability_cost_reports.py @@ -5,7 +5,7 @@ from cloud_governance.common.google_drive.gcp_operations import GCPOperations from cloud_governance.common.logger.init_logger import logger from cloud_governance.common.utils.api_requests import APIRequests -from cloud_governance.common.utils.configs import LOOK_BACK_DAYS, PUBLIC_ACCOUNTS_COST_REPORTS, MONTHS, \ +from cloud_governance.common.utils.configs import LOOK_BACK_DAYS, IT_ACCOUNTS_COST_REPORTS_LIST, MONTHS, \ DEFAULT_ROUND_DIGITS, DATE_FORMAT from cloud_governance.common.utils.utils import Utils from cloud_governance.main.environment_variables import environment_variables @@ -90,7 +90,7 @@ def __get_analysed_reports(self): :return: :rtype: """ - accounts_reports_df = self.__gcp_operations.get_accounts_sheet(sheet_name=PUBLIC_ACCOUNTS_COST_REPORTS) + accounts_reports_df = self.__gcp_operations.get_accounts_sheet(sheet_name=IT_ACCOUNTS_COST_REPORTS_LIST) cost_centers = list(set(accounts_reports_df['CostCenter'].tolist())) custom_filter = '&'.join([f'filters=category4=={cost_center}' for cost_center in cost_centers]) cloudability_reports = self.__get_cost_reports(custom_filter=custom_filter)