2b890510de5742b85539bc3fbf9d3da177d58e14
[transportpce.git] / tests / ordmodels_2_1 / org-openroadm-otn-network-topology@2017-09-29.yang
1 module org-openroadm-otn-network-topology {
2   namespace "http://org/openroadm/otn/network/topology";
3   prefix otn-topo;
4
5   import ietf-network {
6     prefix nd;
7     revision-date 2015-06-08;
8   }
9   import ietf-network-topology {
10     prefix nwt;
11     revision-date 2015-06-08;
12   }
13   import org-openroadm-network-types {
14     prefix org-openroadm-network-types;
15     revision-date 2017-09-29;
16   }
17   import org-openroadm-xponder {
18     prefix xpdr;
19     revision-date 2017-09-29;
20   }
21   import org-openroadm-common-types {
22     prefix ct;
23     revision-date 2017-09-29;
24   }
25
26   organization
27     "OPEN ROADM MSA";
28   contact
29     "OpenROADM.org.";
30   description
31     "YANG definitions for network view of a ROADM
32
33      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
34      AT&T Intellectual Property.  All other rights reserved.
35
36      Redistribution and use in source and binary forms, with or without modification,
37      are permitted provided that the following conditions are met:
38
39      * Redistributions of source code must retain the above copyright notice, this
40        list of conditions and the following disclaimer.
41      * Redistributions in binary form must reproduce the above copyright notice,
42        this list of conditions and the following disclaimer in the documentation and/or
43        other materials provided with the distribution.
44      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
45        contributors may be used to endorse or promote products derived from this software
46        without specific prior written permission.
47
48      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
49      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
51      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
52      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
53      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
54      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
55      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
56      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
57      POSSIBILITY OF SUCH DAMAGE.";
58
59   revision 2017-09-29 {
60     description
61       "Version 2.1";
62   }
63
64   augment "/nd:network/nd:network-types" {
65     description
66       "Introduce new network type for the Open ROADM OTN
67        `     network topology";
68     container otn-topology {
69       presence "indicates OTN topology for Muxponder, Switchponder and OTN-switch";
70     }
71   }
72   augment "/nd:network/nd:node" {
73     when "../nd:network-types/otn-topology";
74     description
75       "This augmentations adds the OTN Node type to the generic node
76        definition and defines node-sepcific attributes for each node type
77        in the OTN Topology.";
78     leaf node-type {
79       type org-openroadm-network-types:openroadm-node-type;
80       description
81         "The type of a node in the OTN topology. Valid node types are 'MUXPDR' and 'SWITCH'";
82     }
83    container tp-bandwidth-sharing {
84       when "../node-type = 'MUXPDR' or ../node-type = 'SWITCH'";
85       uses org-openroadm-network-types:xpdr-tp-bandwidth-sharing;
86     }
87     container switching-pools {
88       when "../node-type = 'MUXPDR' or ../node-type = 'SWITCH'";
89       uses org-openroadm-network-types:xpdr-odu-switching-pools;
90       description
91         "ODU Switching pool";
92     }
93    container xpdr-attributes {
94       when "../node-type = 'MUXPDR' or ../node-type = 'SWITCH'";
95       uses xpdr:xpdr-topo-node-attributes;
96       description
97         "Topology-related attributes for Xponder nodes";
98     }
99   }
100   augment "/nd:network/nd:node/nwt:termination-point" {
101     when "../../nd:network-types/otn-topology";
102     description
103       "Defines the type of a termination point in the OTN topology and
104        TP-specific attributes for each termination point type.";
105     leaf tp-type {
106       type org-openroadm-network-types:openroadm-tp-type;
107       must "(../../otn-topo:node-type != 'MUXPDR' and ../../otn-topo:node-type != 'SWITCH') or
108      ((../../otn-topo:node-type = 'MUXPDR' or ../../otn-topo:node-type = 'SWITCH') and
109      (../otn-topo:tp-type = 'XPONDER-NETWORK' or ../otn-topo:tp-type = 'XPONDER-CLIENT' or ../otn-topo:tp-type = 'XPONDER-PORT'))" {
110         error-message "Invalid TP for node type Xponder";
111       }
112       description
113         "The TP type; also defines which TP types can be instantiated
114          on which Node types";
115     }
116     leaf eqpt-srg-id {
117         description
118           "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
119         type uint32;
120     }
121     container tp-supported-interfaces {
122       when "../tp-type = 'XPONDER-NETWORK' or ../tp-type = 'XPONDER-CLIENT' or ../tp-type = 'XPONDER-PORT'";
123       uses org-openroadm-network-types:xpdr-tp-supported-interfaces;
124       description
125         "Supported interface capability on the port.";
126     }
127     container xpdr-tp-port-connection-attributes {
128       when "../tp-type = 'XPONDER-NETWORK' or ../tp-type = 'XPONDER-CLIENT' or ../tp-type = 'XPONDER-PORT'";
129       description
130         "Topology-related attributes for Xpdr nodes";
131       uses xpdr:xpdr-otn-tp-attributes;
132       uses xpdr:xpdr-port-connection-attributes;
133       uses xpdr:xpdr-otn-tail-attributes;
134     }
135   }
136   augment "/nd:network/nwt:link" {
137     when "../nd:network-types/otn-topology";
138     description
139       "This augmentation defines Logical link types in the OTN topology connecting OTN elements";
140     leaf link-type {
141       type org-openroadm-network-types:openroadm-link-type;
142     }
143     leaf administrative-group {
144       type uint32;
145       description
146         "according to RFC 3630 definition";
147     }
148     leaf operational-state {
149       type ct:state;
150       description
151         "according to RFC 3630 definition";
152     }
153     leaf administrative-state {
154       type ct:state;
155       description
156         "according to RFC 3630 definition";
157     }
158     leaf available-bandwidth {
159       type uint32;
160       description
161         "Availabled bandwidth between OTN elements";
162     }
163     leaf used-bandwidth {
164       type uint32;
165       description
166         "Used bandwidth between OTN elements";
167     }
168     leaf ODU-protected {
169       type boolean;
170       description
171         "ODU protection flag";
172     }
173    }
174 }