feat: Add gNMI discovery CLI tools for YANG path exploration #21
Reference in New Issue
Block a user
Delete Branch "feat-discoverytools"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR implements the Phase 1 discovery tooling as specified in #4. It provides a complete CLI for interactively exploring YANG paths on Arista devices via gNMI.
Features
fabric-orch discover capabilities- List device capabilities and supported YANG modelsfabric-orch discover get- Get configuration or state data at any YANG pathfabric-orch discover set- Set configuration with dry-run support (safe by default)fabric-orch discover subscribe- Subscribe to real-time path updates (on-change, sample modes)fabric-orch discover paths- Quick reference of common YANG paths for Arista EOSImplementation
New Files
src/cli.py- Click-based CLI with rich output formattingsrc/gnmi/client.py- High-level gNMI client wrapper using pygnmisrc/gnmi/__init__.py- Module exportssrc/gnmi/README.md- Client usage documentationdocs/cli-guide.md- CLI user guidedocs/yang-paths.md- YANG paths referenceDependencies
click- CLI frameworkpygnmi- gNMI client libraryrich- Pretty terminal outputUsage Examples
Testing
Validated against cEOS 4.35.0F lab environment:
Related
Closes #4