Skip to content

Commit 2c1eb60

Browse files
authored
Merge pull request #1989 from Verma-Anukul/interface-new-leaves-support
Openconfig interface support for new state nodes
2 parents 25808ae + 9dc8be3 commit 2c1eb60

File tree

1 file changed

+61
-19
lines changed

1 file changed

+61
-19
lines changed

doc/mgmt/OpenConfig_Interfaces.md

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
# Revision
4444
| Rev | Date | Author | Change Description |
4545
|:---:|:-----------:|:---------------------:|-----------------------------------|
46-
| 0.1 | 02/24/2024 | Nikita Agarwal / Satoru Shinohara | Initial version |
46+
| 0.1 | 02/24/2024 | Nikita Agarwal / Satoru Shinohara | Initial version |
47+
| 0.2 | 05/08/2025 | Anukul Verma | Added support for new state leaves |
4748

4849
# About this Manual
4950
This document provides general information about the OpenConfig configuration of Ethernet interfaces in SONiC.
@@ -60,30 +61,48 @@ This document provides general information about the OpenConfig configuration of
6061
module: openconfig-interfaces
6162
+--rw interfaces
6263
+--rw interface* [name]
63-
+--rw name -> ../config/name
64+
+--rw name -> ../config/name
6465
+--rw config
6566
| +--rw name? string
67+
| +--rw type identityref
6668
| +--rw mtu? uint16
6769
| +--rw description? string
6870
| +--rw enabled? boolean
6971
+--ro state
7072
| +--ro name? string
73+
| +--ro type identityref
7174
| +--ro mtu? uint16
7275
| +--ro description? string
7376
| +--ro enabled? boolean
77+
| +--ro ifindex? uint32
7478
| +--ro admin-status enumeration
79+
| +--ro oper-status enumeration
80+
| +--ro last-change? oc-types:timeticks64
81+
| +--ro logical? boolean
82+
| +--ro management? boolean
83+
| +--ro cpu? boolean
84+
| +--ro counters
85+
| +--ro in-octets? oc-yang:counter64
86+
| +--ro in-pkts? oc-yang:counter64
87+
| +--ro in-unicast-pkts? oc-yang:counter64
88+
| +--ro in-broadcast-pkts? oc-yang:counter64
89+
| +--ro in-multicast-pkts? oc-yang:counter64
90+
| +--ro in-errors? oc-yang:counter64
91+
| +--ro in-discards? oc-yang:counter64
92+
| +--ro out-octets? oc-yang:counter64
93+
| +--ro out-pkts? oc-yang:counter64
94+
| +--ro out-unicast-pkts? oc-yang:counter64
95+
| +--ro out-broadcast-pkts? oc-yang:counter64
96+
| +--ro out-multicast-pkts? oc-yang:counter64
97+
| +--ro out-discards? oc-yang:counter64
98+
| +--ro out-errors? oc-yang:counter64
7599
+--rw subinterfaces
76100
| +--rw subinterface* [index]
77101
| +--rw index -> ../config/index
78102
| +--rw config
79-
| | +--rw index? uint32
80-
| | +--rw description? string
81-
| | +--rw enabled? boolean
103+
| | +--rw index? uint32
82104
| +--ro state
83-
| | +--ro index? uint32
84-
| | +--ro description? string
85-
| | +--ro enabled? boolean
86-
| | +--ro name? string
105+
| | +--ro index? uint32
87106
| +--rw oc-ip:ipv4
88107
| | +--rw oc-ip:addresses
89108
| | +--rw oc-ip:address* [ip]
@@ -105,14 +124,35 @@ This document provides general information about the OpenConfig configuration of
105124
| | +--ro oc-ip:ip? oc-inet:ipv6-address
106125
| | +--ro oc-ip:prefix-length uint8
107126
| +--rw oc-ip:config
108-
| +--rw oc-ip:enabled? boolean
127+
| | +--rw oc-ip:enabled? boolean
128+
| +--ro oc-ip:state
129+
| +--ro oc-ip:enabled? boolean
109130
+--rw oc-eth:ethernet
110-
+--rw oc-eth:config
111-
| +--rw oc-eth:auto-negotiate? boolean
112-
| +--rw oc-eth:port-speed? identityref
113-
+--ro oc-eth:state
114-
+--ro oc-eth:auto-negotiate? boolean
115-
+--ro oc-eth:port-speed? identityref
131+
| +--rw oc-eth:config
132+
| | +--rw oc-eth:auto-negotiate? boolean
133+
| | +--rw oc-eth:port-speed? identityref
134+
| | +--rw oc-lag:aggregate-id? -> /oc-if:interfaces/interface/name
135+
| +--ro oc-eth:state
136+
| +--ro oc-eth:auto-negotiate? boolean
137+
| +--ro oc-eth:port-speed? identityref
138+
| +--ro oc-eth:counters
139+
| | +--ro oc-eth:in-oversize-frames? oc-yang:counter64
140+
| | +--ro oc-eth:in-undersize-frames? oc-yang:counter64
141+
| | +--ro oc-eth:in-jabber-frames? oc-yang:counter64
142+
| | +--ro oc-eth:in-fragment-frames? oc-yang:counter64
143+
| | +--ro oc-eth-ext:in-distribution
144+
| | +--ro oc-eth-ext:in-frames-64-octets? oc-yang:counter64
145+
| | +--ro oc-eth-ext:in-frames-65-127-octets? oc-yang:counter64
146+
| | +--ro oc-eth-ext:in-frames-128-255-octets? oc-yang:counter64
147+
| | +--ro oc-eth-ext:in-frames-256-511-octets? oc-yang:counter64
148+
| | +--ro oc-eth-ext:in-frames-512-1023-octets? oc-yang:counter64
149+
| | +--ro oc-eth-ext:in-frames-1024-1518-octets? oc-yang:counter64
150+
| +--ro oc-lag:aggregate-id? -> /oc-if:interfaces/interface/name
151+
+--rw oc-lag:aggregation
152+
+--rw oc-lag:config
153+
| +--rw oc-lag:min-links? uint16
154+
+--ro oc-lag:state
155+
+--ro oc-lag:min-links? uint16
116156
117157
118158
# Definition/Abbreviation
@@ -195,8 +235,8 @@ Support for additional speeds for Ethernet are brought in to openconfig-if-ether
195235
Supported at leaf level as well.
196236
Sample GET output without IPv4 configuration on Ethernet104:
197237
```
198-
curl -X GET -k "https://100.94.113.103/restconf/data/openconfig-interfaces:interfaces/interface=Ethernet104" -H "accept: application/yang-data+json"
199-
{"openconfig-interfaces:interface":[{"config":{"enabled":true,"mtu":9100,"name":"Ethernet104"},"openconfig-if-ethernet:ethernet":{"config":{"auto-negotiate":false,"port-speed":"openconfig-if-ethernet:SPEED_10GB"},"state":{"auto-negotiate":false,"port-speed":"openconfig-if-ethernet:SPEED_10GB"}},"name":"Ethernet104","state":{"admin-status":"UP","description":"","enabled":true,"mtu":9100,"name":"Ethernet104"},"subinterfaces":{"subinterface":[{"config":{"index":0},"index":0,"openconfig-if-ip:ipv6":{"config":{"enabled":false}},"state":{"index":0}}]}}]}
238+
curl -X GET -k "https://localhost/restconf/data/openconfig-interfaces:interfaces/interface=Ethernet0" -H "accept: application/yang-data+json"
239+
{"openconfig-interfaces:interface":[{"config":{"enabled":true,"mtu":9100,"name":"Ethernet0","type":"iana-if-type:ethernetCsmacd"},"openconfig-if-ethernet:ethernet":{"config":{"port-speed":"openconfig-if-ethernet:SPEED_100GB"}},"name":"Ethernet0","state":{"cpu":false,"logical":false,"management":false,"name":"Ethernet0","type":"iana-if-type:ethernetCsmacd"},"subinterfaces":{"subinterface":[{"config":{"index":0},"index":0,"openconfig-if-ip:ipv6":{"config":{"enabled":false},"state":{"enabled":false}},"state":{"index":0}}]}}]}
200240
```
201241
Sample GET output with IPv4 configuration on Ethernet104:
202242
```
@@ -237,7 +277,9 @@ Mapping attributes between OpenConfig YANG and SONiC YANG:
237277
| description | description |
238278
| mtu | mtu |
239279
| enabled | admin\_status |
240-
| index | index |
280+
| ifindex | index |
281+
| oper-status | oper\_status |
282+
| last-change | last_up/down_time|
241283
242284
| OpenConfig YANG | Sonic-interface YANG |
243285
|-------------------------|-------------------------|

0 commit comments

Comments
 (0)