netapi: Architecture & Vendors
1. Architecture
1.1. Atomic Design Layer Stack
netapi/
+-- primitives/ # Atomic building blocks (auth, http, parsers)
+-- protocols/ # Network protocols (RESTCONF, NETCONF, gNMI, SSH)
+-- capabilities/ # Cross-vendor operations (backup, monitoring)
+-- vendors/ # Vendor-specific implementations
+-- workflows/ # Orchestrated multi-step operations
+-- cli/ # Typer CLI interface
1.2. Technology Stack
| Layer | Technology | Rationale |
|---|---|---|
Language |
Python 3.11+ |
Fastest prototyping, richest network automation ecosystem (netmiko, ncclient, scrapli) |
CLI Framework |
Typer |
Modern Python CLI with type hints, auto-generated help, rich output |
HTTP |
httpx / requests |
Async-capable, connection pooling, TLS configuration |
Credential Management |
dsec integration |
Loads from gopass/Vault via |
Error Handling |
Unified exception hierarchy |
|
Distribution |
pip extras |
Modular installs: |
1.3. dsec Integration
netapi loads credentials from the dsec secrets system, never from config files or environment variables directly.
from netapi.vendors.cisco.ise import ERSClient
# Automatically loads from dsource d000 dev/network
client = ERSClient.from_dsec('home.lab.ise.primary')
2. Supported Vendors
| Vendor | APIs | Status |
|---|---|---|
Cisco ISE |
ERS, OpenAPI, MnT, pxGrid, DataConnect |
Full |
Cisco WLC 9800 |
RESTCONF |
Full |
Cisco IOS-XE |
RESTCONF, SSH |
Full |
Cisco FMC |
REST |
Full |
Cisco DNAC/Catalyst Center |
REST |
Full |
pfSense |
REST v2 |
Full |
Synology |
DSM API |
Full |
Infoblox |
WAPI |
Full |
Keycloak |
Admin REST |
Full |
HashiCorp Vault |
REST |
Full |
GitHub |
REST v3 |
Full |
GitLab |
REST v4 |
Full |
Gitea |
REST |
Full |
KVM/libvirt |
SSH |
Full |
Wazuh |
REST |
Full |
Cloudflare |
REST |
Full |
Monad/Splunk |
REST |
Full |
Microsoft DNS |
PowerShell |
Basic |
2.1. Optional Dependencies
| Extra | Includes |
|---|---|
|
netmiko, ncclient, scrapli, napalm |
|
ciscoisesdk, oracledb (DataConnect) |
|
aiohttp, asyncssh |
|
nornir, nornir-netmiko, nornir-napalm |
|
textfsm, ntc-templates, ttp |
|
pandas, openpyxl, jmespath |
|
pure Python |
|
pure Python |
|
pure Python |
|
pure Python (Splunk) |
|
hvac (HashiCorp Vault) |
genie/pyats removed from parsing due to unfixed CVEs. Install separately if needed.
|