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-02-06;
10 organization "Open ROADM MSA";
14 "YANG definitions for rstp protocol.
17 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
18 AT&T Intellectual Property. All other rights reserved.
20 Redistribution and use in source and binary forms, with or without modification,
21 are permitted provided that the following conditions are met:
23 * Redistributions of source code must retain the above copyright notice, this
24 list of conditions and the following disclaimer.
25 * Redistributions in binary form must reproduce the above copyright notice,
26 this list of conditions and the following disclaimer in the documentation and/or
27 other materials provided with the distribution.
28 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
29 contributors may be used to endorse or promote products derived from this software
30 without specific prior written permission.
32 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
33 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
35 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
36 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
37 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
38 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
39 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 POSSIBILITY OF SUCH DAMAGE.";
48 typedef bridge-id-type {
51 "Unique Bridge Identifier";
54 grouping rstp-common-bridge-config {
55 leaf bridge-priority {
57 "Bridge Priority Value";
70 "The time interval during which no more than two
71 BPDUs transmitted by this node in seconds - not used in rstp mode (in seconds)";
79 "The time between the transmission of BPDU's by this node on any
80 port, when role is rooti (in seconds)";
88 "The value that all bridges use for MaxAge when this bridge
89 is acting as the root";
97 "The port on the Switch spends this time in the listening
98 state while moving from the blocking state to the forwarding state (in seconds)";
104 leaf transmit-hold-count {
106 "Maximum BPDU transmission rate";
114 grouping rstp-root-bridge-attr {
115 leaf root-bridge-port {
117 "Port id of the root port";
120 leaf root-path-cost {
122 "The cost of the path to the root as
123 seen from this bridge";
126 leaf root-bridge-priority {
128 "Root Bridge Priority Value";
131 leaf root-bridge-id {
133 "Root Bridge identifier";
136 leaf root-hold-time {
138 "The time interval during which no more than two
139 BPDUs transmitted by this node in seconds at root node (in seconds)";
142 leaf root-hello-time {
144 "The time between the transmission of BPDU's used at root node (in seconds)";
149 "The value that all bridges use for MaxAge used at root node";
152 leaf root-forward-delay {
154 "The time in seconds spent on the listening state used at root node (in seconds)";
159 grouping rstp-bridge-port-state-attr {
160 list rstp-bridge-port-table {
163 "This table contains port-specific information for rstp state attributes";
167 "Interface name of the port";
172 leaf bridge-port-state {
174 "The port's current state";
183 leaf bridge-port-role {
185 "The role payed by this port in the bridge";
195 leaf bridge-port-id {
197 "Unique port id of this port";
200 leaf oper-edge-bridge-port {
202 "The operational value of the Edge Port parameter";
205 leaf designated-bridge-port {
207 "Port id of the designated port";
210 leaf designated-bridgeid {
212 "The Bridge Identifier of the bridge that this port considers
213 to be the Designated Bridge for this port's segment";
219 grouping rstp-bridge-port-attr {
220 list rstp-bridge-port-table {
223 "Table contains port-specific information for rstp config";
227 "Interface name of the port";
229 path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
234 "The contribution of this port to the path cost of
235 paths towards the spanning tree root which include this port also";
237 range "2000..200000";
243 "The value of the priority field";
251 grouping rstp-container {
254 "Open ROADM RSTP top level";
255 list rstp-bridge-instance {
258 "rstp bridge instance, max instance = 1";
262 "unique name of the bridge";
267 container rstp-config {
269 "Collection of rstp configuration attributes";
270 uses rstp-common-bridge-config;
271 uses rstp-bridge-port-attr;
273 container rstp-state {
275 "Collection of rstp operational attributes";
277 container rstp-bridge-attr {
279 "Collection of operational rstp bridge attributes";
280 uses rstp-root-bridge-attr;
283 "Bridge identifier of the bridge";
286 leaf topo-change-count {
288 "The total number of topology changes";
291 leaf time-since-topo-change {
293 "Time since last topology changes occured (in seconds)";
297 container rstp-bridge-port-attr {
299 "Collection of operational rstp port related attributes";
300 uses rstp-bridge-port-state-attr;
307 augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
308 when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='rdm'";