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 2017-12-15;
9 import org-openroadm-resource-types {
10 prefix org-openroadm-resource-types;
11 revision-date 2017-12-15;
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.";
58 "Version 2.0.1 - added revision-date to imports";
69 typedef bridge-id-type {
72 "Unique Bridge Identifier";
75 grouping rstp-common-bridge-config {
76 leaf bridge-priority {
82 "Bridge Priority Value";
95 "The time interval during which no more than two
96 BPDUs transmitted by this node in seconds - not used in rstp mode (in seconds)";
104 "The time between the transmission of BPDU's by this node on any
105 port, when role is root (in seconds)";
113 "The value that all bridges use for MaxAge when this bridge
114 is acting as the root";
122 "The port on the Switch spends this time in the listening
123 state while moving from the blocking state to the forwarding state (in seconds)";
125 leaf transmit-hold-count {
131 "Maximum BPDU transmission rate";
135 grouping rstp-root-bridge-attr {
136 leaf root-bridge-port {
139 "Port id of the root port";
141 leaf root-path-cost {
144 "The cost of the path to the root as
145 seen from this bridge";
147 leaf root-bridge-priority {
150 "Root Bridge Priority Value";
152 leaf root-bridge-id {
155 "Root Bridge identifier";
157 leaf root-hold-time {
160 "The time interval during which no more than two
161 BPDUs transmitted by this node in seconds at root node (in seconds)";
163 leaf root-hello-time {
166 "The time between the transmission of BPDU's used at root node (in seconds)";
171 "The value that all bridges use for MaxAge used at root node";
173 leaf root-forward-delay {
176 "The time in seconds spent on the listening state used at root node (in seconds)";
180 grouping rstp-bridge-port-state-attr {
181 list rstp-bridge-port-table {
185 "This table contains port-specific information for rstp state attributes";
191 "Interface name of the port";
193 leaf bridge-port-state {
202 "The port's current state";
204 leaf bridge-port-role {
214 "The role payed by this port in the bridge";
216 leaf bridge-port-id {
219 "Unique port id of this port";
221 leaf oper-edge-bridge-port {
224 "The operational value of the Edge Port parameter";
226 leaf designated-bridge-port {
229 "Port id of the designated port";
231 leaf designated-bridgeid {
234 "The Bridge Identifier of the bridge that this port considers
235 to be the Designated Bridge for this port's segment";
240 grouping rstp-bridge-port-attr {
241 list rstp-bridge-port-table {
245 "Table contains port-specific information for rstp config";
248 path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
251 "Interface name of the port";
255 range "2000..200000";
259 "The contribution of this port to the path cost of
260 paths towards the spanning tree root which include this port also";
267 "The value of the priority field";
272 grouping rstp-container {
275 "Open ROADM RSTP top level";
276 list rstp-bridge-instance {
280 "rstp bridge instance, max instance = 1";
286 "unique name of the bridge";
288 container rstp-config {
290 "Collection of rstp configuration attributes";
291 uses rstp-common-bridge-config;
292 uses rstp-bridge-port-attr;
294 container rstp-state {
297 "Collection of rstp operational attributes";
298 container rstp-bridge-attr {
300 "Collection of operational rstp bridge attributes";
301 uses rstp-root-bridge-attr;
305 "Bridge identifier of the bridge";
307 leaf topo-change-count {
310 "The total number of topology changes";
312 leaf time-since-topo-change {
315 "Time since last topology changes occurred (in seconds)";
318 container rstp-bridge-port-attr {
320 "Collection of operational rstp port related attributes";
321 uses rstp-bridge-port-state-attr;
328 notification rstp-topology-change {
330 "RSTP: A topologyChange event is sent by a bridge when any of
331 its configured ports transitions from the Learning state
332 to the Forwarding state, or from the Forwarding state to
333 the Blocking state. The event is not sent if a rstp-new-root
334 event is sent for the same transition";
335 uses org-openroadm-resource-types:device-id;
337 notification rstp-new-root {
339 "RSTP:The rstp-new-root event indicates that the sending agent has
340 become the new root of the Spanning Tree ";
341 uses org-openroadm-resource-types:device-id;
343 augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
344 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'";