Skip to content

Commit

Permalink
Merge pull request #20 from gikang82/master
Browse files Browse the repository at this point in the history
fix: update billing cost datasource
  • Loading branch information
gikang82 authored Jun 17, 2024
2 parents 94adcd9 + 45fb897 commit e41d86c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from cloudforet.cost_analysis.manager.data_source_manager import DataSourceManager
from cloudforet.cost_analysis.manager.job_manager import JobManager
from cloudforet.cost_analysis.manager.cost_manager import CostManager
from plugin.manager.data_source_manager import DataSourceManager
from plugin.manager.job_manager import JobManager
from plugin.manager.cost_manager import CostManager
3 changes: 1 addition & 2 deletions src/plugin/connector/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from cloudforet.cost_analysis.connector.bigquery_connector import BigqueryConnector
from cloudforet.cost_analysis.connector.cloud_billing_connector import CloudBillingConnector
from plugin.connector.bigquery_connector import BigqueryConnector
2 changes: 1 addition & 1 deletion src/plugin/connector/bigquery_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from googleapiclient.discovery import build

from spaceone.core.connector import BaseConnector
from cloudforet.cost_analysis.error import *
from plugin.error import *

_LOGGER = logging.getLogger(__name__)

Expand Down
1 change: 1 addition & 0 deletions src/plugin/error/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from plugin.error.cost import *
25 changes: 25 additions & 0 deletions src/plugin/error/cost.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from spaceone.core.error import *


class ERROR_INVALID_SECRET_TYPE(ERROR_INVALID_ARGUMENT):
_message = 'Invalid secret type: {secret_type}'


class ERROR_TOO_MANY_CSV_FILES(ERROR_UNKNOWN):
_message = 'Too many csv files: {target_dir}'


class ERROR_EXCHANGE_RATE_DATA_NOT_FOUND(ERROR_UNKNOWN):
_message = 'Exchange rate data not found'


class ERROR_NOT_FOUND_EXCHANGE_RATE(ERROR_UNKNOWN):
_message = 'Invalid exchange rate: {year}-{month}'


class ERROR_NOT_FOUND_TABLE(ERROR_UNKNOWN):
_message = 'Not found table: {table} / dataset: {dataset}'


class ERROR_NOT_EXIST_TARGET_PROJECT_ID(ERROR_INVALID_ARGUMENT):
_message = 'Not exist target_project_id: {target_project_id}'
6 changes: 3 additions & 3 deletions src/plugin/manager/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from cloudforet.cost_analysis.manager.data_source_manager import DataSourceManager
from cloudforet.cost_analysis.manager.job_manager import JobManager
from cloudforet.cost_analysis.manager.cost_manager import CostManager
from plugin.manager.data_source_manager import DataSourceManager
from plugin.manager.job_manager import JobManager
from plugin.manager.cost_manager import CostManager

0 comments on commit e41d86c

Please sign in to comment.