ominfra 0.0.0.dev94__py3-none-any.whl → 0.0.0.dev96__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
ominfra/.manifests.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "module": ".tailscale.cli",
16
16
  "attr": "_CLI_MODULE",
17
17
  "file": "ominfra/tailscale/cli.py",
18
- "line": 104,
18
+ "line": 110,
19
19
  "value": {
20
20
  "$omdev.cli.types.CliModule": {
21
21
  "cmd_name": [
ominfra/tailscale/cli.py CHANGED
@@ -93,12 +93,18 @@ class Cli(ap.Cli):
93
93
  print(json.dumps_pretty(msh.marshal(out)))
94
94
 
95
95
  @ap.command(
96
- ap.arg('name'),
96
+ ap.arg('name', nargs='?'),
97
97
  )
98
98
  def ip(self) -> None:
99
- node = self.status().nodes_by_host_name[self.args.name]
100
- ips = [i for i in node.tailscale_ips or () if _IP_V4_PAT.fullmatch(i)]
101
- print(ips[0])
99
+ 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
+ if self.args.name:
105
+ print(ip_lists_by_hostname[self.args.name][0])
106
+ else:
107
+ print(json.dumps_pretty(ip_lists_by_hostname))
102
108
 
103
109
 
104
110
  # @omlish-manifest
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ominfra
3
- Version: 0.0.0.dev94
3
+ Version: 0.0.0.dev96
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.dev94
16
- Requires-Dist: omlish ==0.0.0.dev94
15
+ Requires-Dist: omdev ==0.0.0.dev96
16
+ Requires-Dist: omlish ==0.0.0.dev96
17
17
  Provides-Extra: all
18
18
  Requires-Dist: paramiko ~=3.5 ; extra == 'all'
19
19
  Requires-Dist: asyncssh ~=2.18 ; extra == 'all'
@@ -1,4 +1,4 @@
1
- ominfra/.manifests.json,sha256=KjKpu0HX2bG8bASAjq9pt9FLAiDYqS1lZ8x-buseoik,589
1
+ ominfra/.manifests.json,sha256=keLK1pWH0vdH4noGhTQelCFztK3fzbhIcjIcPcFDhF0,589
2
2
  ominfra/__about__.py,sha256=6i1AoruFYQCd-PyhhbDQDWY2d1tiQu9nkwWr-fXAqfY,705
3
3
  ominfra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  ominfra/cmds.py,sha256=E0AfnvEmnKntXWvmLW5L05_NeDpBET1VBXn7vV6EwBQ,2083
@@ -70,12 +70,12 @@ ominfra/supervisor/supervisor.py,sha256=eXmVKX-A3exX8yHmmJEhHVd-3VnjTtrfDCvV7EEb
70
70
  ominfra/supervisor/types.py,sha256=ec62QG0CDJc0XNxCnf3lXxhsxrr4CCScLPI-1SpQjlc,1141
71
71
  ominfra/tailscale/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
72
  ominfra/tailscale/api.py,sha256=C5-t_b6jZXUWcy5k8bXm7CFnk73pSdrlMOgGDeGVrpw,1370
73
- ominfra/tailscale/cli.py,sha256=Ltg6RVFsMLLPjLzoGwM6sxjmwjEVEYHAdrqmCc4N1HM,3174
73
+ ominfra/tailscale/cli.py,sha256=2s1T8t6g-fhKF-l58lzVktEl9o5QqD-9FCpuYu5eqD0,3396
74
74
  ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
75
  ominfra/tools/listresources.py,sha256=L4t5rszm9ulcdWyr7n48_R9d5Etg4S2a4WQhlbHDtnQ,6106
76
- ominfra-0.0.0.dev94.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
77
- ominfra-0.0.0.dev94.dist-info/METADATA,sha256=ywk44Yh9NMoUOfnRZn1_2GDT4AO4XGEjyLZ3jYJdRXc,739
78
- ominfra-0.0.0.dev94.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
79
- ominfra-0.0.0.dev94.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
80
- ominfra-0.0.0.dev94.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
81
- ominfra-0.0.0.dev94.dist-info/RECORD,,
76
+ ominfra-0.0.0.dev96.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
77
+ ominfra-0.0.0.dev96.dist-info/METADATA,sha256=4lNnWFc04bgmyYEST3JeoYCTWFy1Bae-rfs6uUgrvVE,739
78
+ ominfra-0.0.0.dev96.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
79
+ ominfra-0.0.0.dev96.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
80
+ ominfra-0.0.0.dev96.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
81
+ ominfra-0.0.0.dev96.dist-info/RECORD,,