|
4 | 4 |
|
5 | 5 | from pyoaev.helpers import OpenAEVConfigHelper, OpenAEVInjectorHelper |
6 | 6 |
|
| 7 | +from aws.configuration.config_loader import ConfigLoader |
7 | 8 | from aws.contracts_aws import ( |
8 | 9 | CLOUDTRAIL_ENUM_CONTRACT, |
9 | 10 | COGNITO_ENUM_CONTRACT, |
|
32 | 33 | SNS_ENUM_CONTRACT, |
33 | 34 | SSM_ENUM_PARAMETERS_CONTRACT, |
34 | 35 | VPC_ENUM_CONTRACT, |
35 | | - AWSContracts, |
36 | 36 | ) |
37 | 37 | from aws.helpers.pacu_executor import PacuExecutor |
| 38 | +from injector_common.dump_config import intercept_dump_argument |
38 | 39 |
|
39 | 40 |
|
40 | 41 | class OpenAEVAWS: |
41 | 42 | def __init__(self): |
42 | | - self.config = OpenAEVConfigHelper( |
43 | | - __file__, |
44 | | - { |
45 | | - # API information |
46 | | - "openaev_url": {"env": "OPENAEV_URL", "file_path": ["openaev", "url"]}, |
47 | | - "openaev_token": { |
48 | | - "env": "OPENAEV_TOKEN", |
49 | | - "file_path": ["openaev", "token"], |
50 | | - }, |
51 | | - # Config information |
52 | | - "injector_id": {"env": "INJECTOR_ID", "file_path": ["injector", "id"]}, |
53 | | - "injector_name": { |
54 | | - "env": "INJECTOR_NAME", |
55 | | - "file_path": ["injector", "name"], |
56 | | - }, |
57 | | - "injector_type": { |
58 | | - "env": "INJECTOR_TYPE", |
59 | | - "file_path": ["injector", "type"], |
60 | | - "default": "openaev_aws", |
61 | | - }, |
62 | | - "injector_log_level": { |
63 | | - "env": "INJECTOR_LOG_LEVEL", |
64 | | - "file_path": ["injector", "log_level"], |
65 | | - "default": "error", |
66 | | - }, |
67 | | - "injector_contracts": {"data": AWSContracts.build_contract()}, |
68 | | - }, |
| 43 | + self.config = OpenAEVConfigHelper.from_configuration_object( |
| 44 | + ConfigLoader().to_daemon_config() |
69 | 45 | ) |
70 | | - |
| 46 | + intercept_dump_argument(self.config.get_config_obj()) |
71 | 47 | self.helper = OpenAEVInjectorHelper( |
72 | 48 | self.config, open("aws/img/icon-aws.png", "rb") |
73 | 49 | ) |
|
0 commit comments