acex-cli 4.4.0__tar.gz → 4.4.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: acex-cli
3
- Version: 4.4.0
3
+ Version: 4.4.2
4
4
  Summary: ACE-X CLI - Command-line interface for ACE-X
5
5
  License: AGPL-3.0
6
6
  Keywords: automation,cli,control
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  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
+ Requires-Dist: acex-devkit (>=1.6.2,<2.0.0)
15
16
  Requires-Dist: acex-driver-cisco-ioscli (>=0.5.0,<0.6.0)
16
17
  Requires-Dist: click (==8.1.7)
17
18
  Requires-Dist: ntc-templates (>=8.1.0,<9.0.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "acex-cli"
3
- version = "4.4.0"
3
+ version = "4.4.2"
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"
@@ -18,6 +18,7 @@ typer = "^0.12.0"
18
18
  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
+ acex-devkit = "^1.6.2"
21
22
  acex-driver-cisco-ioscli = "^0.5.0"
22
23
  ntc-templates = "^8.1.0"
23
24
 
@@ -237,8 +237,24 @@ def show_cmd(
237
237
  ):
238
238
  """Show details for a node instance (by ID or hostname)."""
239
239
  sdk = get_sdk(ctx.obj.get_active_context())
240
- resolved = _resolve_node(sdk, node)
241
- flat = _flatten_node(resolved)
240
+ node_id = _resolve_node_id(sdk, node)
241
+ resolved = sdk.node_instances.get(node_id)
242
+ if not resolved:
243
+ typer.echo(f"Node '{node}' not found.")
244
+ raise typer.Exit(1)
245
+ flat = _flatten_node(resolved, node_id=node_id)
246
+
247
+ # Fetch management connection
248
+ try:
249
+ connections = _get_connection(sdk, node_id)
250
+ if connections:
251
+ conn = connections[0]
252
+ flat["mgmt_target_ip"] = conn.get("target_ip")
253
+ flat["mgmt_target_port"] = conn.get("target_port")
254
+ flat["mgmt_protocol"] = conn.get("protocol")
255
+ except Exception:
256
+ pass # Don't fail show if connection info is unavailable
257
+
242
258
  display_object(
243
259
  flat,
244
260
  format=format,
@@ -556,14 +572,14 @@ def _print_config_section(console, data: dict, path: str):
556
572
 
557
573
  # ── Util ────────────────────────────────────────────────────────
558
574
 
559
- def _flatten_node(node) -> dict:
575
+ def _flatten_node(node, node_id: str = None) -> dict:
560
576
  """Flatten NodeResponse into a single-level dict for display."""
561
577
  data = node.model_dump() if hasattr(node, "model_dump") else dict(node)
562
578
  asset = data.pop("asset", {}) or {}
563
579
  logical_node = data.pop("logical_node", {}) or {}
564
580
 
565
581
  flat = {
566
- "id": data.get("id"),
582
+ "id": data.get("id") or node_id,
567
583
  "hostname": logical_node.get("hostname"),
568
584
  "site": logical_node.get("site"),
569
585
  "role": logical_node.get("role"),
File without changes
File without changes
File without changes