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