ominfra 0.0.0.dev315__py3-none-any.whl → 0.0.0.dev488__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/{.manifests.json → .omlish-manifests.json} +6 -6
- ominfra/__about__.py +5 -2
- ominfra/clouds/aws/auth.py +2 -1
- ominfra/clouds/aws/cli.py +3 -0
- ominfra/clouds/aws/dataclasses.py +4 -1
- ominfra/clouds/aws/instancetypes/cache.json.gz +0 -0
- ominfra/clouds/aws/instancetypes/cache.py +3 -0
- ominfra/clouds/aws/instancetypes/cli.py +4 -1
- ominfra/clouds/aws/journald2aws/cursor.py +9 -2
- ominfra/clouds/aws/journald2aws/driver.py +5 -2
- ominfra/clouds/aws/journald2aws/main.py +3 -0
- ominfra/clouds/aws/journald2aws/poster.py +9 -2
- ominfra/clouds/aws/logs.py +1 -1
- ominfra/clouds/aws/metadata.py +3 -0
- ominfra/clouds/aws/models/{base.py → base/__init__.py} +7 -2
- ominfra/clouds/aws/models/base/_dataclasses.py +721 -0
- ominfra/clouds/aws/models/gen/cli.py +2 -1
- ominfra/clouds/aws/models/gen/gen.py +16 -7
- ominfra/clouds/aws/models/services/{ec2.py → ec2/__init__.py} +438 -1
- ominfra/clouds/aws/models/services/ec2/_dataclasses.py +30654 -0
- ominfra/clouds/aws/models/services/{lambda_.py → lambda_/__init__.py} +139 -1
- ominfra/clouds/aws/models/services/lambda_/_dataclasses.py +4182 -0
- ominfra/clouds/aws/models/services/{rds.py → rds/__init__.py} +254 -78
- ominfra/clouds/aws/models/services/rds/_dataclasses.py +8231 -0
- ominfra/clouds/aws/models/services/{s3.py → s3/__init__.py} +19 -1
- ominfra/clouds/aws/models/services/s3/_dataclasses.py +5014 -0
- ominfra/clouds/gcp/auth.py +3 -0
- ominfra/commands/runners.py +2 -0
- ominfra/commands/ssh.py +3 -0
- ominfra/journald/genmessages.py +3 -0
- ominfra/journald/messages.py +8 -2
- ominfra/journald/tailer.py +17 -11
- ominfra/manage/bootstrap.py +4 -1
- ominfra/manage/bootstrap_.py +4 -1
- ominfra/manage/commands/base.py +8 -7
- ominfra/manage/commands/inject.py +1 -1
- ominfra/manage/commands/injection.py +4 -1
- ominfra/manage/commands/local.py +4 -1
- ominfra/manage/commands/marshal.py +3 -0
- ominfra/manage/commands/subprocess.py +43 -5
- ominfra/manage/commands/types.py +1 -1
- ominfra/manage/config.py +4 -1
- ominfra/manage/deploy/apps.py +4 -1
- ominfra/manage/deploy/commands.py +5 -2
- ominfra/manage/deploy/conf/inject.py +4 -1
- ominfra/manage/deploy/conf/manager.py +1 -1
- ominfra/manage/deploy/conf/specs.py +3 -3
- ominfra/manage/deploy/config.py +1 -1
- ominfra/manage/deploy/deploy.py +1 -1
- ominfra/manage/deploy/git.py +1 -1
- ominfra/manage/deploy/inject.py +1 -1
- ominfra/manage/deploy/injection.py +4 -1
- ominfra/manage/deploy/interp.py +1 -1
- ominfra/manage/deploy/nginx.py +4 -1
- ominfra/manage/deploy/paths/inject.py +4 -1
- ominfra/manage/deploy/paths/manager.py +4 -1
- ominfra/manage/deploy/paths/owners.py +7 -3
- ominfra/manage/deploy/paths/paths.py +5 -4
- ominfra/manage/deploy/paths/specs.py +4 -1
- ominfra/manage/deploy/paths/types.py +1 -1
- ominfra/manage/deploy/specs.py +1 -1
- ominfra/manage/deploy/systemd.py +4 -1
- ominfra/manage/deploy/tags.py +9 -9
- ominfra/manage/deploy/tmp.py +4 -1
- ominfra/manage/deploy/venvs.py +4 -1
- ominfra/manage/inject.py +3 -2
- ominfra/manage/main.py +10 -5
- ominfra/manage/marshal.py +3 -0
- ominfra/manage/remote/_main.py +6 -2
- ominfra/manage/remote/channel.py +3 -2
- ominfra/manage/remote/config.py +4 -1
- ominfra/manage/remote/connection.py +1 -1
- ominfra/manage/remote/execution.py +11 -7
- ominfra/manage/remote/inject.py +4 -1
- ominfra/manage/remote/payload.py +4 -1
- ominfra/manage/remote/spawning.py +3 -2
- ominfra/manage/system/commands.py +5 -2
- ominfra/manage/system/config.py +4 -1
- ominfra/manage/system/inject.py +4 -1
- ominfra/manage/system/packages.py +7 -3
- ominfra/manage/system/platforms.py +7 -4
- ominfra/manage/targets/bestpython.py +3 -0
- ominfra/manage/targets/bestpython.sh +1 -1
- ominfra/manage/targets/connection.py +3 -2
- ominfra/manage/targets/inject.py +4 -1
- ominfra/manage/targets/targets.py +6 -6
- ominfra/pyremote.py +10 -4
- ominfra/scripts/journald2aws.py +5086 -2409
- ominfra/scripts/manage.py +10770 -7455
- ominfra/scripts/supervisor.py +6823 -3829
- ominfra/supervisor/configs.py +7 -7
- ominfra/supervisor/dispatchers.py +4 -1
- ominfra/supervisor/dispatchersimpl.py +10 -4
- ominfra/supervisor/events.py +14 -7
- ominfra/supervisor/groups.py +4 -1
- ominfra/supervisor/groupsimpl.py +4 -1
- ominfra/supervisor/http.py +2 -2
- ominfra/supervisor/inject.py +4 -1
- ominfra/supervisor/io.py +5 -2
- ominfra/supervisor/main.py +4 -4
- ominfra/supervisor/pipes.py +4 -1
- ominfra/supervisor/privileges.py +4 -1
- ominfra/supervisor/process.py +1 -1
- ominfra/supervisor/processimpl.py +5 -2
- ominfra/supervisor/setup.py +5 -3
- ominfra/supervisor/setupimpl.py +5 -2
- ominfra/supervisor/signals.py +8 -2
- ominfra/supervisor/spawning.py +4 -1
- ominfra/supervisor/spawningimpl.py +1 -1
- ominfra/supervisor/supervisor.py +5 -2
- ominfra/supervisor/types.py +13 -9
- ominfra/supervisor/utils/collections.py +8 -3
- ominfra/supervisor/utils/diag.py +4 -1
- ominfra/supervisor/utils/fds.py +4 -1
- ominfra/supervisor/utils/fs.py +4 -1
- ominfra/supervisor/utils/os.py +4 -3
- ominfra/supervisor/utils/signals.py +1 -1
- ominfra/supervisor/utils/strings.py +2 -1
- ominfra/supervisor/utils/users.py +1 -1
- ominfra/systemd.py +1 -1
- ominfra/tailscale/api.py +3 -0
- ominfra/threadworkers.py +7 -3
- ominfra/tools/listresources.py +1 -1
- ominfra-0.0.0.dev488.dist-info/METADATA +54 -0
- ominfra-0.0.0.dev488.dist-info/RECORD +169 -0
- {ominfra-0.0.0.dev315.dist-info → ominfra-0.0.0.dev488.dist-info}/WHEEL +1 -1
- ominfra-0.0.0.dev315.dist-info/METADATA +0 -23
- ominfra-0.0.0.dev315.dist-info/RECORD +0 -164
- {ominfra-0.0.0.dev315.dist-info → ominfra-0.0.0.dev488.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev315.dist-info → ominfra-0.0.0.dev488.dist-info}/licenses/LICENSE +0 -0
- {ominfra-0.0.0.dev315.dist-info → ominfra-0.0.0.dev488.dist-info}/top_level.txt +0 -0
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"file": "ominfra/clouds/aws/__main__.py",
|
|
6
6
|
"line": 4,
|
|
7
7
|
"value": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
8
|
+
"!omdev.cli.types.CliModule": {
|
|
9
|
+
"name": "aws",
|
|
10
|
+
"module": "ominfra.clouds.aws.__main__"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
},
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"file": "ominfra/tailscale/cli.py",
|
|
18
18
|
"line": 118,
|
|
19
19
|
"value": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"!omdev.cli.types.CliModule": {
|
|
21
|
+
"name": [
|
|
22
22
|
"tailscale",
|
|
23
23
|
"ts"
|
|
24
24
|
],
|
|
25
|
-
"
|
|
25
|
+
"module": "ominfra.tailscale.cli"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
ominfra/__about__.py
CHANGED
|
@@ -8,13 +8,16 @@ class Project(ProjectBase):
|
|
|
8
8
|
description = 'ominfra'
|
|
9
9
|
|
|
10
10
|
dependencies = [
|
|
11
|
-
f'omdev == {__version__}',
|
|
12
11
|
f'omlish == {__version__}',
|
|
13
12
|
]
|
|
14
13
|
|
|
15
14
|
optional_dependencies = {
|
|
15
|
+
'omdev': [
|
|
16
|
+
f'omdev == {__version__}',
|
|
17
|
+
],
|
|
18
|
+
|
|
16
19
|
'ssh': [
|
|
17
|
-
'paramiko ~=
|
|
20
|
+
'paramiko ~= 4.0', # !! LGPL
|
|
18
21
|
|
|
19
22
|
'asyncssh ~= 2.21', # cffi
|
|
20
23
|
],
|
ominfra/clouds/aws/auth.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ruff: noqa: UP006 UP007
|
|
1
|
+
# ruff: noqa: UP006 UP007 UP045
|
|
2
2
|
# @omlish-lite
|
|
3
3
|
"""
|
|
4
4
|
https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html
|
|
@@ -31,6 +31,7 @@ class AwsSigner:
|
|
|
31
31
|
service_name: str,
|
|
32
32
|
) -> None:
|
|
33
33
|
super().__init__()
|
|
34
|
+
|
|
34
35
|
self._creds = creds
|
|
35
36
|
self._region_name = region_name
|
|
36
37
|
self._service_name = service_name
|
ominfra/clouds/aws/cli.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ruff: noqa: UP006 UP007
|
|
1
|
+
# ruff: noqa: UP006 UP007 UP045
|
|
2
2
|
# @omlish-lite
|
|
3
3
|
import collections.abc
|
|
4
4
|
import dataclasses as dc
|
|
@@ -11,6 +11,9 @@ from omlish.lite.reflect import is_optional_alias
|
|
|
11
11
|
from omlish.lite.strings import camel_case
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
##
|
|
15
|
+
|
|
16
|
+
|
|
14
17
|
class AwsDataclass:
|
|
15
18
|
class Raw(dict):
|
|
16
19
|
pass
|
|
Binary file
|
|
@@ -18,6 +18,9 @@ else:
|
|
|
18
18
|
boto3 = lang.proxy_import('boto3')
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
##
|
|
22
|
+
|
|
23
|
+
|
|
21
24
|
# Use a hardcoded gz mtime to prevent the gz file from changing when the contents don't. We still have the git metadata
|
|
22
25
|
# to track modifications.
|
|
23
26
|
FIXED_CACHE_TIMESTAMP = datetime.datetime(2025, 1, 1, tzinfo=datetime.UTC).timestamp()
|
|
@@ -28,7 +31,7 @@ def _get_secrets() -> sec.Secrets:
|
|
|
28
31
|
return load_secrets()
|
|
29
32
|
|
|
30
33
|
|
|
31
|
-
def get_ec2_instance_types(session: boto3.Session) -> dict[str, dict[str, ta.Any]]:
|
|
34
|
+
def get_ec2_instance_types(session: 'boto3.Session') -> dict[str, dict[str, ta.Any]]:
|
|
32
35
|
ec2 = session.client('ec2')
|
|
33
36
|
next_token = None
|
|
34
37
|
dct = {}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
# ruff: noqa: UP007
|
|
1
|
+
# ruff: noqa: UP007 UP045
|
|
2
2
|
import os.path
|
|
3
3
|
import typing as ta
|
|
4
4
|
|
|
5
|
-
from omlish.
|
|
5
|
+
from omlish.logs.modules import get_module_logger
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
log = get_module_logger(globals()) # noqa
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
##
|
|
6
12
|
|
|
7
13
|
|
|
8
14
|
class JournalctlToAwsCursor:
|
|
@@ -13,6 +19,7 @@ class JournalctlToAwsCursor:
|
|
|
13
19
|
ensure_locked: ta.Optional[ta.Callable[[], None]] = None,
|
|
14
20
|
) -> None:
|
|
15
21
|
super().__init__()
|
|
22
|
+
|
|
16
23
|
self._cursor_file = cursor_file
|
|
17
24
|
self._ensure_locked = ensure_locked
|
|
18
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ruff: noqa: UP007
|
|
1
|
+
# ruff: noqa: UP007 UP045
|
|
2
2
|
"""
|
|
3
3
|
TODO:
|
|
4
4
|
- create log group
|
|
@@ -40,8 +40,8 @@ import typing as ta
|
|
|
40
40
|
from omlish.lite.cached import cached_nullary
|
|
41
41
|
from omlish.lite.check import check
|
|
42
42
|
from omlish.lite.contextmanagers import ExitStacked
|
|
43
|
-
from omlish.lite.logs import log
|
|
44
43
|
from omlish.lite.runtime import is_debugger_attached
|
|
44
|
+
from omlish.logs.modules import get_module_logger
|
|
45
45
|
from omlish.os.pidfiles.pidfile import Pidfile
|
|
46
46
|
|
|
47
47
|
from ....journald.messages import JournalctlMessage # noqa
|
|
@@ -53,6 +53,9 @@ from .cursor import JournalctlToAwsCursor
|
|
|
53
53
|
from .poster import JournalctlToAwsPosterWorker
|
|
54
54
|
|
|
55
55
|
|
|
56
|
+
log = get_module_logger(globals()) # noqa
|
|
57
|
+
|
|
58
|
+
|
|
56
59
|
##
|
|
57
60
|
|
|
58
61
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ruff: noqa: UP007
|
|
1
|
+
# ruff: noqa: UP007 UP045
|
|
2
2
|
"""
|
|
3
3
|
TODO:
|
|
4
4
|
- retries
|
|
@@ -9,7 +9,7 @@ import time
|
|
|
9
9
|
import typing as ta
|
|
10
10
|
import urllib.request
|
|
11
11
|
|
|
12
|
-
from omlish.
|
|
12
|
+
from omlish.logs.modules import get_module_logger
|
|
13
13
|
|
|
14
14
|
from ....journald.messages import JournalctlMessage # noqa
|
|
15
15
|
from ....threadworkers import ThreadWorker
|
|
@@ -18,6 +18,12 @@ from ..logs import AwsPutLogEventsResponse
|
|
|
18
18
|
from .cursor import JournalctlToAwsCursor
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
log = get_module_logger(globals()) # noqa
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
##
|
|
25
|
+
|
|
26
|
+
|
|
21
27
|
class JournalctlToAwsPosterWorker(ThreadWorker):
|
|
22
28
|
def __init__(
|
|
23
29
|
self,
|
|
@@ -31,6 +37,7 @@ class JournalctlToAwsPosterWorker(ThreadWorker):
|
|
|
31
37
|
**kwargs: ta.Any,
|
|
32
38
|
) -> None:
|
|
33
39
|
super().__init__(**kwargs)
|
|
40
|
+
|
|
34
41
|
self._queue = queue
|
|
35
42
|
self._builder = builder
|
|
36
43
|
self._cursor = cursor
|
ominfra/clouds/aws/logs.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# @omlish-lite
|
|
2
|
-
# ruff: noqa: UP007
|
|
2
|
+
# ruff: noqa: UP007 UP045
|
|
3
3
|
"""
|
|
4
4
|
https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html :
|
|
5
5
|
- The maximum batch size is 1,048,576 bytes. This size is calculated as the sum of all event messages in UTF-8, plus 26
|
ominfra/clouds/aws/metadata.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import abc
|
|
2
1
|
import typing as ta
|
|
3
2
|
|
|
4
3
|
from omlish import cached
|
|
@@ -8,6 +7,12 @@ from omlish import dataclasses as dc
|
|
|
8
7
|
from omlish import lang
|
|
9
8
|
|
|
10
9
|
|
|
10
|
+
dc.init_package(
|
|
11
|
+
globals(),
|
|
12
|
+
codegen=True,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
11
16
|
DateTime = ta.NewType('DateTime', str)
|
|
12
17
|
MillisecondDateTime = ta.NewType('MillisecondDateTime', str)
|
|
13
18
|
|
|
@@ -29,7 +34,7 @@ TagList: ta.TypeAlias = ta.Sequence[Tag]
|
|
|
29
34
|
##
|
|
30
35
|
|
|
31
36
|
|
|
32
|
-
class ValueType(
|
|
37
|
+
class ValueType(lang.Abstract):
|
|
33
38
|
pass
|
|
34
39
|
|
|
35
40
|
|