Upgrade Network model from 2.1 to 4.1
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-common-network@2018-11-30.yang
1 module org-openroadm-common-network {
2   yang-version 1.1;
3   namespace "http://org/openroadm/common/network";
4   prefix cnet;
5
6   import ietf-network {
7     prefix nd;
8     revision-date 2018-02-26;
9   }
10   import ietf-network-topology {
11     prefix nwt;
12     revision-date 2018-02-26;
13   }
14   import org-openroadm-network-types {
15     prefix org-openroadm-network-types;
16     revision-date 2018-11-30;
17   }
18   import org-openroadm-common-state-types {
19     prefix org-openroadm-common-state-types;
20     revision-date 2018-11-30;
21   }
22   import org-openroadm-equipment-states-types {
23     prefix org-openroadm-equipment-states-types;
24     revision-date 2018-11-30;
25   }
26
27   organization
28     "OPEN ROADM MSA";
29   contact
30     "www.OpenROADM.org.";
31   description
32     "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
33      All other rights reserved.
34
35      Redistribution and use in source and binary forms, with or without modification,
36      are permitted provided that the following conditions are met:
37
38      * Redistributions of source code must retain the above copyright notice, this
39        list of conditions and the following disclaimer.
40      * Redistributions in binary form must reproduce the above copyright notice,
41        this list of conditions and the following disclaimer in the documentation and/or
42        other materials provided with the distribution.
43      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
44        contributors may be used to endorse or promote products derived from this software
45        without specific prior written permission.
46
47      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
48      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
49      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
50      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
51      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
52      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
53      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
54      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
55      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
56      POSSIBILITY OF SUCH DAMAGE.";
57
58   revision 2018-11-30 {
59     description
60       "Version 4.1.0";
61   }
62   revision 2018-09-28 {
63     description
64       "Version 4.0.0";
65   }
66   revision 2018-05-30 {
67     description
68       "Version 3.1.0";
69   }
70   revision 2018-03-30 {
71     description
72       "Version 3.0.0";
73   }
74
75   augment "/nd:networks/nd:network/nd:network-types" {
76     description
77       "Introduce new network type for the Open ROADM common network";
78     container openroadm-common-network {
79       presence "indicates common network of Open ROADMs";
80       description
81         "The presence of the container node indicates Open ROADM common network";
82     }
83   }
84   augment "/nd:networks/nd:network/nd:node" {
85     when "../nd:network-types/openroadm-common-network";
86     description
87       "Augment the generic network node with Open ROADM common attributes.";
88     leaf node-type {
89       type org-openroadm-network-types:openroadm-node-type;
90       description
91         "A component of the network topology. Once the node-type is configured, it should not be modified.";
92     }
93     leaf node-status {
94       type org-openroadm-network-types:openroadm-node-status;
95       status deprecated;
96     }
97     leaf lifecycle-state {
98       type org-openroadm-common-state-types:lifecycle-state;
99       description
100         "Lifecycle State of a node. Whether it is planned, deployed, in maintenance, etc.";
101     }
102   }
103   augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
104     when "../../nd:network-types/openroadm-common-network";
105     leaf tp-type {
106       type org-openroadm-network-types:openroadm-tp-type;
107       description
108         "The type of a termination point in the ROADM topology.";
109     }
110     leaf eqpt-srg-id {
111       type uint32;
112       description
113         "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
114     }
115     leaf lifecycle-state {
116       type org-openroadm-common-state-types:lifecycle-state;
117       description
118         "Lifecycle State of a termination point. Whether it is planned, deployed, in maintenance, etc.";
119     }
120   }
121   augment "/nd:networks/nd:network/nwt:link" {
122     when "../nd:network-types/openroadm-common-network";
123     description
124       "This augmentation defines common link attributes in the Open ROADM common network";
125     leaf link-type {
126       type org-openroadm-network-types:openroadm-link-type;
127     }
128     leaf clfi {
129       type string;
130     }
131     leaf opposite-link {
132       type leafref {
133         path "../../nwt:link/nwt:link-id";
134       }
135       description
136         "optional - pointer to reverse link in case of bidirectional link. Supersedes opposite-link
137          originally defined in OMS-attributes container, to apply to any kind of link in the topology";
138     }
139     leaf link-length {
140       type decimal64 {
141         fraction-digits 2;
142       }
143     }
144     leaf link-latency {
145       type uint32;
146       description
147         "Latency of a link";
148     }
149     leaf TE-metric {
150       type uint32;
151       description
152         "defines a Traffic Engineering metric which could be used for any type of link.
153          Supersedes TE-metric originally defined in OMS-attributes grouping";
154     }
155     list link-concatenation {
156       key "SRLG-Id";
157       leaf SRLG-Id {
158         type uint32;
159         description
160           "unique identifier for SRLG";
161       }
162       leaf SRLG-length {
163         type uint32;
164         description
165           "fiber length in meters";
166       }
167     }
168     leaf administrative-group {
169       type uint32;
170       description
171         "according to RFC 3630 definition";
172     }
173     leaf operational-state {
174       type org-openroadm-common-state-types:state;
175     }
176     leaf administrative-state {
177       type org-openroadm-equipment-states-types:admin-states;
178     }
179     leaf lifecycle-state {
180       type org-openroadm-common-state-types:lifecycle-state;
181       description
182         "Lifecycle State of a link. Whether it is planned, deployed, in maintenance, etc.";
183     }
184   }
185 }