Skip to content

Commit 8b42fcc

Browse files
authored
Merge branch 'master' into pkt_trim_cnt_0325
2 parents 77a7a6b + 75f07a5 commit 8b42fcc

3 files changed

Lines changed: 99 additions & 3 deletions

File tree

doc/openconfig_style_guide.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
**Contributors:** Anees Shaikh, Rob Shakir, Kristian Larsson, Darren Loher
55
**October 26, 2015**<br>
6-
*Updated: June 12, 2025*
6+
*Updated: January 9th 2026*
77

88
## Background
99
This document describes conventions adopted in the OpenConfig operator group
@@ -49,6 +49,7 @@ and released soon.
4949
- [`choice`](#choice)
5050
- [XPath](#xpath)
5151
- [Regular expressions](#regular-expressions)
52+
- [Schema Usability](#schema-usability)
5253
- [Appendix](#appendix)
5354
- [Example groupings for containers](#example-groupings-for-containers)
5455
- [OpenConfig YANG module template](#openconfig-yang-module-template)
@@ -476,6 +477,40 @@ reference for [regular
476477
expressions](http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs).
477478
However, this is not a commonly used standard for implementors.
478479

480+
## Schema Usability
481+
482+
Some elements of the OpenConfig style guide are implemented in order to provide
483+
consistent programmatic handling of the schema. For instance, the `config` and
484+
`state` containers used for operational state, and surrounding containers for
485+
YANG `list` statements. In some cases (e.g., programmatically generating
486+
configuration), this schema verbosity negatively impacts usability -- e.g.,
487+
requiring programmers to reference longer paths than are necessary. Tooling
488+
generating programmatic APIs around OpenConfig can improve usability by
489+
transforming the schema. Such transformations rely on consistency in the
490+
modelling approach.
491+
492+
The following rules MUST be adhered to within the OpenConfig models to
493+
ensure that downstream tooling does not break.
494+
495+
* **A `list` node MUST NOT share its identifier with any sibling of its
496+
parent container.** It is not legal for `/a/foos/foo` and `/a/foo` to
497+
exist, or for `/interfaces/interface` and `/interface` to exist, where
498+
`/a/foos/foo` and `/interfaces/interface` are `list` nodes. This rule
499+
exists to allow the (style-guide-required) "surrounding" container of a
500+
list to be removed during schema transformation.
501+
* **A leaf node MUST NOT share its identifier with any of the children of
502+
its grandparent node.** It is not legal for `/a/config/leaf` and `/a/leaf`
503+
to both exist nor for `/b/state/leaf` and `/b/leaf` to both exist. The
504+
single exception to this rule is the OpenConfig list key pattern: a leaf
505+
inside the `config` or `state` container is permitted to share its name
506+
with the `leafref` node acting as the `key` of the parent list. The node
507+
acting as the key of the `list` MUST be of type `leafref` as specified
508+
elsewhere in this guide. This rule ensures that the `config` and `state`
509+
containers can be removed during schema transformation.
510+
511+
An example of programmatic compression is implemented for the generation of
512+
code in ygot -- both for Go and Protobuf artifact generation
513+
([reference](https://github.com/openconfig/ygot/blob/master/docs/design.md#openconfig-path-compression)).
479514

480515
## Appendix
481516

release/models/lacp/openconfig-lacp.yang

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ module openconfig-lacp {
2626
managing aggregate interfaces. It works in conjunction with
2727
the OpenConfig interfaces and aggregate interfaces models.";
2828

29-
oc-ext:openconfig-version "2.1.0";
29+
oc-ext:openconfig-version "2.2.0";
30+
31+
revision "2026-04-09" {
32+
description
33+
"Add LACP fallback timeout leaf.";
34+
reference "2.2.0";
35+
}
36+
3037

3138
revision "2024-09-24" {
3239
description
@@ -422,6 +429,13 @@ grouping aggregation-lacp-members-statistics {
422429
after the expiry of the timeout period.";
423430
}
424431

432+
leaf fallback-timeout {
433+
type uint16;
434+
units "seconds";
435+
description
436+
"The timeout in seconds to wait for LACP PDUs before falling back to a single port.";
437+
}
438+
425439
uses aggregation-lacp-global-config;
426440
}
427441

release/models/wifi/openconfig-wifi-mac.yang

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ module openconfig-wifi-mac {
2626
description
2727
"Model for managing MAC layer configuration of Radio interfaces.";
2828

29-
oc-ext:openconfig-version "1.4.2";
29+
oc-ext:openconfig-version "1.5.0";
30+
31+
revision "2026-03-24" {
32+
description "Add 802.11mc RTT configuration and state containers.";
33+
reference "1.5.0";
34+
}
3035

3136
revision "2026-01-06" {
3237
description "Add tx-beacons counter to BSSID state.";
@@ -603,6 +608,22 @@ module openconfig-wifi-mac {
603608
}
604609
}
605610

611+
grouping rtt-config {
612+
description
613+
"802.11mc RTT (Round Trip Time) configuration, per SSID.";
614+
615+
leaf enabled {
616+
type boolean;
617+
description
618+
"Configures whether IEEE 802.11mc Fine Timing Measurement (FTM),
619+
also known as Round Trip Time (RTT), is enabled for clients
620+
associated with this SSID. When set to 'true', the Access Point
621+
will respond to FTM requests from clients, allowing them to
622+
perform accurate distance measurements. When 'false', FTM
623+
responses are disabled for this SSID.";
624+
}
625+
}
626+
606627
grouping bssid-common-state {
607628
description
608629
"Grouping for defining bssid-specific operational state";
@@ -1795,6 +1816,31 @@ module openconfig-wifi-mac {
17951816
}
17961817
}
17971818

1819+
grouping rtt-top {
1820+
description
1821+
"Top-level grouping for RTT configuration and operational
1822+
state data.";
1823+
1824+
container rtt {
1825+
description
1826+
"Top-level container for RTT configuration and
1827+
state container.";
1828+
1829+
container config {
1830+
description
1831+
"Container for RTT configuration elements.";
1832+
uses rtt-config;
1833+
}
1834+
1835+
container state {
1836+
config false;
1837+
description
1838+
"Container for RTT state elements.";
1839+
uses rtt-config;
1840+
}
1841+
}
1842+
}
1843+
17981844
grouping ssid-top {
17991845
description
18001846
"Top-level grouping for SSID configuration and operational state
@@ -1840,6 +1886,7 @@ module openconfig-wifi-mac {
18401886
uses dot1x-timers-top;
18411887
uses band-steering-top;
18421888
uses mlo-top;
1889+
uses rtt-top;
18431890
}
18441891
}
18451892
}

0 commit comments

Comments
 (0)