ominfra 0.0.0.dev420__py3-none-any.whl → 0.0.0.dev422__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.
Files changed (42) hide show
  1. ominfra/clouds/aws/models/base.py +1 -2
  2. ominfra/clouds/aws/models/services/ec2.py +45 -0
  3. ominfra/clouds/aws/models/services/rds.py +10 -0
  4. ominfra/manage/commands/base.py +5 -4
  5. ominfra/manage/deploy/conf/specs.py +2 -2
  6. ominfra/manage/deploy/paths/owners.py +3 -2
  7. ominfra/manage/deploy/paths/paths.py +4 -3
  8. ominfra/manage/deploy/tags.py +8 -8
  9. ominfra/manage/inject.py +2 -1
  10. ominfra/manage/remote/channel.py +2 -1
  11. ominfra/manage/remote/execution.py +4 -4
  12. ominfra/manage/remote/spawning.py +2 -1
  13. ominfra/manage/system/packages.py +2 -1
  14. ominfra/manage/system/platforms.py +3 -3
  15. ominfra/manage/targets/connection.py +2 -1
  16. ominfra/manage/targets/targets.py +5 -5
  17. ominfra/scripts/journald2aws.py +436 -133
  18. ominfra/scripts/manage.py +2957 -2655
  19. ominfra/scripts/supervisor.py +2806 -2468
  20. ominfra/supervisor/dispatchers.py +3 -0
  21. ominfra/supervisor/dispatchersimpl.py +5 -2
  22. ominfra/supervisor/events.py +6 -6
  23. ominfra/supervisor/groups.py +3 -0
  24. ominfra/supervisor/groupsimpl.py +3 -0
  25. ominfra/supervisor/inject.py +3 -0
  26. ominfra/supervisor/pipes.py +3 -0
  27. ominfra/supervisor/privileges.py +3 -0
  28. ominfra/supervisor/setup.py +4 -2
  29. ominfra/supervisor/signals.py +3 -0
  30. ominfra/supervisor/spawning.py +3 -0
  31. ominfra/supervisor/types.py +9 -8
  32. ominfra/supervisor/utils/collections.py +7 -2
  33. ominfra/supervisor/utils/diag.py +3 -0
  34. ominfra/supervisor/utils/fds.py +3 -0
  35. ominfra/supervisor/utils/fs.py +3 -0
  36. ominfra/threadworkers.py +2 -1
  37. {ominfra-0.0.0.dev420.dist-info → ominfra-0.0.0.dev422.dist-info}/METADATA +3 -3
  38. {ominfra-0.0.0.dev420.dist-info → ominfra-0.0.0.dev422.dist-info}/RECORD +42 -42
  39. {ominfra-0.0.0.dev420.dist-info → ominfra-0.0.0.dev422.dist-info}/WHEEL +0 -0
  40. {ominfra-0.0.0.dev420.dist-info → ominfra-0.0.0.dev422.dist-info}/entry_points.txt +0 -0
  41. {ominfra-0.0.0.dev420.dist-info → ominfra-0.0.0.dev422.dist-info}/licenses/LICENSE +0 -0
  42. {ominfra-0.0.0.dev420.dist-info → ominfra-0.0.0.dev422.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,3 @@
1
- import abc
2
1
  import typing as ta
3
2
 
4
3
  from omlish import cached
@@ -29,7 +28,7 @@ TagList: ta.TypeAlias = ta.Sequence[Tag]
29
28
  ##
30
29
 
31
30
 
32
- class ValueType(abc.ABC): # noqa
31
+ class ValueType(lang.Abstract):
33
32
  pass
34
33
 
35
34
 
@@ -37,6 +37,11 @@ class ArchitectureValues(_enum.Enum):
37
37
  ARM64_MAC = 'arm64_mac'
38
38
 
39
39
 
40
+ class AttachmentLimitType(_enum.Enum):
41
+ SHARED = 'shared'
42
+ DEDICATED = 'dedicated'
43
+
44
+
40
45
  class AttachmentStatus(_enum.Enum):
41
46
  ATTACHING = 'attaching'
42
47
  ATTACHED = 'attached'
@@ -1297,6 +1302,32 @@ class InstanceType(_enum.Enum):
1297
1302
  C8GN_METAL_48XL = 'c8gn.metal-48xl'
1298
1303
  F2_6XLARGE = 'f2.6xlarge'
1299
1304
  P6E_GB200_36XLARGE = 'p6e-gb200.36xlarge'
1305
+ G6F_LARGE = 'g6f.large'
1306
+ G6F_XLARGE = 'g6f.xlarge'
1307
+ G6F_2XLARGE = 'g6f.2xlarge'
1308
+ G6F_4XLARGE = 'g6f.4xlarge'
1309
+ GR6F_4XLARGE = 'gr6f.4xlarge'
1310
+ P5_4XLARGE = 'p5.4xlarge'
1311
+ R8I_LARGE = 'r8i.large'
1312
+ R8I_XLARGE = 'r8i.xlarge'
1313
+ R8I_2XLARGE = 'r8i.2xlarge'
1314
+ R8I_4XLARGE = 'r8i.4xlarge'
1315
+ R8I_8XLARGE = 'r8i.8xlarge'
1316
+ R8I_12XLARGE = 'r8i.12xlarge'
1317
+ R8I_16XLARGE = 'r8i.16xlarge'
1318
+ R8I_24XLARGE = 'r8i.24xlarge'
1319
+ R8I_32XLARGE = 'r8i.32xlarge'
1320
+ R8I_48XLARGE = 'r8i.48xlarge'
1321
+ R8I_96XLARGE = 'r8i.96xlarge'
1322
+ R8I_METAL_48XL = 'r8i.metal-48xl'
1323
+ R8I_METAL_96XL = 'r8i.metal-96xl'
1324
+ R8I_FLEX_LARGE = 'r8i-flex.large'
1325
+ R8I_FLEX_XLARGE = 'r8i-flex.xlarge'
1326
+ R8I_FLEX_2XLARGE = 'r8i-flex.2xlarge'
1327
+ R8I_FLEX_4XLARGE = 'r8i-flex.4xlarge'
1328
+ R8I_FLEX_8XLARGE = 'r8i-flex.8xlarge'
1329
+ R8I_FLEX_12XLARGE = 'r8i-flex.12xlarge'
1330
+ R8I_FLEX_16XLARGE = 'r8i-flex.16xlarge'
1300
1331
 
1301
1332
 
1302
1333
  class InstanceTypeHypervisor(_enum.Enum):
@@ -1350,6 +1381,8 @@ MaxNetworkInterfaces = _ta.NewType('MaxNetworkInterfaces', int)
1350
1381
 
1351
1382
  MaximumBandwidthInMbps = _ta.NewType('MaximumBandwidthInMbps', int)
1352
1383
 
1384
+ MaximumEbsAttachments = _ta.NewType('MaximumEbsAttachments', int)
1385
+
1353
1386
  MaximumEfaInterfaces = _ta.NewType('MaximumEfaInterfaces', int)
1354
1387
 
1355
1388
  MaximumEnaQueueCount = _ta.NewType('MaximumEnaQueueCount', int)
@@ -4066,6 +4099,18 @@ class EbsInfo(
4066
4099
  shape_name='EbsNvmeSupport',
4067
4100
  ))
4068
4101
 
4102
+ maximum_ebs_attachments: MaximumEbsAttachments | None = _dc.field(default=None, metadata=_base.field_metadata(
4103
+ member_name='MaximumEbsAttachments',
4104
+ serialization_name='maximumEbsAttachments',
4105
+ shape_name='MaximumEbsAttachments',
4106
+ ))
4107
+
4108
+ attachment_limit_type: AttachmentLimitType | None = _dc.field(default=None, metadata=_base.field_metadata(
4109
+ member_name='AttachmentLimitType',
4110
+ serialization_name='attachmentLimitType',
4111
+ shape_name='AttachmentLimitType',
4112
+ ))
4113
+
4069
4114
 
4070
4115
  @_dc.dataclass(frozen=True, kw_only=True)
4071
4116
  class EbsInstanceBlockDevice(
@@ -208,6 +208,11 @@ class KMSKeyNotAccessibleFault(
208
208
  pass
209
209
 
210
210
 
211
+ class MasterUserAuthenticationType(_enum.Enum):
212
+ PASSWORD = 'password'
213
+ IAM_DB_AUTH = 'iam-db-auth'
214
+
215
+
211
216
  @_dc.dataclass(frozen=True, kw_only=True)
212
217
  class NetworkTypeNotSupported(
213
218
  _base.Shape,
@@ -1031,6 +1036,11 @@ class CreateDBInstanceMessage(
1031
1036
  shape_name='String',
1032
1037
  ))
1033
1038
 
1039
+ master_user_authentication_type: MasterUserAuthenticationType | None = _dc.field(default=None, metadata=_base.field_metadata(
1040
+ member_name='MasterUserAuthenticationType',
1041
+ shape_name='MasterUserAuthenticationType',
1042
+ ))
1043
+
1034
1044
 
1035
1045
  DomainMembershipList: _ta.TypeAlias = _ta.Sequence[DomainMembership]
1036
1046
 
@@ -5,6 +5,7 @@ import logging
5
5
  import traceback
6
6
  import typing as ta
7
7
 
8
+ from omlish.lite.abstract import Abstract
8
9
  from omlish.lite.check import check
9
10
  from omlish.lite.strings import snake_case
10
11
 
@@ -17,9 +18,9 @@ CommandOutputT = ta.TypeVar('CommandOutputT', bound='Command.Output')
17
18
 
18
19
 
19
20
  @dc.dataclass(frozen=True)
20
- class Command(abc.ABC, ta.Generic[CommandOutputT]):
21
+ class Command(Abstract, ta.Generic[CommandOutputT]):
21
22
  @dc.dataclass(frozen=True)
22
- class Output(abc.ABC): # noqa
23
+ class Output(Abstract):
23
24
  pass
24
25
 
25
26
  @ta.final
@@ -65,7 +66,7 @@ class CommandException:
65
66
  )
66
67
 
67
68
 
68
- class CommandOutputOrException(abc.ABC, ta.Generic[CommandOutputT]):
69
+ class CommandOutputOrException(Abstract, ta.Generic[CommandOutputT]):
69
70
  @property
70
71
  @abc.abstractmethod
71
72
  def output(self) -> ta.Optional[CommandOutputT]:
@@ -83,7 +84,7 @@ class CommandOutputOrExceptionData(CommandOutputOrException):
83
84
  exception: ta.Optional[CommandException] = None
84
85
 
85
86
 
86
- class CommandExecutor(abc.ABC, ta.Generic[CommandT, CommandOutputT]):
87
+ class CommandExecutor(Abstract, ta.Generic[CommandT, CommandOutputT]):
87
88
  @abc.abstractmethod
88
89
  def execute(self, cmd: CommandT) -> ta.Awaitable[CommandOutputT]:
89
90
  raise NotImplementedError
@@ -1,9 +1,9 @@
1
1
  # ruff: noqa: UP006 UP007 UP045
2
- import abc
3
2
  import dataclasses as dc
4
3
  import typing as ta
5
4
 
6
5
  from omlish.formats.ini.sections import IniSectionSettingsMap
6
+ from omlish.lite.abstract import Abstract
7
7
  from omlish.lite.check import check
8
8
  from omlish.lite.marshal import register_single_field_type_obj_marshaler
9
9
 
@@ -13,7 +13,7 @@ from ..paths.specs import check_valid_deploy_spec_path
13
13
  ##
14
14
 
15
15
 
16
- class DeployAppConfContent(abc.ABC): # noqa
16
+ class DeployAppConfContent(Abstract):
17
17
  pass
18
18
 
19
19
 
@@ -3,6 +3,7 @@ import abc
3
3
  import os.path
4
4
  import typing as ta
5
5
 
6
+ from omlish.lite.abstract import Abstract
6
7
  from omlish.lite.check import check
7
8
 
8
9
  from ..types import DeployHome
@@ -12,7 +13,7 @@ from .paths import DeployPath
12
13
  ##
13
14
 
14
15
 
15
- class DeployPathOwner(abc.ABC):
16
+ class DeployPathOwner(Abstract):
16
17
  @abc.abstractmethod
17
18
  def get_owned_deploy_paths(self) -> ta.AbstractSet[DeployPath]:
18
19
  raise NotImplementedError
@@ -21,7 +22,7 @@ class DeployPathOwner(abc.ABC):
21
22
  DeployPathOwners = ta.NewType('DeployPathOwners', ta.Sequence[DeployPathOwner])
22
23
 
23
24
 
24
- class SingleDirDeployPathOwner(DeployPathOwner, abc.ABC):
25
+ class SingleDirDeployPathOwner(DeployPathOwner, Abstract):
25
26
  def __init__(
26
27
  self,
27
28
  *args: ta.Any,
@@ -13,6 +13,7 @@ import dataclasses as dc
13
13
  import itertools
14
14
  import typing as ta
15
15
 
16
+ from omlish.lite.abstract import Abstract
16
17
  from omlish.lite.cached import cached_nullary
17
18
  from omlish.lite.check import check
18
19
  from omlish.lite.strings import split_keep_delimiter
@@ -32,7 +33,7 @@ class DeployPathError(Exception):
32
33
  pass
33
34
 
34
35
 
35
- class DeployPathRenderable(abc.ABC):
36
+ class DeployPathRenderable(Abstract):
36
37
  @cached_nullary
37
38
  def __str__(self) -> str:
38
39
  return self.render(None)
@@ -45,7 +46,7 @@ class DeployPathRenderable(abc.ABC):
45
46
  ##
46
47
 
47
48
 
48
- class DeployPathNamePart(DeployPathRenderable, abc.ABC):
49
+ class DeployPathNamePart(DeployPathRenderable, Abstract):
49
50
  @classmethod
50
51
  def parse(cls, s: str) -> 'DeployPathNamePart':
51
52
  check.non_empty_str(s)
@@ -137,7 +138,7 @@ class DeployPathName(DeployPathRenderable):
137
138
 
138
139
 
139
140
  @dc.dataclass(frozen=True)
140
- class DeployPathPart(DeployPathRenderable, abc.ABC): # noqa
141
+ class DeployPathPart(DeployPathRenderable, Abstract):
141
142
  name: DeployPathName
142
143
 
143
144
  @property
@@ -1,8 +1,8 @@
1
1
  # ruff: noqa: UP006 UP007 UP045
2
- import abc
3
2
  import dataclasses as dc
4
3
  import typing as ta
5
4
 
5
+ from omlish.lite.abstract import Abstract
6
6
  from omlish.lite.check import check
7
7
  from omlish.lite.marshal import register_single_field_type_obj_marshaler
8
8
 
@@ -30,11 +30,11 @@ DEPLOY_TAG_ILLEGAL_STRS: ta.AbstractSet[str] = frozenset([
30
30
 
31
31
 
32
32
  @dc.dataclass(frozen=True, order=True)
33
- class DeployTag(abc.ABC): # noqa
33
+ class DeployTag(Abstract):
34
34
  s: str
35
35
 
36
36
  def __post_init__(self) -> None:
37
- check.not_in(abc.ABC, type(self).__bases__)
37
+ check.not_in(Abstract, type(self).__bases__)
38
38
  check.non_empty_str(self.s)
39
39
  for ch in DEPLOY_TAG_ILLEGAL_STRS:
40
40
  check.state(ch not in self.s)
@@ -47,12 +47,12 @@ class DeployTag(abc.ABC): # noqa
47
47
  def __init_subclass__(cls, **kwargs: ta.Any) -> None:
48
48
  super().__init_subclass__(**kwargs)
49
49
 
50
- if abc.ABC in cls.__bases__:
50
+ if Abstract in cls.__bases__:
51
51
  return
52
52
 
53
53
  for b in cls.__bases__:
54
54
  if issubclass(b, DeployTag):
55
- check.in_(abc.ABC, b.__bases__)
55
+ check.in_(Abstract, b.__bases__)
56
56
 
57
57
  check.non_empty_str(tn := cls.tag_name)
58
58
  check.equal(tn, tn.lower().strip())
@@ -99,7 +99,7 @@ class DeployTime(DeployTag):
99
99
  ##
100
100
 
101
101
 
102
- class NameDeployTag(DeployTag, abc.ABC): # noqa
102
+ class NameDeployTag(DeployTag, Abstract):
103
103
  pass
104
104
 
105
105
 
@@ -116,7 +116,7 @@ class DeployConf(NameDeployTag):
116
116
  ##
117
117
 
118
118
 
119
- class KeyDeployTag(DeployTag, abc.ABC): # noqa
119
+ class KeyDeployTag(DeployTag, Abstract):
120
120
  pass
121
121
 
122
122
 
@@ -133,7 +133,7 @@ class DeployAppKey(KeyDeployTag):
133
133
  ##
134
134
 
135
135
 
136
- class RevDeployTag(DeployTag, abc.ABC): # noqa
136
+ class RevDeployTag(DeployTag, Abstract):
137
137
  pass
138
138
 
139
139
 
ominfra/manage/inject.py CHANGED
@@ -5,6 +5,7 @@ from omlish.lite.inject import InjectorBindingOrBindings
5
5
  from omlish.lite.inject import InjectorBindings
6
6
  from omlish.lite.inject import inj
7
7
  from omlish.lite.marshal import ObjMarshalerManager
8
+ from omlish.lite.marshal import new_obj_marshaler_manager
8
9
 
9
10
  from .bootstrap import MainBootstrap
10
11
  from .commands.inject import bind_commands
@@ -63,7 +64,7 @@ def bind_main(
63
64
  #
64
65
 
65
66
  def build_obj_marshaler_manager(insts: ObjMarshalerInstallers) -> ObjMarshalerManager:
66
- msh = ObjMarshalerManager()
67
+ msh = new_obj_marshaler_manager()
67
68
  inst: ObjMarshalerInstaller
68
69
  for inst in insts:
69
70
  inst.fn(msh)
@@ -5,6 +5,7 @@ import json
5
5
  import struct
6
6
  import typing as ta
7
7
 
8
+ from omlish.lite.abstract import Abstract
8
9
  from omlish.lite.json import json_dumps_compact
9
10
  from omlish.lite.marshal import OBJ_MARSHALER_MANAGER
10
11
  from omlish.lite.marshal import ObjMarshalerManager
@@ -16,7 +17,7 @@ T = ta.TypeVar('T')
16
17
  ##
17
18
 
18
19
 
19
- class RemoteChannel(abc.ABC):
20
+ class RemoteChannel(Abstract):
20
21
  @abc.abstractmethod
21
22
  def send_obj(self, o: ta.Any, ty: ta.Any = None) -> ta.Awaitable[None]:
22
23
  raise NotImplementedError
@@ -3,7 +3,6 @@
3
3
  TODO:
4
4
  - sequence all messages
5
5
  """
6
- import abc
7
6
  import asyncio
8
7
  import dataclasses as dc
9
8
  import itertools
@@ -11,6 +10,7 @@ import logging
11
10
  import time
12
11
  import typing as ta
13
12
 
13
+ from omlish.lite.abstract import Abstract
14
14
  from omlish.lite.check import check
15
15
  from omlish.lite.logs import log
16
16
 
@@ -29,7 +29,7 @@ T = ta.TypeVar('T')
29
29
 
30
30
 
31
31
  class _RemoteProtocol:
32
- class Message(abc.ABC): # noqa
32
+ class Message(Abstract):
33
33
  async def send(self, chan: RemoteChannel) -> None:
34
34
  await chan.send_obj(self, _RemoteProtocol.Message)
35
35
 
@@ -39,7 +39,7 @@ class _RemoteProtocol:
39
39
 
40
40
  #
41
41
 
42
- class Request(Message, abc.ABC): # noqa
42
+ class Request(Message, Abstract):
43
43
  pass
44
44
 
45
45
  @dc.dataclass(frozen=True)
@@ -53,7 +53,7 @@ class _RemoteProtocol:
53
53
 
54
54
  #
55
55
 
56
- class Response(Message, abc.ABC): # noqa
56
+ class Response(Message, Abstract):
57
57
  pass
58
58
 
59
59
  @dc.dataclass(frozen=True)
@@ -8,6 +8,7 @@ import subprocess
8
8
  import typing as ta
9
9
 
10
10
  from omlish.asyncs.asyncio.subprocesses import asyncio_subprocesses
11
+ from omlish.lite.abstract import Abstract
11
12
  from omlish.lite.check import check
12
13
  from omlish.shlex import shlex_maybe_quote
13
14
  from omlish.subprocesses.base import SUBPROCESS_CHANNEL_OPTION_VALUES
@@ -17,7 +18,7 @@ from omlish.subprocesses.base import SubprocessChannelOption
17
18
  ##
18
19
 
19
20
 
20
- class RemoteSpawning(abc.ABC):
21
+ class RemoteSpawning(Abstract):
21
22
  @dc.dataclass(frozen=True)
22
23
  class Target:
23
24
  shell: ta.Optional[str] = None
@@ -10,6 +10,7 @@ import os
10
10
  import typing as ta
11
11
 
12
12
  from omlish.asyncs.asyncio.subprocesses import asyncio_subprocesses
13
+ from omlish.lite.abstract import Abstract
13
14
  from omlish.lite.check import check
14
15
 
15
16
 
@@ -25,7 +26,7 @@ class SystemPackage:
25
26
  version: ta.Optional[str] = None
26
27
 
27
28
 
28
- class SystemPackageManager(abc.ABC):
29
+ class SystemPackageManager(Abstract):
29
30
  @abc.abstractmethod
30
31
  def update(self) -> ta.Awaitable[None]:
31
32
  raise NotImplementedError
@@ -1,7 +1,7 @@
1
- import abc
2
1
  import dataclasses as dc
3
2
  import sys
4
3
 
4
+ from omlish.lite.abstract import Abstract
5
5
  from omlish.lite.cached import cached_nullary
6
6
  from omlish.lite.logs import log
7
7
  from omlish.os.linux import LinuxOsRelease
@@ -11,11 +11,11 @@ from omlish.os.linux import LinuxOsRelease
11
11
 
12
12
 
13
13
  @dc.dataclass(frozen=True)
14
- class Platform(abc.ABC): # noqa
14
+ class Platform(Abstract):
15
15
  pass
16
16
 
17
17
 
18
- class LinuxPlatform(Platform, abc.ABC):
18
+ class LinuxPlatform(Platform, Abstract):
19
19
  pass
20
20
 
21
21
 
@@ -4,6 +4,7 @@ import contextlib
4
4
  import dataclasses as dc
5
5
  import typing as ta
6
6
 
7
+ from omlish.lite.abstract import Abstract
7
8
  from omlish.lite.check import check
8
9
 
9
10
  from ..bootstrap import MainBootstrap
@@ -24,7 +25,7 @@ from .targets import SubprocessManageTarget
24
25
  ##
25
26
 
26
27
 
27
- class ManageTargetConnector(abc.ABC):
28
+ class ManageTargetConnector(Abstract):
28
29
  @abc.abstractmethod
29
30
  def connect(self, tgt: ManageTarget) -> ta.AsyncContextManager[CommandExecutor]:
30
31
  raise NotImplementedError
@@ -3,18 +3,18 @@
3
3
  It's desugaring. Subprocess and locals are only leafs. Retain an origin?
4
4
  ** TWO LAYERS ** - ManageTarget is user-facing, ConnectorTarget is bound, internal
5
5
  """
6
- import abc
7
6
  import dataclasses as dc
8
7
  import enum
9
8
  import typing as ta
10
9
 
10
+ from omlish.lite.abstract import Abstract
11
11
  from omlish.lite.check import check
12
12
 
13
13
 
14
14
  ##
15
15
 
16
16
 
17
- class ManageTarget(abc.ABC): # noqa
17
+ class ManageTarget(Abstract):
18
18
  def __init_subclass__(cls, **kwargs: ta.Any) -> None:
19
19
  super().__init_subclass__(**kwargs)
20
20
 
@@ -36,15 +36,15 @@ class PythonRemoteManageTarget:
36
36
  #
37
37
 
38
38
 
39
- class RemoteManageTarget(ManageTarget, abc.ABC):
39
+ class RemoteManageTarget(ManageTarget, Abstract):
40
40
  pass
41
41
 
42
42
 
43
- class PhysicallyRemoteManageTarget(RemoteManageTarget, abc.ABC):
43
+ class PhysicallyRemoteManageTarget(RemoteManageTarget, Abstract):
44
44
  pass
45
45
 
46
46
 
47
- class LocalManageTarget(ManageTarget, abc.ABC):
47
+ class LocalManageTarget(ManageTarget, Abstract):
48
48
  pass
49
49
 
50
50