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 2020-05-29;
9 import org-openroadm-resource-types {
10 prefix org-openroadm-resource-types;
11 revision-date 2019-11-29;
19 "YANG definitions for rstp protocol.
22 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
23 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.";
98 "Version 2.0.1 - added revision-date to imports";
100 revision 2017-06-26 {
104 revision 2016-10-14 {
109 typedef bridge-id-type {
112 "Unique Bridge Identifier";
115 grouping rstp-common-bridge-config {
116 leaf bridge-priority {
122 "Bridge Priority Value";
127 "Bridge admin state";
135 "The time interval during which no more than two
136 BPDUs transmitted by this node in seconds - not used in rstp mode (in seconds)";
144 "The time between the transmission of BPDU's by this node on any
145 port, when role is root (in seconds)";
153 "The value that all bridges use for MaxAge when this bridge
154 is acting as the root";
162 "The port on the Switch spends this time in the listening
163 state while moving from the blocking state to the forwarding state (in seconds)";
165 leaf transmit-hold-count {
171 "Maximum BPDU transmission rate";
175 grouping rstp-root-bridge-attr {
176 leaf root-bridge-port {
179 "Port id of the root port";
181 leaf root-path-cost {
184 "The cost of the path to the root as
185 seen from this bridge";
187 leaf root-bridge-priority {
190 "Root Bridge Priority Value";
192 leaf root-bridge-id {
195 "Root Bridge identifier";
197 leaf root-hold-time {
200 "The time interval during which no more than two
201 BPDUs transmitted by this node in seconds at root node (in seconds)";
203 leaf root-hello-time {
206 "The time between the transmission of BPDU's used at root node (in seconds)";
211 "The value that all bridges use for MaxAge used at root node";
213 leaf root-forward-delay {
216 "The time in seconds spent on the listening state used at root node (in seconds)";
220 grouping rstp-bridge-port-state-attr {
221 list rstp-bridge-port-table {
225 "This table contains port-specific information for rstp state attributes";
231 "Interface name of the port";
233 leaf bridge-port-state {
242 "The port's current state";
244 leaf bridge-port-role {
254 "The role payed by this port in the bridge";
256 leaf bridge-port-id {
259 "Unique port id of this port";
261 leaf oper-edge-bridge-port {
264 "The operational value of the Edge Port parameter";
266 leaf designated-bridge-port {
269 "Port id of the designated port";
271 leaf designated-bridgeid {
274 "The Bridge Identifier of the bridge that this port considers
275 to be the Designated Bridge for this port's segment";
280 grouping rstp-bridge-port-attr {
281 list rstp-bridge-port-table {
285 "Table contains port-specific information for rstp config";
288 path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
291 "Interface name of the port";
295 range "2000..200000";
299 "The contribution of this port to the path cost of
300 paths towards the spanning tree root which include this port also";
307 "The value of the priority field";
312 grouping rstp-container {
315 "Open ROADM RSTP top level";
316 leaf max-bridge-instances {
320 "Number of bridge instances supported";
322 list rstp-bridge-instance {
325 "rstp bridge instance";
331 "unique name of the bridge";
333 container rstp-config {
335 "Collection of rstp configuration attributes";
336 uses rstp-common-bridge-config;
337 uses rstp-bridge-port-attr;
339 container rstp-state {
342 "Collection of rstp operational attributes";
343 container rstp-bridge-attr {
345 "Collection of operational rstp bridge attributes";
346 uses rstp-root-bridge-attr;
350 "Bridge identifier of the bridge";
352 leaf topo-change-count {
355 "The total number of topology changes";
357 leaf time-since-topo-change {
360 "Time since last topology changes occurred (in seconds)";
363 container rstp-bridge-port-attr {
365 "Collection of operational rstp port related attributes";
366 uses rstp-bridge-port-state-attr;
373 notification rstp-topology-change {
375 "RSTP: A topologyChange event is sent by a bridge when any of
376 its configured ports transitions from the Learning state
377 to the Forwarding state, or from the Forwarding state to
378 the Blocking state. The event is not sent if a rstp-new-root
379 event is sent for the same transition";
380 uses org-openroadm-resource-types:device-id;
383 notification rstp-new-root {
385 "RSTP:The rstp-new-root event indicates that the sending agent has
386 become the new root of the Spanning Tree ";
387 uses org-openroadm-resource-types:device-id;
390 augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
391 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'";