1 module org-openroadm-rstp {
2 namespace "http://org/openroadm/rstp";
3 prefix org-openroadm-rstp;
5 import org-openroadm-device {
6 prefix org-openroadm-device;
9 organization "Open ROADM MSA";
13 "YANG definitions for rstp protocol.
16 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
17 AT&T Intellectual Property. All other rights reserved.
19 Redistribution and use in source and binary forms, with or without modification,
20 are permitted provided that the following conditions are met:
22 * Redistributions of source code must retain the above copyright notice, this
23 list of conditions and the following disclaimer.
24 * Redistributions in binary form must reproduce the above copyright notice,
25 this list of conditions and the following disclaimer in the documentation and/or
26 other materials provided with the distribution.
27 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
28 contributors may be used to endorse or promote products derived from this software
29 without specific prior written permission.
31 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
32 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
34 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
35 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
36 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
37 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 POSSIBILITY OF SUCH DAMAGE.";
47 typedef bridge-id-type {
50 "Unique Bridge Identifier";
53 grouping rstp-common-bridge-config {
54 leaf bridge-priority {
56 "Bridge Priority Value";
69 "The time interval during which no more than two
70 BPDUs transmitted by this node in seconds - not used in rstp mode (in seconds)";
78 "The time between the transmission of BPDU's by this node on any
79 port, when role is rooti (in seconds)";
87 "The value that all bridges use for MaxAge when this bridge
88 is acting as the root";
96 "The port on the Switch spends this time in the listening
97 state while moving from the blocking state to the forwarding state (in seconds)";
103 leaf transmit-hold-count {
105 "Maximum BPDU transmission rate";
113 grouping rstp-root-bridge-attr {
114 leaf root-bridge-port {
116 "Port id of the root port";
119 leaf root-path-cost {
121 "The cost of the path to the root as
122 seen from this bridge";
125 leaf root-bridge-priority {
127 "Root Bridge Priority Value";
130 leaf root-bridge-id {
132 "Root Bridge identifier";
135 leaf root-hold-time {
137 "The time interval during which no more than two
138 BPDUs transmitted by this node in seconds at root node (in seconds)";
141 leaf root-hello-time {
143 "The time between the transmission of BPDU's used at root node (in seconds)";
148 "The value that all bridges use for MaxAge used at root node";
151 leaf root-forward-delay {
153 "The time in seconds spent on the listening state used at root node (in seconds)";
158 grouping rstp-bridge-port-state-attr {
159 list rstp-bridge-port-table {
162 "This table contains port-specific information for rstp state attributes";
166 "Interface name of the port";
171 leaf bridge-port-state {
173 "The port's current state";
182 leaf bridge-port-role {
184 "The role payed by this port in the bridge";
194 leaf bridge-port-id {
196 "Unique port id of this port";
199 leaf oper-edge-bridge-port {
201 "The operational value of the Edge Port parameter";
204 leaf designated-bridge-port {
206 "Port id of the designated port";
209 leaf designated-bridgeid {
211 "The Bridge Identifier of the bridge that this port considers
212 to be the Designated Bridge for this port's segment";
218 grouping rstp-bridge-port-attr {
219 list rstp-bridge-port-table {
222 "Table contains port-specific information for rstp config";
226 "Interface name of the port";
228 path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
233 "The contribution of this port to the path cost of
234 paths towards the spanning tree root which include this port also";
236 range "2000..200000";
242 "The value of the priority field";
250 grouping rstp-container {
253 "Open ROADM RSTP top level";
254 list rstp-bridge-instance {
257 "rstp bridge instance, max instance = 1";
261 "unique name of the bridge";
266 container rstp-config {
268 "Collection of rstp configuration attributes";
269 uses rstp-common-bridge-config;
270 uses rstp-bridge-port-attr;
272 container rstp-state {
274 "Collection of rstp operational attributes";
276 container rstp-bridge-attr {
278 "Collection of operational rstp bridge attributes";
279 uses rstp-root-bridge-attr;
282 "Bridge identifier of the bridge";
285 leaf topo-change-count {
287 "The total number of topology changes";
290 leaf time-since-topo-change {
292 "Time since last topology changes occured (in seconds)";
296 container rstp-bridge-port-attr {
298 "Collection of operational rstp port related attributes";
299 uses rstp-bridge-port-state-attr;
306 augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
307 when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='rdm'";