ominfra 0.0.0.dev243__py3-none-any.whl → 0.0.0.dev244__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ominfra/manage/main.py +2 -2
- ominfra/scripts/manage.py +30 -9
- {ominfra-0.0.0.dev243.dist-info → ominfra-0.0.0.dev244.dist-info}/METADATA +3 -3
- {ominfra-0.0.0.dev243.dist-info → ominfra-0.0.0.dev244.dist-info}/RECORD +8 -8
- {ominfra-0.0.0.dev243.dist-info → ominfra-0.0.0.dev244.dist-info}/LICENSE +0 -0
- {ominfra-0.0.0.dev243.dist-info → ominfra-0.0.0.dev244.dist-info}/WHEEL +0 -0
- {ominfra-0.0.0.dev243.dist-info → ominfra-0.0.0.dev244.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev243.dist-info → ominfra-0.0.0.dev244.dist-info}/top_level.txt +0 -0
ominfra/manage/main.py
CHANGED
@@ -11,7 +11,7 @@ import os.path
|
|
11
11
|
import sys
|
12
12
|
import typing as ta
|
13
13
|
|
14
|
-
from omdev.home.paths import
|
14
|
+
from omdev.home.paths import get_home_paths
|
15
15
|
from omlish.argparse.cli import ArgparseCli
|
16
16
|
from omlish.argparse.cli import argparse_arg
|
17
17
|
from omlish.argparse.cli import argparse_cmd
|
@@ -44,7 +44,7 @@ class MainCli(ArgparseCli):
|
|
44
44
|
@cached_nullary
|
45
45
|
def config(self) -> ManageConfig:
|
46
46
|
if (cf := self.config_file) is None:
|
47
|
-
cf = os.path.join(
|
47
|
+
cf = os.path.join(get_home_paths().config_dir, 'manage', 'manage.yml')
|
48
48
|
if not os.path.isfile(cf):
|
49
49
|
cf = None
|
50
50
|
|
ominfra/scripts/manage.py
CHANGED
@@ -173,20 +173,41 @@ def get_home_dir() -> str:
|
|
173
173
|
#
|
174
174
|
|
175
175
|
|
176
|
-
|
177
|
-
|
176
|
+
class HomePaths:
|
177
|
+
def __init__(self, home_dir: ta.Optional[str] = None) -> None:
|
178
|
+
super().__init__()
|
179
|
+
|
180
|
+
if home_dir is None:
|
181
|
+
home_dir = get_home_dir()
|
182
|
+
self._home_dir = home_dir
|
183
|
+
|
184
|
+
@property
|
185
|
+
def home_dir(self) -> str:
|
186
|
+
return self._home_dir
|
187
|
+
|
188
|
+
@property
|
189
|
+
def config_dir(self) -> str:
|
190
|
+
return os.path.join(self._home_dir, 'config')
|
178
191
|
|
192
|
+
@property
|
193
|
+
def log_dir(self) -> str:
|
194
|
+
return os.path.join(self._home_dir, 'log')
|
179
195
|
|
180
|
-
|
181
|
-
|
196
|
+
@property
|
197
|
+
def run_dir(self) -> str:
|
198
|
+
return os.path.join(self._home_dir, 'run')
|
182
199
|
|
200
|
+
@property
|
201
|
+
def shadow_dir(self) -> str:
|
202
|
+
return os.path.join(self._home_dir, 'shadow')
|
183
203
|
|
184
|
-
|
185
|
-
|
204
|
+
@property
|
205
|
+
def state_dir(self) -> str:
|
206
|
+
return os.path.join(self._home_dir, 'state')
|
186
207
|
|
187
208
|
|
188
|
-
def
|
189
|
-
return
|
209
|
+
def get_home_paths() -> HomePaths:
|
210
|
+
return HomePaths()
|
190
211
|
|
191
212
|
|
192
213
|
##
|
@@ -13526,7 +13547,7 @@ class MainCli(ArgparseCli):
|
|
13526
13547
|
@cached_nullary
|
13527
13548
|
def config(self) -> ManageConfig:
|
13528
13549
|
if (cf := self.config_file) is None:
|
13529
|
-
cf = os.path.join(
|
13550
|
+
cf = os.path.join(get_home_paths().config_dir, 'manage', 'manage.yml')
|
13530
13551
|
if not os.path.isfile(cf):
|
13531
13552
|
cf = None
|
13532
13553
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev244
|
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.dev244
|
16
|
+
Requires-Dist: omlish==0.0.0.dev244
|
17
17
|
Provides-Extra: all
|
18
18
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
19
19
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -52,7 +52,7 @@ ominfra/manage/bootstrap.py,sha256=1RIRhVkUZjxZcZerHMg8U6xgWhhemGgPN5cDye8dQ68,4
|
|
52
52
|
ominfra/manage/bootstrap_.py,sha256=B9UfR9J7mS3J54PFaSe1MQS5lCnKgxt5dDRJ9mnHYwg,656
|
53
53
|
ominfra/manage/config.py,sha256=1y2N_8nXHBZc6YbW6BaRZoDDCTBmiHuWtTOQ7zdr5VE,184
|
54
54
|
ominfra/manage/inject.py,sha256=_FVaMZUBKi-oObv14H77luWYCodxNJJD1t4pNQzckFE,2030
|
55
|
-
ominfra/manage/main.py,sha256=
|
55
|
+
ominfra/manage/main.py,sha256=jWraEP0l9YwjbLuPpnYUR2PTwIcKEpaHBUk2qYnkKO0,4447
|
56
56
|
ominfra/manage/marshal.py,sha256=WKj7IU9bo4fBMSSzT6ZMm_WFalXIJZ-V7j8oi92fNhk,305
|
57
57
|
ominfra/manage/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
58
58
|
ominfra/manage/commands/base.py,sha256=LtaI0AgnplttQK7gNncNItq8yuTZQimJTaprVpZktI8,3993
|
@@ -113,7 +113,7 @@ ominfra/manage/targets/inject.py,sha256=P4597xWM-V3I_gCt2O71OLhYQkkXtuJvkYRsIbhh
|
|
113
113
|
ominfra/manage/targets/targets.py,sha256=7GP6UAZyJFEhpkJN6UQdpr_WN3p7C76v-s445y-WB6U,1885
|
114
114
|
ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
115
115
|
ominfra/scripts/journald2aws.py,sha256=i1WBsTvVx8XetO_Kl0hGPHGDAFhPybyMBm60bvg_Hi8,167534
|
116
|
-
ominfra/scripts/manage.py,sha256=
|
116
|
+
ominfra/scripts/manage.py,sha256=2uU_QU9C6s1DiLz9wV_zLkfWNZZ91MZHiCIjuKLqDJw,378202
|
117
117
|
ominfra/scripts/supervisor.py,sha256=XQGNjIHFvyy7S5uv7bQ4hOne4hqWqny1SLcNlr1vX7w,296335
|
118
118
|
ominfra/supervisor/LICENSE.txt,sha256=ZrHY15PVR98y26Yg6iQfa-SXnUaYTDhrUsPVcEO5OKM,1874
|
119
119
|
ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
@@ -156,9 +156,9 @@ ominfra/tailscale/api.py,sha256=C5-t_b6jZXUWcy5k8bXm7CFnk73pSdrlMOgGDeGVrpw,1370
|
|
156
156
|
ominfra/tailscale/cli.py,sha256=3FnJbgpLw6gInTfhERd1mDy9ijjMUGxkdYVo43Tnxx4,3555
|
157
157
|
ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
158
|
ominfra/tools/listresources.py,sha256=auGP1LlbBJSFKUWNvQo_UzA8IsBNZBTMwEkFFRJ4FX4,6185
|
159
|
-
ominfra-0.0.0.
|
160
|
-
ominfra-0.0.0.
|
161
|
-
ominfra-0.0.0.
|
162
|
-
ominfra-0.0.0.
|
163
|
-
ominfra-0.0.0.
|
164
|
-
ominfra-0.0.0.
|
159
|
+
ominfra-0.0.0.dev244.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
160
|
+
ominfra-0.0.0.dev244.dist-info/METADATA,sha256=E34HYzv8JQRFxgXeUiuROpXUGG9EMn6KZfNKbUMGFkY,731
|
161
|
+
ominfra-0.0.0.dev244.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
162
|
+
ominfra-0.0.0.dev244.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
|
163
|
+
ominfra-0.0.0.dev244.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
|
164
|
+
ominfra-0.0.0.dev244.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|