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;
7 revision-date 2018-10-19;
9 import org-openroadm-resource-types {
10 prefix org-openroadm-resource-types;
11 revision-date 2018-10-19;
19 "YANG definitions for rstp protocol.
22 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
23 AT&T Intellectual Property. All other rights reserved.
25 Redistribution and use in source and binary forms, with or without modification,
26 are permitted provided that the following conditions are met:
28 * Redistributions of source code must retain the above copyright notice, this
29 list of conditions and the following disclaimer.
30 * Redistributions in binary form must reproduce the above copyright notice,
31 this list of conditions and the following disclaimer in the documentation and/or
32 other materials provided with the distribution.
33 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
34 contributors may be used to endorse or promote products derived from this software
35 without specific prior written permission.
37 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
38 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
39 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
40 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
41 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
43 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
44 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
45 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46 POSSIBILITY OF SUCH DAMAGE.";
62 "Version 2.0.1 - added revision-date to imports";
73 typedef bridge-id-type {
76 "Unique Bridge Identifier";
79 grouping rstp-common-bridge-config {
80 leaf bridge-priority {
86 "Bridge Priority Value";
99 "The time interval during which no more than two
100 BPDUs transmitted by this node in seconds - not used in rstp mode (in seconds)";
108 "The time between the transmission of BPDU's by this node on any
109 port, when role is root (in seconds)";
117 "The value that all bridges use for MaxAge when this bridge
118 is acting as the root";
126 "The port on the Switch spends this time in the listening
127 state while moving from the blocking state to the forwarding state (in seconds)";
129 leaf transmit-hold-count {
135 "Maximum BPDU transmission rate";
139 grouping rstp-root-bridge-attr {
140 leaf root-bridge-port {
143 "Port id of the root port";
145 leaf root-path-cost {
148 "The cost of the path to the root as
149 seen from this bridge";
151 leaf root-bridge-priority {
154 "Root Bridge Priority Value";
156 leaf root-bridge-id {
159 "Root Bridge identifier";
161 leaf root-hold-time {
164 "The time interval during which no more than two
165 BPDUs transmitted by this node in seconds at root node (in seconds)";
167 leaf root-hello-time {
170 "The time between the transmission of BPDU's used at root node (in seconds)";
175 "The value that all bridges use for MaxAge used at root node";
177 leaf root-forward-delay {
180 "The time in seconds spent on the listening state used at root node (in seconds)";
184 grouping rstp-bridge-port-state-attr {
185 list rstp-bridge-port-table {
189 "This table contains port-specific information for rstp state attributes";
195 "Interface name of the port";
197 leaf bridge-port-state {
206 "The port's current state";
208 leaf bridge-port-role {
218 "The role payed by this port in the bridge";
220 leaf bridge-port-id {
223 "Unique port id of this port";
225 leaf oper-edge-bridge-port {
228 "The operational value of the Edge Port parameter";
230 leaf designated-bridge-port {
233 "Port id of the designated port";
235 leaf designated-bridgeid {
238 "The Bridge Identifier of the bridge that this port considers
239 to be the Designated Bridge for this port's segment";
244 grouping rstp-bridge-port-attr {
245 list rstp-bridge-port-table {
249 "Table contains port-specific information for rstp config";
252 path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
255 "Interface name of the port";
259 range "2000..200000";
263 "The contribution of this port to the path cost of
264 paths towards the spanning tree root which include this port also";
271 "The value of the priority field";
276 grouping rstp-container {
279 "Open ROADM RSTP top level";
280 list rstp-bridge-instance {
284 "rstp bridge instance, max instance = 1";
290 "unique name of the bridge";
292 container rstp-config {
294 "Collection of rstp configuration attributes";
295 uses rstp-common-bridge-config;
296 uses rstp-bridge-port-attr;
298 container rstp-state {
301 "Collection of rstp operational attributes";
302 container rstp-bridge-attr {
304 "Collection of operational rstp bridge attributes";
305 uses rstp-root-bridge-attr;
309 "Bridge identifier of the bridge";
311 leaf topo-change-count {
314 "The total number of topology changes";
316 leaf time-since-topo-change {
319 "Time since last topology changes occurred (in seconds)";
322 container rstp-bridge-port-attr {
324 "Collection of operational rstp port related attributes";
325 uses rstp-bridge-port-state-attr;
332 notification rstp-topology-change {
334 "RSTP: A topologyChange event is sent by a bridge when any of
335 its configured ports transitions from the Learning state
336 to the Forwarding state, or from the Forwarding state to
337 the Blocking state. The event is not sent if a rstp-new-root
338 event is sent for the same transition";
339 uses org-openroadm-resource-types:device-id;
341 notification rstp-new-root {
343 "RSTP:The rstp-new-root event indicates that the sending agent has
344 become the new root of the Spanning Tree ";
345 uses org-openroadm-resource-types:device-id;
347 augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
348 when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='rdm' or /org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='ila'";