ominfra 0.0.0.dev192__py3-none-any.whl → 0.0.0.dev194__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- ominfra/clouds/aws/journald2aws/main.py +5 -2
- ominfra/manage/deploy/conf/manager.py +4 -4
- ominfra/manage/deploy/conf/specs.py +2 -2
- ominfra/manage/main.py +3 -3
- ominfra/scripts/journald2aws.py +448 -122
- ominfra/scripts/manage.py +2019 -1700
- ominfra/scripts/supervisor.py +2113 -1742
- ominfra/supervisor/configs.py +4 -3
- ominfra/supervisor/main.py +2 -2
- {ominfra-0.0.0.dev192.dist-info → ominfra-0.0.0.dev194.dist-info}/METADATA +4 -4
- {ominfra-0.0.0.dev192.dist-info → ominfra-0.0.0.dev194.dist-info}/RECORD +15 -16
- ominfra/configs.py +0 -129
- {ominfra-0.0.0.dev192.dist-info → ominfra-0.0.0.dev194.dist-info}/LICENSE +0 -0
- {ominfra-0.0.0.dev192.dist-info → ominfra-0.0.0.dev194.dist-info}/WHEEL +0 -0
- {ominfra-0.0.0.dev192.dist-info → ominfra-0.0.0.dev194.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev192.dist-info → ominfra-0.0.0.dev194.dist-info}/top_level.txt +0 -0
@@ -5,9 +5,9 @@ import dataclasses as dc
|
|
5
5
|
import os.path
|
6
6
|
import sys
|
7
7
|
|
8
|
+
from omlish.lite.configs import load_config_file_obj
|
8
9
|
from omlish.logs.standard import configure_standard_logging
|
9
10
|
|
10
|
-
from ....configs import read_config_file
|
11
11
|
from .driver import JournalctlToAwsDriver
|
12
12
|
|
13
13
|
|
@@ -36,7 +36,10 @@ def _main() -> None:
|
|
36
36
|
|
37
37
|
config: JournalctlToAwsDriver.Config
|
38
38
|
if args.config_file:
|
39
|
-
config =
|
39
|
+
config = load_config_file_obj(
|
40
|
+
os.path.expanduser(args.config_file),
|
41
|
+
JournalctlToAwsDriver.Config,
|
42
|
+
)
|
40
43
|
else:
|
41
44
|
config = JournalctlToAwsDriver.Config()
|
42
45
|
|
@@ -26,10 +26,10 @@ from omlish.lite.json import json_dumps_pretty
|
|
26
26
|
from omlish.lite.strings import strip_with_newline
|
27
27
|
from omlish.os.paths import is_path_in_dir
|
28
28
|
from omlish.os.paths import relative_symlink
|
29
|
-
from
|
30
|
-
from
|
29
|
+
from omlish.configs.nginx import NginxConfigItems
|
30
|
+
from omlish.configs.nginx import render_nginx_config_str
|
31
31
|
|
32
|
-
from
|
32
|
+
from omlish.formats.ini.sections import render_ini_sections
|
33
33
|
from ..paths.paths import DeployPath
|
34
34
|
from ..tags import DEPLOY_TAG_SEPARATOR
|
35
35
|
from ..tags import DeployApp
|
@@ -100,7 +100,7 @@ class DeployConfManager:
|
|
100
100
|
|
101
101
|
elif isinstance(ac, IniDeployAppConfContent):
|
102
102
|
ini_sections = pcc(ac.sections)
|
103
|
-
return strip_with_newline(
|
103
|
+
return strip_with_newline(render_ini_sections(ini_sections))
|
104
104
|
|
105
105
|
elif isinstance(ac, NginxDeployAppConfContent):
|
106
106
|
nginx_items = NginxConfigItems.of(pcc(ac.items))
|
@@ -6,7 +6,7 @@ import typing as ta
|
|
6
6
|
from omlish.lite.check import check
|
7
7
|
from omlish.lite.marshal import register_single_field_type_obj_marshaler
|
8
8
|
|
9
|
-
from
|
9
|
+
from omlish.formats.ini.sections import IniSectionSettingsMap
|
10
10
|
from ..paths.specs import check_valid_deploy_spec_path
|
11
11
|
|
12
12
|
|
@@ -41,7 +41,7 @@ class JsonDeployAppConfContent(DeployAppConfContent):
|
|
41
41
|
@register_single_field_type_obj_marshaler('sections')
|
42
42
|
@dc.dataclass(frozen=True)
|
43
43
|
class IniDeployAppConfContent(DeployAppConfContent):
|
44
|
-
sections:
|
44
|
+
sections: IniSectionSettingsMap
|
45
45
|
|
46
46
|
|
47
47
|
#
|
ominfra/manage/main.py
CHANGED
@@ -17,12 +17,12 @@ from omlish.argparse.cli import argparse_arg
|
|
17
17
|
from omlish.argparse.cli import argparse_cmd
|
18
18
|
from omlish.lite.cached import cached_nullary
|
19
19
|
from omlish.lite.check import check
|
20
|
+
from omlish.lite.configs import load_config_file_obj
|
20
21
|
from omlish.lite.logs import log # noqa
|
21
22
|
from omlish.lite.marshal import ObjMarshalerManager
|
22
23
|
from omlish.lite.marshal import ObjMarshalOptions
|
23
24
|
from omlish.lite.pycharm import PycharmRemoteDebug
|
24
25
|
|
25
|
-
from ..configs import read_config_file
|
26
26
|
from .bootstrap import MainBootstrap
|
27
27
|
from .bootstrap_ import main_bootstrap
|
28
28
|
from .commands.base import Command
|
@@ -51,7 +51,7 @@ class MainCli(ArgparseCli):
|
|
51
51
|
if cf is None:
|
52
52
|
return ManageConfig()
|
53
53
|
else:
|
54
|
-
return
|
54
|
+
return load_config_file_obj(cf, ManageConfig)
|
55
55
|
|
56
56
|
#
|
57
57
|
|
@@ -122,7 +122,7 @@ class MainCli(ArgparseCli):
|
|
122
122
|
cmds.append(cmd)
|
123
123
|
|
124
124
|
for cf in self.args.command_file or []:
|
125
|
-
cmd =
|
125
|
+
cmd = load_config_file_obj(cf, Command, msh=msh)
|
126
126
|
cmds.append(cmd)
|
127
127
|
|
128
128
|
#
|