Phase 3: Code Abstractions

Phase 3: Code Abstractions — Base Client, Vendor Registry, Protocols Layer

Status: ❌ Not Started
Depends on: Phase 2 completion
Repo: ~/atelier/_projects/personal/netapi (code changes, not docs)

Objective

Implement the code abstractions that make "any API" a reality in the netapi library itself, not just in the documentation.

Current Code Gaps

Gap Impact Effort

No base client class

Each vendor reinvents HTTP, auth, error handling. 23 separate implementations.

Medium

No vendor registry

Adding a vendor requires editing main.py imports. No dynamic loading.

Medium

Empty protocols layer

netapi/protocols/ is a placeholder. No shared RESTCONF, NETCONF, gNMI abstractions.

Large

Empty capabilities layer

netapi/capabilities/ is a placeholder. No cross-vendor backup, monitoring patterns.

Large

No vendor definition YAML

The format documented in Phase 1 has no code backing it yet.

Medium

Deliverables

  • BaseApiClient abstract class with standard CRUD interface

  • Vendor auto-discovery from netapi/vendors/ directories

  • Entry point-based plugin registration in pyproject.toml

  • Vendor definition YAML loader (reads ~/.config/netapi/vendors/*.yml)

  • CLI auto-generation from vendor config + resource definitions

  • Update documentation to reflect implemented (not aspirational) features

Risk

This phase changes the library’s public API. Backward compatibility with existing ISE commands must be maintained. Document aliases and deprecation path.