ominfra 0.0.0.dev96__tar.gz → 0.0.0.dev98__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {ominfra-0.0.0.dev96/ominfra.egg-info → ominfra-0.0.0.dev98}/PKG-INFO +3 -3
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/.manifests.json +1 -1
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/tailscale/cli.py +17 -9
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98/ominfra.egg-info}/PKG-INFO +3 -3
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra.egg-info/requires.txt +2 -2
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/pyproject.toml +3 -3
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/LICENSE +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/MANIFEST.in +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/README.rst +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/__about__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/__main__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/auth.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/cli.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/dataclasses.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/journald2aws/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/journald2aws/main.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/logs.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/clouds/aws/metadata.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/cmds.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/_executor.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/configs.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/base.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/concerns/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/concerns/dirs.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/concerns/nginx.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/concerns/repo.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/concerns/supervisor.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/concerns/systemd.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/concerns/user.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/concerns/venv.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/executor/main.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/_main.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/base.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/configs.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/deploy.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/main.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/nginx.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/repo.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/runtime.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/site.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/supervisor.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/poly/venv.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/deploy/remote.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/journald/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/journald/genmessages.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/journald/messages.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/journald/tailer.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/manage/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/manage/manage.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/pyremote/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/pyremote/_runcommands.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/pyremote/bootstrap.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/pyremote/runcommands.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/scripts/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/scripts/journald2aws.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/scripts/supervisor.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/ssh.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/__main__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/compat.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/configs.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/context.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/datatypes.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/dispatchers.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/events.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/exceptions.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/poller.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/process.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/states.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/supervisor.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/supervisor/types.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/tailscale/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/tailscale/api.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/threadworker.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/tools/__init__.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra/tools/listresources.py +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra.egg-info/SOURCES.txt +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra.egg-info/dependency_links.txt +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra.egg-info/entry_points.txt +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/ominfra.egg-info/top_level.txt +0 -0
- {ominfra-0.0.0.dev96 → ominfra-0.0.0.dev98}/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.dev98
|
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.dev98
|
16
|
+
Requires-Dist: omlish==0.0.0.dev98
|
17
17
|
Provides-Extra: all
|
18
18
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
19
19
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -6,6 +6,7 @@ import typing as ta
|
|
6
6
|
from omdev.cli import CliModule
|
7
7
|
from omlish import argparse as ap
|
8
8
|
from omlish import cached
|
9
|
+
from omlish import check
|
9
10
|
from omlish import collections as col
|
10
11
|
from omlish import dataclasses as dc
|
11
12
|
from omlish import lang
|
@@ -16,6 +17,9 @@ from omlish.formats import json
|
|
16
17
|
##
|
17
18
|
|
18
19
|
|
20
|
+
_IP_V4_PAT = re.compile(r'\d{1,3}(\.\d{1,3}){3}')
|
21
|
+
|
22
|
+
|
19
23
|
@dc.dataclass(frozen=True)
|
20
24
|
@msh.update_object_metadata(field_naming=msh.Naming.CAMEL, unknown_field='x')
|
21
25
|
class CliNode:
|
@@ -27,6 +31,10 @@ class CliNode:
|
|
27
31
|
allowed_ips: ta.Sequence[str] | None = dc.xfield(None) | msh.update_field_metadata(name='AllowedPs')
|
28
32
|
tags: ta.Sequence[str] | None = None
|
29
33
|
|
34
|
+
@property
|
35
|
+
def ipv4s(self) -> ta.Sequence[str]:
|
36
|
+
return [i for i in self.tailscale_ips or () if _IP_V4_PAT.fullmatch(i)]
|
37
|
+
|
30
38
|
x: ta.Mapping[str, ta.Any] | None = None
|
31
39
|
|
32
40
|
|
@@ -56,9 +64,6 @@ class CliStatus:
|
|
56
64
|
##
|
57
65
|
|
58
66
|
|
59
|
-
_IP_V4_PAT = re.compile(r'\d{1,3}(\.\d{1,3}){3}')
|
60
|
-
|
61
|
-
|
62
67
|
class Cli(ap.Cli):
|
63
68
|
@lang.cached_function
|
64
69
|
def bin(self) -> str:
|
@@ -92,19 +97,22 @@ class Cli(ap.Cli):
|
|
92
97
|
out = status
|
93
98
|
print(json.dumps_pretty(msh.marshal(out)))
|
94
99
|
|
100
|
+
@ap.command()
|
101
|
+
def ips(self) -> None:
|
102
|
+
print(json.dumps_pretty({
|
103
|
+
hn: node.ipv4s
|
104
|
+
for hn, node in self.status().nodes_by_host_name.items()
|
105
|
+
}))
|
106
|
+
|
95
107
|
@ap.command(
|
96
108
|
ap.arg('name', nargs='?'),
|
97
109
|
)
|
98
110
|
def ip(self) -> None:
|
99
111
|
status = self.status()
|
100
|
-
ip_lists_by_hostname = {
|
101
|
-
hn: [i for i in node.tailscale_ips or () if _IP_V4_PAT.fullmatch(i)]
|
102
|
-
for hn, node in status.nodes_by_host_name.items()
|
103
|
-
}
|
104
112
|
if self.args.name:
|
105
|
-
print(
|
113
|
+
print(status.nodes_by_host_name[self.args.name].ipv4s[0])
|
106
114
|
else:
|
107
|
-
print(
|
115
|
+
print(check.not_none(status.self).ipv4s[0])
|
108
116
|
|
109
117
|
|
110
118
|
# @omlish-manifest
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev98
|
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.dev98
|
16
|
+
Requires-Dist: omlish==0.0.0.dev98
|
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.dev98'
|
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.dev98',
|
26
|
+
'omlish == 0.0.0.dev98',
|
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
|