[Phase 1] Document working YANG paths for all fabric features #3

Closed
opened 2025-12-20 15:40:01 +00:00 by Damien · 2 comments
Owner

Description

Document the exact YANG paths that work for configuring VLANs, Interfaces, BGP, VXLAN, and MLAG on EOS 4.35.0F via gNMI.

Tasks

For each feature, document:

  • VLANs: Create/read/update/delete VLAN configuration
  • Interfaces: L2 (switchport) and L3 (routed) interfaces
  • Loopbacks: Loopback interface configuration
  • BGP: Basic BGP process, neighbors, address-families
  • BGP EVPN: EVPN address-family, route-targets, RDs
  • VXLAN: Vxlan1 interface, VNI mappings, VTEP source
  • MLAG: Domain, peer-link, peer-address configuration

Deliverable Format

For each path, document:

feature: VLAN
operation: create
path: /openconfig-network-instance:network-instances/network-instance[name=default]/vlans/vlan[vlan-id=40]
model: openconfig
example_value:
  config:
    vlan-id: 40
    name: test-vlan
tested: true
notes: "Works for basic VLAN creation"

Output

  • Create docs/yang-paths.md with all documented paths
  • Create src/yang/paths.py with path constants
## Description Document the exact YANG paths that work for configuring VLANs, Interfaces, BGP, VXLAN, and MLAG on EOS 4.35.0F via gNMI. ## Tasks For each feature, document: - [x] **VLANs**: Create/read/update/delete VLAN configuration - [x] **Interfaces**: L2 (switchport) and L3 (routed) interfaces - [x] **Loopbacks**: Loopback interface configuration - [x] **BGP**: Basic BGP process, neighbors, address-families - [x] **BGP EVPN**: EVPN address-family, route-targets, RDs - [x] **VXLAN**: Vxlan1 interface, VNI mappings, VTEP source - [x] **MLAG**: Domain, peer-link, peer-address configuration ## Deliverable Format For each path, document: ```yaml feature: VLAN operation: create path: /openconfig-network-instance:network-instances/network-instance[name=default]/vlans/vlan[vlan-id=40] model: openconfig example_value: config: vlan-id: 40 name: test-vlan tested: true notes: "Works for basic VLAN creation" ``` ## Output - Create `docs/yang-paths.md` with all documented paths - Create `src/yang/paths.py` with path constants
Damien added the documentationphase-1-yang-discovery labels 2025-12-20 15:40:06 +00:00
Author
Owner

📋 Complete YANG Path Documentation

Based on testing with Arista cEOS 4.35.0F via gNMI.


Interfaces (OpenConfig)

Operation Path Model
All interfaces /interfaces/interface openconfig-interfaces
Specific interface /interfaces/interface[name=Ethernet1] openconfig-interfaces
Interface config /interfaces/interface[name=X]/config openconfig-interfaces
Interface state /interfaces/interface[name=X]/state openconfig-interfaces
Oper status /interfaces/interface[name=X]/state/oper-status openconfig-interfaces

Subscribe ON_CHANGE: Works (use native path without openconfig-interfaces: prefix)


Loopbacks (OpenConfig)

Operation Path Model
Loopback interface /interfaces/interface[name=Loopback0] openconfig-interfaces
Loopback config /interfaces/interface[name=Loopback0]/config openconfig-interfaces

VLANs (OpenConfig)

Operation Path Model
All VLANs /network-instances/network-instance[name=default]/vlans/vlan openconfig-vlan
Specific VLAN /network-instances/network-instance[name=default]/vlans/vlan[vlan-id=40] openconfig-vlan
VLAN interface (SVI) /interfaces/interface[name=Vlan40] openconfig-interfaces

BGP (OpenConfig)

Operation Path Model
BGP global /network-instances/network-instance[name=default]/protocols/protocol[identifier=BGP][name=BGP]/bgp/global openconfig-bgp
All neighbors /network-instances/network-instance[name=default]/protocols/protocol[identifier=BGP][name=BGP]/bgp/neighbors/neighbor openconfig-bgp
Specific neighbor /network-instances/network-instance[name=default]/protocols/protocol[identifier=BGP][name=BGP]/bgp/neighbors/neighbor[neighbor-address=10.0.1.0] openconfig-bgp
Neighbor state .../neighbor[neighbor-address=X]/state openconfig-bgp
IPv4 unicast AFI .../neighbor[neighbor-address=X]/afi-safis/afi-safi[afi-safi-name=IPV4_UNICAST] openconfig-bgp

Subscribe ON_CHANGE: Works


VXLAN (Arista Experimental)

Operation Path Model
VXLAN interface /interfaces/interface[name=Vxlan1] openconfig-interfaces
VXLAN config (augment) /interfaces/interface[name=Vxlan1]/arista-vxlan arista-exp-eos-vxlan
Source interface /interfaces/interface[name=Vxlan1]/arista-vxlan/config/src-ip-intf arista-exp-eos-vxlan
UDP port /interfaces/interface[name=Vxlan1]/arista-vxlan/config/udp-port arista-exp-eos-vxlan
All VNI mappings /interfaces/interface[name=Vxlan1]/arista-vxlan/vlan-to-vnis arista-exp-eos-vxlan
Specific VNI /interfaces/interface[name=Vxlan1]/arista-vxlan/vlan-to-vnis/vlan-to-vni[vlan=40] arista-exp-eos-vxlan
VRF-to-VNI (L3) /interfaces/interface[name=Vxlan1]/arista-vxlan/vrf-to-vnis arista-exp-eos-vxlan

Subscribe ON_CHANGE: Works


MLAG (Arista Experimental) ⚠️

Operation Path Model
Full MLAG /arista/eos/mlag arista-exp-eos-mlag
MLAG config /arista/eos/mlag/config arista-exp-eos-mlag

Key fields: domain-id, local-intf, peer-address, peer-link-intf, dual-primary-action, heartbeat-peer-address

⚠️ Limitation: State NOT exposed via gNMI. Use eAPI for show mlag.


EVPN (Arista Experimental) ⚠️

Operation Path Model
All EVPN instances /arista/eos/evpn arista-exp-eos-evpn
EVPN instances /arista/eos/evpn/evpn-instances arista-exp-eos-evpn
Specific instance /arista/eos/evpn/evpn-instances/evpn-instance[name=40] arista-exp-eos-evpn

Key fields: name, route-distinguisher, redistribute, route-target/import, route-target/export, vlans

⚠️ Limitation: State NOT exposed via gNMI. Use eAPI for show bgp evpn.


Port-Channel / LAG (OpenConfig)

Operation Path Model
LAG interface /interfaces/interface[name=Port-Channel999] openconfig-interfaces
LAG config /interfaces/interface[name=Port-Channel999]/aggregation openconfig-if-aggregate

Summary Table

Feature Model Type Config State Subscribe
Interfaces OpenConfig
Loopbacks OpenConfig
VLANs OpenConfig
BGP OpenConfig
VXLAN Arista Exp
MLAG Arista Exp N/A
EVPN Arista Exp N/A

Key Learnings

  1. Path prefix matters for subscriptions: Use /interfaces/interface[name=X]/state NOT /openconfig-interfaces:interfaces/...
  2. MLAG/EVPN state gap: Experimental models only expose config, use eAPI fallback
  3. VXLAN is an augment: Lives under /interfaces/interface[name=Vxlan1]/arista-vxlan
  4. BGP path is long: Start from /network-instances/network-instance[name=default]/protocols/protocol[identifier=BGP][name=BGP]/bgp
## 📋 Complete YANG Path Documentation Based on testing with Arista cEOS 4.35.0F via gNMI. --- ### Interfaces (OpenConfig) | Operation | Path | Model | |-----------|------|-------| | All interfaces | `/interfaces/interface` | openconfig-interfaces | | Specific interface | `/interfaces/interface[name=Ethernet1]` | openconfig-interfaces | | Interface config | `/interfaces/interface[name=X]/config` | openconfig-interfaces | | Interface state | `/interfaces/interface[name=X]/state` | openconfig-interfaces | | Oper status | `/interfaces/interface[name=X]/state/oper-status` | openconfig-interfaces | **Subscribe ON_CHANGE**: ✅ Works (use native path without `openconfig-interfaces:` prefix) --- ### Loopbacks (OpenConfig) | Operation | Path | Model | |-----------|------|-------| | Loopback interface | `/interfaces/interface[name=Loopback0]` | openconfig-interfaces | | Loopback config | `/interfaces/interface[name=Loopback0]/config` | openconfig-interfaces | --- ### VLANs (OpenConfig) | Operation | Path | Model | |-----------|------|-------| | All VLANs | `/network-instances/network-instance[name=default]/vlans/vlan` | openconfig-vlan | | Specific VLAN | `/network-instances/network-instance[name=default]/vlans/vlan[vlan-id=40]` | openconfig-vlan | | VLAN interface (SVI) | `/interfaces/interface[name=Vlan40]` | openconfig-interfaces | --- ### BGP (OpenConfig) | Operation | Path | Model | |-----------|------|-------| | BGP global | `/network-instances/network-instance[name=default]/protocols/protocol[identifier=BGP][name=BGP]/bgp/global` | openconfig-bgp | | All neighbors | `/network-instances/network-instance[name=default]/protocols/protocol[identifier=BGP][name=BGP]/bgp/neighbors/neighbor` | openconfig-bgp | | Specific neighbor | `/network-instances/network-instance[name=default]/protocols/protocol[identifier=BGP][name=BGP]/bgp/neighbors/neighbor[neighbor-address=10.0.1.0]` | openconfig-bgp | | Neighbor state | `.../neighbor[neighbor-address=X]/state` | openconfig-bgp | | IPv4 unicast AFI | `.../neighbor[neighbor-address=X]/afi-safis/afi-safi[afi-safi-name=IPV4_UNICAST]` | openconfig-bgp | **Subscribe ON_CHANGE**: ✅ Works --- ### VXLAN (Arista Experimental) | Operation | Path | Model | |-----------|------|-------| | VXLAN interface | `/interfaces/interface[name=Vxlan1]` | openconfig-interfaces | | VXLAN config (augment) | `/interfaces/interface[name=Vxlan1]/arista-vxlan` | arista-exp-eos-vxlan | | Source interface | `/interfaces/interface[name=Vxlan1]/arista-vxlan/config/src-ip-intf` | arista-exp-eos-vxlan | | UDP port | `/interfaces/interface[name=Vxlan1]/arista-vxlan/config/udp-port` | arista-exp-eos-vxlan | | All VNI mappings | `/interfaces/interface[name=Vxlan1]/arista-vxlan/vlan-to-vnis` | arista-exp-eos-vxlan | | Specific VNI | `/interfaces/interface[name=Vxlan1]/arista-vxlan/vlan-to-vnis/vlan-to-vni[vlan=40]` | arista-exp-eos-vxlan | | VRF-to-VNI (L3) | `/interfaces/interface[name=Vxlan1]/arista-vxlan/vrf-to-vnis` | arista-exp-eos-vxlan | **Subscribe ON_CHANGE**: ✅ Works --- ### MLAG (Arista Experimental) ⚠️ | Operation | Path | Model | |-----------|------|-------| | Full MLAG | `/arista/eos/mlag` | arista-exp-eos-mlag | | MLAG config | `/arista/eos/mlag/config` | arista-exp-eos-mlag | **Key fields**: `domain-id`, `local-intf`, `peer-address`, `peer-link-intf`, `dual-primary-action`, `heartbeat-peer-address` ⚠️ **Limitation**: State NOT exposed via gNMI. Use eAPI for `show mlag`. --- ### EVPN (Arista Experimental) ⚠️ | Operation | Path | Model | |-----------|------|-------| | All EVPN instances | `/arista/eos/evpn` | arista-exp-eos-evpn | | EVPN instances | `/arista/eos/evpn/evpn-instances` | arista-exp-eos-evpn | | Specific instance | `/arista/eos/evpn/evpn-instances/evpn-instance[name=40]` | arista-exp-eos-evpn | **Key fields**: `name`, `route-distinguisher`, `redistribute`, `route-target/import`, `route-target/export`, `vlans` ⚠️ **Limitation**: State NOT exposed via gNMI. Use eAPI for `show bgp evpn`. --- ### Port-Channel / LAG (OpenConfig) | Operation | Path | Model | |-----------|------|-------| | LAG interface | `/interfaces/interface[name=Port-Channel999]` | openconfig-interfaces | | LAG config | `/interfaces/interface[name=Port-Channel999]/aggregation` | openconfig-if-aggregate | --- ## Summary Table | Feature | Model Type | Config | State | Subscribe | |---------|------------|--------|-------|-----------| | Interfaces | OpenConfig | ✅ | ✅ | ✅ | | Loopbacks | OpenConfig | ✅ | ✅ | ✅ | | VLANs | OpenConfig | ✅ | ✅ | ✅ | | BGP | OpenConfig | ✅ | ✅ | ✅ | | VXLAN | Arista Exp | ✅ | ✅ | ✅ | | MLAG | Arista Exp | ✅ | ❌ | N/A | | EVPN | Arista Exp | ✅ | ❌ | N/A | --- ## Key Learnings 1. **Path prefix matters for subscriptions**: Use `/interfaces/interface[name=X]/state` NOT `/openconfig-interfaces:interfaces/...` 2. **MLAG/EVPN state gap**: Experimental models only expose config, use eAPI fallback 3. **VXLAN is an augment**: Lives under `/interfaces/interface[name=Vxlan1]/arista-vxlan` 4. **BGP path is long**: Start from `/network-instances/network-instance[name=default]/protocols/protocol[identifier=BGP][name=BGP]/bgp`
Damien referenced this issue from a commit 2025-12-26 13:42:48 +00:00
Author
Owner

Deliverables Complete

Created the following files:

1. docs/yang-paths.md

Complete reference documentation with:

  • Quick reference table
  • All feature paths (Interfaces, VLANs, BGP, VXLAN, MLAG, EVPN)
  • Working gnmic examples
  • Limitations and workarounds
  • Key learnings

2. src/yang/paths.py

Python module with path constants:

  • Interfaces, Loopbacks, VLANs - OpenConfig paths
  • BGP, AfiSafi - BGP with neighbor helpers
  • VXLAN - VNI mapping paths
  • MLAG, EVPN - Arista experimental paths
  • PortChannel, System - Additional paths
  • FabricSubscriptions - Pre-built subscription paths

3. src/yang/__init__.py

Package init with exports

Usage

from yang.paths import Interfaces, BGP, VXLAN

# Build paths dynamically
path = Interfaces.state("Ethernet1")
path = BGP.neighbor_session_state("10.0.1.0")
path = VXLAN.vlan_to_vni(40)
## ✅ Deliverables Complete Created the following files: ### 1. `docs/yang-paths.md` Complete reference documentation with: - Quick reference table - All feature paths (Interfaces, VLANs, BGP, VXLAN, MLAG, EVPN) - Working gnmic examples - Limitations and workarounds - Key learnings ### 2. `src/yang/paths.py` Python module with path constants: - `Interfaces`, `Loopbacks`, `VLANs` - OpenConfig paths - `BGP`, `AfiSafi` - BGP with neighbor helpers - `VXLAN` - VNI mapping paths - `MLAG`, `EVPN` - Arista experimental paths - `PortChannel`, `System` - Additional paths - `FabricSubscriptions` - Pre-built subscription paths ### 3. `src/yang/__init__.py` Package init with exports ### Usage ```python from yang.paths import Interfaces, BGP, VXLAN # Build paths dynamically path = Interfaces.state("Ethernet1") path = BGP.neighbor_session_state("10.0.1.0") path = VXLAN.vlan_to_vni(40) ```
Sign in to join this conversation.