Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This page contains the release history of the Strata Cloud Manager CLI, with the most recent releases at the top.

## Version 1.3.2

**Released:** April 2026

### Fixed

- **Device Name Resolution**: `scm local` and `scm operations` commands now accept device names (e.g., `austin-fw1`) in addition to serial numbers. The CLI automatically resolves device names to serial numbers via the SCM device API before dispatching operations. Serial numbers (14-15 digits) are passed through directly.
- **SDK Model Alignment**: Updated mock data and live API calls to match actual SDK 0.13.0 Pydantic model field names for local config, device operations, and incidents.

## Version 1.3.1

**Released:** April 2026
Expand Down
13 changes: 12 additions & 1 deletion docs/cli/incidents/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,18 @@ scm incidents show INC-2026-04-001
scm incidents show INC-2026-04-001 --json
```

Shows full incident detail including alerts and remediation steps. Use `--json` for the complete structured output.
Shows full incident detail including alerts and remediations. Use `--json` for the complete structured output.

**Fields:**

- `incident_id` - Unique incident identifier
- `title` - Incident description
- `severity` - critical, high, medium, low, informational
- `status` - open, closed, in_progress
- `raised_time` - Epoch timestamp when incident was raised
- `updated_time` - Epoch timestamp of last update
- `alerts` - Associated alerts with `alert_id`, `title`, `severity`, and `state`
- `remediations` - Remediation guidance (string)

**Arguments:**

Expand Down
12 changes: 6 additions & 6 deletions docs/cli/local/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ Manage local device configuration versions and downloads.
### List Config Versions

```bash
scm local list --device fw-01
scm local list --device 007951000123456
```

Lists available configuration versions for a device, showing version number, date, author, and description.
Lists available configuration versions for a device, showing version number, timestamp, serial number, and MD5 hash.

**Options:**

| Option | Required | Description |
|--------|----------|-------------|
| `--device`, `-d` | Yes | Device name |
| `--device`, `-d` | Yes | Device serial number (14-15 digits) |

### Download Config

```bash
# Output to stdout
scm local download --device fw-01 --version 42
scm local download --device 007951000123456 --version 42

# Save to file
scm local download --device fw-01 --version 42 --output config.xml
scm local download --device 007951000123456 --version 42 --output config.xml
```

Downloads a specific configuration version as XML. Outputs to stdout by default; use `--output` to write to a file.
Expand All @@ -34,6 +34,6 @@ Downloads a specific configuration version as XML. Outputs to stdout by default;

| Option | Required | Description |
|--------|----------|-------------|
| `--device`, `-d` | Yes | Device name |
| `--device`, `-d` | Yes | Device serial number (14-15 digits) |
| `--version`, `-v` | Yes | Config version number |
| `--output`, `-o` | No | Output file path (default: stdout) |
18 changes: 9 additions & 9 deletions docs/cli/operations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,51 @@ All operation commands support:

| Option | Default | Description |
|--------|---------|-------------|
| `--device`, `-d` | Required | Device name |
| `--device`, `-d` | Required | Device serial number (14-15 digits) |
| `--async` | `False` | Return job ID without waiting |
| `--timeout`, `-t` | `300` | Sync polling timeout in seconds |

### Route Table

```bash
scm operations route-table --device fw-01
scm operations route-table --device fw-01 --async
scm operations route-table --device 007951000123456
scm operations route-table --device 007951000123456 --async
```

### FIB Table

```bash
scm operations fib-table --device fw-01
scm operations fib-table --device 007951000123456
```

### DNS Proxy

```bash
scm operations dns-proxy --device fw-01
scm operations dns-proxy --device 007951000123456
```

### Network Interfaces

```bash
scm operations interfaces --device fw-01
scm operations interfaces --device 007951000123456
```

### Device Rules

```bash
scm operations device-rules --device fw-01
scm operations device-rules --device 007951000123456
```

### BGP Export

```bash
scm operations bgp-export --device fw-01
scm operations bgp-export --device 007951000123456
```

### Logging Status

```bash
scm operations logging-status --device fw-01
scm operations logging-status --device 007951000123456
```

### Job Status
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pan-scm-cli"
version = "1.3.1"
version = "1.3.2"
description = "CICD and Network Engineer-friendly CLI tool for Palo Alto Networks Strata Cloud Manager"
authors = ["Calvin Remsburg <dev@cdot.io>"]
readme = "README.md"
Expand Down
34 changes: 16 additions & 18 deletions src/scm_cli/commands/incidents.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def list_incidents(
table.add_column("Status", style="white")
table.add_column("Severity", style="white")
table.add_column("Product", style="white")
table.add_column("Summary", style="dim", max_width=40)
table.add_column("Created", style="white")
table.add_column("Title", style="dim", max_width=40)
table.add_column("Raised", style="white")

severity_styles = {"critical": "red bold", "high": "red", "medium": "yellow", "low": "green", "informational": "dim"}

Expand All @@ -80,12 +80,12 @@ def list_incidents(
status_val = inc.get("status", "")
status_style = "green" if status_val == "closed" else ("yellow" if status_val == "in_progress" else "white")
table.add_row(
str(inc.get("id", "")),
str(inc.get("incident_id", "")),
f"[{status_style}]{status_val}[/{status_style}]",
f"[{sev_style}]{sev}[/{sev_style}]",
str(inc.get("product", "")),
str(inc.get("summary", "")),
str(inc.get("created", "")),
str(inc.get("title", "")),
str(inc.get("raised_time", "")),
)

console.print(table)
Expand Down Expand Up @@ -118,28 +118,26 @@ def show_incident(
typer.echo(json.dumps(incident, indent=2))
return

typer.echo(f"\nIncident: {incident.get('id', incident_id)}")
typer.echo(f"\nIncident: {incident.get('incident_id', incident_id)}")
typer.echo(f"Status: {incident.get('status', '')}")
typer.echo(f"Severity: {incident.get('severity', '')}")
typer.echo(f"Product: {incident.get('product', '')}")
typer.echo(f"Created: {incident.get('created', '')}")
typer.echo(f"Updated: {incident.get('updated', '')}")
typer.echo(f"Summary: {incident.get('summary', '')}")
typer.echo(f"Raised: {incident.get('raised_time', '')}")
typer.echo(f"Updated: {incident.get('updated_time', '')}")
typer.echo(f"Title: {incident.get('title', '')}")

alerts = incident.get("alerts", [])
if alerts:
typer.echo(f"\nAlerts ({len(alerts)}):")
for i, alert in enumerate(alerts, 1):
sev = alert.get("severity", "")
desc = alert.get("description", "")
ts = alert.get("timestamp", "")
typer.echo(f" {i}. [{sev}] {desc} {ts}")

remediation = incident.get("remediation", [])
if remediation:
typer.echo("\nRemediation:")
for i, step in enumerate(remediation, 1):
typer.echo(f" {i}. {step}")
title = alert.get("title", "")
state = alert.get("state", "")
typer.echo(f" {i}. [{sev}] {title} ({state})")

remediations = incident.get("remediations", "")
if remediations:
typer.echo(f"\nRemediations:\n {remediations}")

typer.echo()

Expand Down
22 changes: 11 additions & 11 deletions src/scm_cli/commands/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# COMMAND OPTIONS
# =============================================================================================================================================================================================

DEVICE_OPTION = typer.Option(..., "--device", "-d", help="Device name")
DEVICE_OPTION = typer.Option(..., "--device", "-d", help="Device name or serial number")

# =============================================================================================================================================================================================
# LOCAL CONFIG COMMANDS
Expand All @@ -41,7 +41,7 @@ def list_versions(

Examples
--------
scm local list --device fw-01
scm local list --device 007951000123456

"""
try:
Expand All @@ -53,16 +53,16 @@ def list_versions(

table = Table(title=f"Config Versions — {device}")
table.add_column("Version", style="cyan")
table.add_column("Date", style="white")
table.add_column("Author", style="green")
table.add_column("Description", style="dim")
table.add_column("Timestamp", style="white")
table.add_column("Serial", style="green")
table.add_column("MD5", style="dim")

for v in versions:
table.add_row(
str(v.get("version", "")),
str(v.get("date", "")),
str(v.get("author", "")),
str(v.get("description", "")),
str(v.get("local_version", "")),
str(v.get("timestamp", "")),
str(v.get("serial", "")),
str(v.get("md5", "")),
)

console.print(table)
Expand All @@ -85,8 +85,8 @@ def download_config(

Examples
--------
scm local download --device fw-01 --version 42
scm local download --device fw-01 --version 42 --output config.xml
scm local download --device 007951000123456 --version 42
scm local download --device 007951000123456 --version 42 --output config.xml

"""
try:
Expand Down
18 changes: 9 additions & 9 deletions src/scm_cli/commands/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# COMMAND OPTIONS
# =============================================================================================================================================================================================

DEVICE_OPTION = typer.Option(..., "--device", "-d", help="Device name")
DEVICE_OPTION = typer.Option(..., "--device", "-d", help="Device name or serial number")
ASYNC_OPTION = typer.Option(False, "--async", help="Return job ID without waiting for completion")
TIMEOUT_OPTION = typer.Option(300, "--timeout", "-t", help="Sync polling timeout in seconds")

Expand Down Expand Up @@ -89,8 +89,8 @@ def route_table(device: str = DEVICE_OPTION, async_mode: bool = ASYNC_OPTION, ti

Examples
--------
scm operations route-table --device fw-01
scm operations route-table --device fw-01 --async
scm operations route-table --device 007951000123456
scm operations route-table --device 007951000123456 --async

"""
_run_operation(device, "route-table", async_mode, timeout)
Expand All @@ -102,7 +102,7 @@ def fib_table(device: str = DEVICE_OPTION, async_mode: bool = ASYNC_OPTION, time

Examples
--------
scm operations fib-table --device fw-01
scm operations fib-table --device 007951000123456

"""
_run_operation(device, "fib-table", async_mode, timeout)
Expand All @@ -114,7 +114,7 @@ def dns_proxy(device: str = DEVICE_OPTION, async_mode: bool = ASYNC_OPTION, time

Examples
--------
scm operations dns-proxy --device fw-01
scm operations dns-proxy --device 007951000123456

"""
_run_operation(device, "dns-proxy", async_mode, timeout)
Expand All @@ -126,7 +126,7 @@ def interfaces(device: str = DEVICE_OPTION, async_mode: bool = ASYNC_OPTION, tim

Examples
--------
scm operations interfaces --device fw-01
scm operations interfaces --device 007951000123456

"""
_run_operation(device, "interfaces", async_mode, timeout)
Expand All @@ -138,7 +138,7 @@ def device_rules(device: str = DEVICE_OPTION, async_mode: bool = ASYNC_OPTION, t

Examples
--------
scm operations device-rules --device fw-01
scm operations device-rules --device 007951000123456

"""
_run_operation(device, "device-rules", async_mode, timeout)
Expand All @@ -150,7 +150,7 @@ def bgp_export(device: str = DEVICE_OPTION, async_mode: bool = ASYNC_OPTION, tim

Examples
--------
scm operations bgp-export --device fw-01
scm operations bgp-export --device 007951000123456

"""
_run_operation(device, "bgp-export", async_mode, timeout)
Expand All @@ -162,7 +162,7 @@ def logging_status(device: str = DEVICE_OPTION, async_mode: bool = ASYNC_OPTION,

Examples
--------
scm operations logging-status --device fw-01
scm operations logging-status --device 007951000123456

"""
_run_operation(device, "logging-status", async_mode, timeout)
Expand Down
Loading
Loading