acex-cli 4.4.2__tar.gz → 4.5.0__tar.gz
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.
- {acex_cli-4.4.2 → acex_cli-4.5.0}/PKG-INFO +2 -2
- {acex_cli-4.4.2 → acex_cli-4.5.0}/pyproject.toml +2 -2
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/commands/node.py +39 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/README.md +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/__init__.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/commands/__init__.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/commands/asset.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/commands/context.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/commands/logical_node.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/commands/ned.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/context.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/diff_formatters.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/main.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/output.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/print_utils.py +0 -0
- {acex_cli-4.4.2 → acex_cli-4.5.0}/src/acex_cli/sdk.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: acex-cli
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.5.0
|
|
4
4
|
Summary: ACE-X CLI - Command-line interface for ACE-X
|
|
5
5
|
License: AGPL-3.0
|
|
6
6
|
Keywords: automation,cli,control
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.14
|
|
14
14
|
Requires-Dist: acex-client (>=4.3.0,<5.0.0)
|
|
15
15
|
Requires-Dist: acex-devkit (>=1.6.2,<2.0.0)
|
|
16
|
-
Requires-Dist: acex-driver-cisco-ioscli (>=0.5.
|
|
16
|
+
Requires-Dist: acex-driver-cisco-ioscli (>=0.5.1,<0.6.0)
|
|
17
17
|
Requires-Dist: click (==8.1.7)
|
|
18
18
|
Requires-Dist: ntc-templates (>=8.1.0,<9.0.0)
|
|
19
19
|
Requires-Dist: rich (>=13.0.0,<14.0.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "acex-cli"
|
|
3
|
-
version = "4.
|
|
3
|
+
version = "4.5.0"
|
|
4
4
|
description = "ACE-X CLI - Command-line interface for ACE-X"
|
|
5
5
|
authors = ["Johan Lahti <johan.lahti@acebit.se>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -19,7 +19,7 @@ rich = "^13.0.0"
|
|
|
19
19
|
click = "8.1.7"
|
|
20
20
|
acex-client = "^4.3.0" # Changes to real dep. by switch_acex_client_dep for publishing
|
|
21
21
|
acex-devkit = "^1.6.2"
|
|
22
|
-
acex-driver-cisco-ioscli = "^0.5.
|
|
22
|
+
acex-driver-cisco-ioscli = "^0.5.1"
|
|
23
23
|
ntc-templates = "^8.1.0"
|
|
24
24
|
|
|
25
25
|
[tool.poetry.scripts]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import base64
|
|
2
2
|
import json
|
|
3
|
+
import os
|
|
3
4
|
from typing import Optional
|
|
4
5
|
|
|
5
6
|
import requests
|
|
@@ -263,6 +264,44 @@ def show_cmd(
|
|
|
263
264
|
)
|
|
264
265
|
|
|
265
266
|
|
|
267
|
+
@app.command("connect")
|
|
268
|
+
def connect_cmd(
|
|
269
|
+
ctx: typer.Context,
|
|
270
|
+
node: str = typer.Argument(help="Node ID or hostname"),
|
|
271
|
+
):
|
|
272
|
+
"""Connect to a node via its management connection (SSH)."""
|
|
273
|
+
sdk = get_sdk(ctx.obj.get_active_context())
|
|
274
|
+
node_id = _resolve_node_id(sdk, node)
|
|
275
|
+
|
|
276
|
+
try:
|
|
277
|
+
connections = _get_connection(sdk, node_id)
|
|
278
|
+
except Exception as e:
|
|
279
|
+
typer.echo(f"Failed to fetch management connection: {e}")
|
|
280
|
+
raise typer.Exit(1)
|
|
281
|
+
|
|
282
|
+
if not connections:
|
|
283
|
+
typer.echo(f"No management connection found for node '{node}'.")
|
|
284
|
+
raise typer.Exit(1)
|
|
285
|
+
|
|
286
|
+
conn = connections[0]
|
|
287
|
+
connection_type = (conn.get("connection_type") or "").lower()
|
|
288
|
+
|
|
289
|
+
if connection_type != "ssh":
|
|
290
|
+
typer.echo(f"Unsupported connection type '{connection_type}'. Only SSH is supported.")
|
|
291
|
+
raise typer.Exit(1)
|
|
292
|
+
|
|
293
|
+
target_ip = conn.get("target_ip")
|
|
294
|
+
|
|
295
|
+
if not target_ip:
|
|
296
|
+
typer.echo("Management connection has no target_ip.")
|
|
297
|
+
raise typer.Exit(1)
|
|
298
|
+
|
|
299
|
+
ssh_args = ["ssh", target_ip]
|
|
300
|
+
|
|
301
|
+
typer.echo(f"Connecting to {target_ip} via SSH...")
|
|
302
|
+
os.execvp("ssh", ssh_args)
|
|
303
|
+
|
|
304
|
+
|
|
266
305
|
# ── Config show commands ────────────────────────────────────────
|
|
267
306
|
|
|
268
307
|
@config_show_app.command("local")
|
|
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
|