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

Changed the cloudability GSheet report name #816

Merged
merged 1 commit into from
Jul 31, 2024
Merged
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
1 change: 1 addition & 0 deletions cloud_governance/common/utils/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down