ominfra 0.0.0.dev174__tar.gz → 0.0.0.dev175__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {ominfra-0.0.0.dev174/ominfra.egg-info → ominfra-0.0.0.dev175}/PKG-INFO +3 -3
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/conf.py +12 -6
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/paths/paths.py +2 -2
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/specs.py +3 -9
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/scripts/manage.py +16 -15
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175/ominfra.egg-info}/PKG-INFO +3 -3
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra.egg-info/requires.txt +2 -2
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/pyproject.toml +3 -3
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/LICENSE +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/MANIFEST.in +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/README.rst +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/.manifests.json +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/__about__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/__main__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/auth.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/cli.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/dataclasses.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/journald2aws/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/journald2aws/__main__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/journald2aws/cursor.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/journald2aws/driver.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/journald2aws/main.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/journald2aws/poster.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/logs.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/aws/metadata.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/gcp/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/clouds/gcp/auth.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/cmds.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/configs.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/journald/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/journald/fields.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/journald/genmessages.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/journald/messages.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/journald/tailer.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/__main__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/bootstrap.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/bootstrap_.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/commands/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/commands/base.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/commands/inject.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/commands/local.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/commands/marshal.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/commands/ping.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/commands/subprocess.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/commands/types.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/config.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/apps.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/commands.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/config.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/deploy.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/git.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/inject.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/interp.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/paths/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/paths/inject.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/paths/manager.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/paths/owners.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/paths/types.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/tags.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/tmp.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/types.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/deploy/venvs.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/inject.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/main.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/marshal.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/_main.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/channel.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/config.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/connection.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/execution.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/inject.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/payload.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/remote/spawning.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/system/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/system/commands.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/system/config.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/system/inject.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/system/packages.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/system/platforms.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/targets/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/targets/bestpython.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/targets/bestpython.sh +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/targets/connection.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/targets/inject.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/manage/targets/targets.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/pyremote.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/scripts/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/scripts/journald2aws.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/scripts/supervisor.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/ssh.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/LICENSE.txt +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/__main__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/configs.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/dispatchers.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/dispatchersimpl.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/events.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/exceptions.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/groups.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/groupsimpl.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/http.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/inject.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/io.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/main.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/pipes.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/privileges.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/process.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/processimpl.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/setup.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/setupimpl.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/signals.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/spawning.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/spawningimpl.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/states.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/supervisor.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/types.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/collections.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/diag.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/fds.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/fs.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/os.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/ostypes.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/signals.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/strings.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/supervisor/utils/users.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/tailscale/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/tailscale/api.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/tailscale/cli.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/threadworkers.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/tools/__init__.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra/tools/listresources.py +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra.egg-info/SOURCES.txt +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra.egg-info/dependency_links.txt +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra.egg-info/entry_points.txt +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/ominfra.egg-info/top_level.txt +0 -0
- {ominfra-0.0.0.dev174 → ominfra-0.0.0.dev175}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev175
|
4
4
|
Summary: ominfra
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,8 +12,8 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omdev==0.0.0.
|
16
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omdev==0.0.0.dev175
|
16
|
+
Requires-Dist: omlish==0.0.0.dev175
|
17
17
|
Provides-Extra: all
|
18
18
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
19
19
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -24,13 +24,12 @@ from omlish.os.paths import is_path_in_dir
|
|
24
24
|
from omlish.os.paths import relative_symlink
|
25
25
|
|
26
26
|
from .paths.paths import DeployPath
|
27
|
-
from .specs import AllActiveDeployAppConfLink
|
28
|
-
from .specs import CurrentOnlyDeployAppConfLink
|
29
27
|
from .specs import DeployAppConfFile
|
30
28
|
from .specs import DeployAppConfLink
|
31
29
|
from .specs import DeployAppConfSpec
|
32
30
|
from .tags import DEPLOY_TAG_SEPARATOR
|
33
31
|
from .tags import DeployApp
|
32
|
+
from .tags import DeployConf
|
34
33
|
from .tags import DeployTagMap
|
35
34
|
from .types import DeployHome
|
36
35
|
|
@@ -63,6 +62,7 @@ class DeployConfManager:
|
|
63
62
|
#
|
64
63
|
|
65
64
|
class _ComputedConfLink(ta.NamedTuple):
|
65
|
+
conf: DeployConf
|
66
66
|
is_dir: bool
|
67
67
|
link_src: str
|
68
68
|
link_dst: str
|
@@ -70,8 +70,9 @@ class DeployConfManager:
|
|
70
70
|
_UNIQUE_LINK_NAME_STR = '@app--@time--@app-key'
|
71
71
|
_UNIQUE_LINK_NAME = DeployPath.parse(_UNIQUE_LINK_NAME_STR)
|
72
72
|
|
73
|
+
@classmethod
|
73
74
|
def _compute_app_conf_link_dst(
|
74
|
-
|
75
|
+
cls,
|
75
76
|
link: DeployAppConfLink,
|
76
77
|
tags: DeployTagMap,
|
77
78
|
app_conf_dir: str,
|
@@ -85,6 +86,7 @@ class DeployConfManager:
|
|
85
86
|
if (is_dir := link.src.endswith('/')):
|
86
87
|
# @conf/ - links a directory in root of app conf dir to conf/@conf/@dst/
|
87
88
|
check.arg(link.src.count('/') == 1)
|
89
|
+
conf = DeployConf(link.src.split('/')[0])
|
88
90
|
link_dst_pfx = link.src
|
89
91
|
link_dst_sfx = ''
|
90
92
|
|
@@ -92,6 +94,7 @@ class DeployConfManager:
|
|
92
94
|
# @conf/file - links a single file in a single subdir to conf/@conf/@dst--file
|
93
95
|
d, f = os.path.split(link.src)
|
94
96
|
# TODO: check filename :|
|
97
|
+
conf = DeployConf(d)
|
95
98
|
link_dst_pfx = d + '/'
|
96
99
|
link_dst_sfx = DEPLOY_TAG_SEPARATOR + f
|
97
100
|
|
@@ -99,18 +102,20 @@ class DeployConfManager:
|
|
99
102
|
# @conf(.ext)* - links a single file in root of app conf dir to conf/@conf/@dst(.ext)*
|
100
103
|
if '.' in link.src:
|
101
104
|
l, _, r = link.src.partition('.')
|
105
|
+
conf = DeployConf(l)
|
102
106
|
link_dst_pfx = l + '/'
|
103
107
|
link_dst_sfx = '.' + r
|
104
108
|
else:
|
109
|
+
conf = DeployConf(link.src)
|
105
110
|
link_dst_pfx = link.src + '/'
|
106
111
|
link_dst_sfx = ''
|
107
112
|
|
108
113
|
#
|
109
114
|
|
110
|
-
if
|
115
|
+
if link.kind == 'current_only':
|
111
116
|
link_dst_mid = str(tags[DeployApp].s)
|
112
|
-
elif
|
113
|
-
link_dst_mid =
|
117
|
+
elif link.kind == 'all_active':
|
118
|
+
link_dst_mid = cls._UNIQUE_LINK_NAME.render(tags)
|
114
119
|
else:
|
115
120
|
raise TypeError(link)
|
116
121
|
|
@@ -124,6 +129,7 @@ class DeployConfManager:
|
|
124
129
|
link_dst = os.path.join(conf_link_dir, link_dst_name)
|
125
130
|
|
126
131
|
return DeployConfManager._ComputedConfLink(
|
132
|
+
conf=conf,
|
127
133
|
is_dir=is_dir,
|
128
134
|
link_src=link_src,
|
129
135
|
link_dst=link_dst,
|
@@ -170,7 +170,7 @@ class FileDeployPathPart(DeployPathPart):
|
|
170
170
|
return 'file'
|
171
171
|
|
172
172
|
|
173
|
-
|
173
|
+
##
|
174
174
|
|
175
175
|
|
176
176
|
@dc.dataclass(frozen=True)
|
@@ -197,7 +197,7 @@ class DeployPath:
|
|
197
197
|
return pd
|
198
198
|
|
199
199
|
@property
|
200
|
-
def kind(self) ->
|
200
|
+
def kind(self) -> DeployPathKind:
|
201
201
|
return self.parts[-1].kind
|
202
202
|
|
203
203
|
def render(self, tags: ta.Optional[DeployTagMap] = None) -> str:
|
@@ -95,7 +95,7 @@ class DeployAppConfFile:
|
|
95
95
|
|
96
96
|
|
97
97
|
@dc.dataclass(frozen=True)
|
98
|
-
class DeployAppConfLink
|
98
|
+
class DeployAppConfLink: # noqa
|
99
99
|
"""
|
100
100
|
May be either:
|
101
101
|
- @conf(.ext)* - links a single file in root of app conf dir to conf/@conf/@dst(.ext)*
|
@@ -105,20 +105,14 @@ class DeployAppConfLink(abc.ABC): # noqa
|
|
105
105
|
|
106
106
|
src: str
|
107
107
|
|
108
|
+
kind: ta.Literal['current_only', 'all_active'] = 'current_only'
|
109
|
+
|
108
110
|
def __post_init__(self) -> None:
|
109
111
|
check_valid_deploy_spec_path(self.src)
|
110
112
|
if '/' in self.src:
|
111
113
|
check.equal(self.src.count('/'), 1)
|
112
114
|
|
113
115
|
|
114
|
-
class CurrentOnlyDeployAppConfLink(DeployAppConfLink):
|
115
|
-
pass
|
116
|
-
|
117
|
-
|
118
|
-
class AllActiveDeployAppConfLink(DeployAppConfLink):
|
119
|
-
pass
|
120
|
-
|
121
|
-
|
122
116
|
#
|
123
117
|
|
124
118
|
|
@@ -7084,7 +7084,7 @@ class FileDeployPathPart(DeployPathPart):
|
|
7084
7084
|
return 'file'
|
7085
7085
|
|
7086
7086
|
|
7087
|
-
|
7087
|
+
##
|
7088
7088
|
|
7089
7089
|
|
7090
7090
|
@dc.dataclass(frozen=True)
|
@@ -7111,7 +7111,7 @@ class DeployPath:
|
|
7111
7111
|
return pd
|
7112
7112
|
|
7113
7113
|
@property
|
7114
|
-
def kind(self) ->
|
7114
|
+
def kind(self) -> DeployPathKind:
|
7115
7115
|
return self.parts[-1].kind
|
7116
7116
|
|
7117
7117
|
def render(self, tags: ta.Optional[DeployTagMap] = None) -> str:
|
@@ -7206,7 +7206,7 @@ class DeployAppConfFile:
|
|
7206
7206
|
|
7207
7207
|
|
7208
7208
|
@dc.dataclass(frozen=True)
|
7209
|
-
class DeployAppConfLink
|
7209
|
+
class DeployAppConfLink: # noqa
|
7210
7210
|
"""
|
7211
7211
|
May be either:
|
7212
7212
|
- @conf(.ext)* - links a single file in root of app conf dir to conf/@conf/@dst(.ext)*
|
@@ -7216,20 +7216,14 @@ class DeployAppConfLink(abc.ABC): # noqa
|
|
7216
7216
|
|
7217
7217
|
src: str
|
7218
7218
|
|
7219
|
+
kind: ta.Literal['current_only', 'all_active'] = 'current_only'
|
7220
|
+
|
7219
7221
|
def __post_init__(self) -> None:
|
7220
7222
|
check_valid_deploy_spec_path(self.src)
|
7221
7223
|
if '/' in self.src:
|
7222
7224
|
check.equal(self.src.count('/'), 1)
|
7223
7225
|
|
7224
7226
|
|
7225
|
-
class CurrentOnlyDeployAppConfLink(DeployAppConfLink):
|
7226
|
-
pass
|
7227
|
-
|
7228
|
-
|
7229
|
-
class AllActiveDeployAppConfLink(DeployAppConfLink):
|
7230
|
-
pass
|
7231
|
-
|
7232
|
-
|
7233
7227
|
#
|
7234
7228
|
|
7235
7229
|
|
@@ -7917,6 +7911,7 @@ class DeployConfManager:
|
|
7917
7911
|
#
|
7918
7912
|
|
7919
7913
|
class _ComputedConfLink(ta.NamedTuple):
|
7914
|
+
conf: DeployConf
|
7920
7915
|
is_dir: bool
|
7921
7916
|
link_src: str
|
7922
7917
|
link_dst: str
|
@@ -7924,8 +7919,9 @@ class DeployConfManager:
|
|
7924
7919
|
_UNIQUE_LINK_NAME_STR = '@app--@time--@app-key'
|
7925
7920
|
_UNIQUE_LINK_NAME = DeployPath.parse(_UNIQUE_LINK_NAME_STR)
|
7926
7921
|
|
7922
|
+
@classmethod
|
7927
7923
|
def _compute_app_conf_link_dst(
|
7928
|
-
|
7924
|
+
cls,
|
7929
7925
|
link: DeployAppConfLink,
|
7930
7926
|
tags: DeployTagMap,
|
7931
7927
|
app_conf_dir: str,
|
@@ -7939,6 +7935,7 @@ class DeployConfManager:
|
|
7939
7935
|
if (is_dir := link.src.endswith('/')):
|
7940
7936
|
# @conf/ - links a directory in root of app conf dir to conf/@conf/@dst/
|
7941
7937
|
check.arg(link.src.count('/') == 1)
|
7938
|
+
conf = DeployConf(link.src.split('/')[0])
|
7942
7939
|
link_dst_pfx = link.src
|
7943
7940
|
link_dst_sfx = ''
|
7944
7941
|
|
@@ -7946,6 +7943,7 @@ class DeployConfManager:
|
|
7946
7943
|
# @conf/file - links a single file in a single subdir to conf/@conf/@dst--file
|
7947
7944
|
d, f = os.path.split(link.src)
|
7948
7945
|
# TODO: check filename :|
|
7946
|
+
conf = DeployConf(d)
|
7949
7947
|
link_dst_pfx = d + '/'
|
7950
7948
|
link_dst_sfx = DEPLOY_TAG_SEPARATOR + f
|
7951
7949
|
|
@@ -7953,18 +7951,20 @@ class DeployConfManager:
|
|
7953
7951
|
# @conf(.ext)* - links a single file in root of app conf dir to conf/@conf/@dst(.ext)*
|
7954
7952
|
if '.' in link.src:
|
7955
7953
|
l, _, r = link.src.partition('.')
|
7954
|
+
conf = DeployConf(l)
|
7956
7955
|
link_dst_pfx = l + '/'
|
7957
7956
|
link_dst_sfx = '.' + r
|
7958
7957
|
else:
|
7958
|
+
conf = DeployConf(link.src)
|
7959
7959
|
link_dst_pfx = link.src + '/'
|
7960
7960
|
link_dst_sfx = ''
|
7961
7961
|
|
7962
7962
|
#
|
7963
7963
|
|
7964
|
-
if
|
7964
|
+
if link.kind == 'current_only':
|
7965
7965
|
link_dst_mid = str(tags[DeployApp].s)
|
7966
|
-
elif
|
7967
|
-
link_dst_mid =
|
7966
|
+
elif link.kind == 'all_active':
|
7967
|
+
link_dst_mid = cls._UNIQUE_LINK_NAME.render(tags)
|
7968
7968
|
else:
|
7969
7969
|
raise TypeError(link)
|
7970
7970
|
|
@@ -7978,6 +7978,7 @@ class DeployConfManager:
|
|
7978
7978
|
link_dst = os.path.join(conf_link_dir, link_dst_name)
|
7979
7979
|
|
7980
7980
|
return DeployConfManager._ComputedConfLink(
|
7981
|
+
conf=conf,
|
7981
7982
|
is_dir=is_dir,
|
7982
7983
|
link_src=link_src,
|
7983
7984
|
link_dst=link_dst,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev175
|
4
4
|
Summary: ominfra
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,8 +12,8 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omdev==0.0.0.
|
16
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omdev==0.0.0.dev175
|
16
|
+
Requires-Dist: omlish==0.0.0.dev175
|
17
17
|
Provides-Extra: all
|
18
18
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
19
19
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -12,7 +12,7 @@ authors = [
|
|
12
12
|
urls = {source = 'https://github.com/wrmsr/omlish'}
|
13
13
|
license = {text = 'BSD-3-Clause'}
|
14
14
|
requires-python = '>=3.12'
|
15
|
-
version = '0.0.0.
|
15
|
+
version = '0.0.0.dev175'
|
16
16
|
classifiers = [
|
17
17
|
'License :: OSI Approved :: BSD License',
|
18
18
|
'Development Status :: 2 - Pre-Alpha',
|
@@ -22,8 +22,8 @@ classifiers = [
|
|
22
22
|
]
|
23
23
|
description = 'ominfra'
|
24
24
|
dependencies = [
|
25
|
-
'omdev == 0.0.0.
|
26
|
-
'omlish == 0.0.0.
|
25
|
+
'omdev == 0.0.0.dev175',
|
26
|
+
'omlish == 0.0.0.dev175',
|
27
27
|
]
|
28
28
|
|
29
29
|
[project.optional-dependencies]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|