-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: modify plugin skeleton code for DataSourceAccount (#199)
- Loading branch information
Showing
6 changed files
with
36 additions
and
21 deletions.
There are no files selected for viewing
27 changes: 12 additions & 15 deletions
27
src/spaceone/cost_analysis/plugin/data_source/lib/server.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
from spaceone.core.pygrpc.server import GRPCServer | ||
from spaceone.core.plugin.server import PluginServer | ||
from spaceone.cost_analysis.plugin.data_source.interface.grpc import app | ||
from spaceone.cost_analysis.plugin.data_source.service.data_source_service import DataSourceService | ||
from spaceone.cost_analysis.plugin.data_source.service.data_source_service import ( | ||
DataSourceService, | ||
) | ||
from spaceone.cost_analysis.plugin.data_source.service.job_service import JobService | ||
from spaceone.cost_analysis.plugin.data_source.service.cost_service import CostService | ||
|
||
__all__ = ['DataSourcePluginServer'] | ||
__all__ = ["DataSourcePluginServer"] | ||
|
||
|
||
class DataSourcePluginServer(PluginServer): | ||
|
||
_grpc_app: GRPCServer = app | ||
_global_conf_path: str = 'spaceone.cost_analysis.plugin.data_source.conf.global_conf:global_conf' | ||
_global_conf_path: str = ( | ||
"spaceone.cost_analysis.plugin.data_source.conf.global_conf:global_conf" | ||
) | ||
_plugin_methods = { | ||
'DataSource': { | ||
'service': DataSourceService, | ||
'methods': ['init', 'verify'] | ||
}, | ||
'Job': { | ||
'service': JobService, | ||
'methods': ['get_tasks'] | ||
"DataSource": {"service": DataSourceService, "methods": ["init", "verify"]}, | ||
"Job": {"service": JobService, "methods": ["get_tasks"]}, | ||
"Cost": { | ||
"service": CostService, | ||
"methods": ["get_data", "get_linked_accounts"], | ||
}, | ||
'Cost': { | ||
'service': CostService, | ||
'methods': ['get_data'] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters