blob: e1031aa8b8357a7ecc8bd53b0542a28f3ce1c12e [file] [log] [blame]
Marc De Leenheerf20c7fb2017-05-05 10:24:41 -07001module org-openroadm-resource-types {
2 namespace "http://org/openroadm/resource/types";
3 prefix org-openroadm-resource-types;
4
5 organization "Open ROADM MSA";
6 contact
7 "OpenROADM.org";
8 description
9 "YANG definitions of common resource types.
10
11 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
12 AT&T Intellectual Property. All other rights reserved.
13
14 Redistribution and use in source and binary forms, with or without modification,
15 are permitted provided that the following conditions are met:
16
17 * Redistributions of source code must retain the above copyright notice, this
18 list of conditions and the following disclaimer.
19 * Redistributions in binary form must reproduce the above copyright notice,
20 this list of conditions and the following disclaimer in the documentation and/or
21 other materials provided with the distribution.
22 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
23 contributors may be used to endorse or promote products derived from this software
24 without specific prior written permission.
25
26 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
27 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
30 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
32 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 POSSIBILITY OF SUCH DAMAGE";
36
37 revision 2016-10-14 {
38 description
39 "Version 1.2";
40 }
41
42 grouping resource-type {
43 leaf type {
44 type resource-type-enum;
45 mandatory true;
46 }
47 leaf extension {
48 type string;
49 mandatory false;
50 }
51 }
52
53 typedef resource-type-enum {
54 type enumeration {
55 enum "other" {
56 value 1;
57 description
58 "Resource of type not found in list.";
59 }
60 enum "device" {
61 value 2;
62 description
63 "device - ROAMD, Xponder, etc";
64 }
65 enum "degree" {
66 value 3;
67 description
68 "degree";
69 }
70 enum "shared-risk-group" {
71 value 4;
72 description
73 "shared-risk-group";
74 }
75 enum "connection" {
76 value 5;
77 description
78 "connection";
79 }
80 enum "connection-map" {
81 value 6;
82 description
83 "connection-map";
84 }
85 enum "port" {
86 value 7;
87 description
88 "port";
89 }
90 enum "circuit-pack" {
91 value 8;
92 description
93 "circuit pack";
94 }
95 enum "internal-link" {
96 value 9;
97 description
98 "internal-link";
99 }
100 enum "physical-link" {
101 value 10;
102 description
103 "physical-link";
104 }
105 enum "interface" {
106 value 11;
107 description
108 "interface";
109 }
110 enum "shelf" {
111 value 12;
112 description
113 "shelf";
114 }
115 enum "service" {
116 value 13;
117 description
118 "service";
119 }
120 }
121 }
122
123 grouping device-id {
124 description
125 "Device identifier. Unique within the Controller.";
126 leaf node-id {
127 description
128 "Node Id is a globally unique identifier for a device.
129 Same as leafref value in model, if applicable.";
130 type string;
131 }
132 }
133
134 grouping circuit-pack-name {
135 leaf circuit-pack-name {
136 description
137 "Circuit-Pack identifier. Unique within the context of a device.
138 Same as leafref value in model, if applicable.";
139 type string;
140 mandatory true;
141 }
142 }
143
144 grouping port-name {
145 uses circuit-pack-name;
146 leaf port-name {
147 description
148 "Port identifier. Unique within the context of a circuit-pack.
149 Same as leafref value in model, if applicable.";
150 type string;
151 }
152 }
153
154 grouping physical-link-name {
155 leaf physical-link-name {
156 description
157 "Physical Link identifier. Unique within the context of a device.
158 Same as leafref value in model, if applicable.";
159 type string;
160 mandatory true;
161 }
162 }
163
164 grouping internal-link-name {
165 leaf internal-link-name {
166 description
167 "Internal Link identifier. Unique within the context of a device.
168 Same as leafref value in model, if applicable.";
169 type string;
170 mandatory true;
171 }
172 }
173
174 grouping connection-number {
175 leaf connection-number {
176 description
177 "Connection identifier. Unique within the context of a device.
178 Same as leafref value in model, if applicable.";
179 type string;
180 }
181 }
182
183 grouping degree-number {
184 leaf degree-number {
185 description
186 "Degree identifier. Unique within the context of a device.
187 Same as leafref value in model, if applicable.";
188 type uint16;
189 }
190 }
191
192 grouping srg-number {
193 leaf srg-number {
194 description
195 "Shared Risk Group identifier. Unique within the context of a device.
196 Same as leafref value in model, if applicable.";
197 type uint16;
198 }
199 }
200
201 grouping shelf-name {
202 leaf shelf-name {
203 description
204 "Shelf-id identifier. Unique within the context of a device.
205 Same as leafref value in model, if applicable.";
206 type string;
207 mandatory true;
208 }
209 }
210
211 grouping service-name {
212 leaf service-name {
213 description
214 "Service identifier. Unique within the context of a network.
215 Same as leafref value in model, if applicable.";
216 type string;
217 mandatory true;
218 }
219 }
220
221 grouping interface-name {
222 leaf interface-name {
223 description
224 "Interface identifier.";
225 type string;
226 mandatory true;
227 }
228 }
229
230 typedef resource-notification-type {
231 description
232 "Type of notification about a resource";
233 type enumeration {
234 enum "resourceCreation" {
235 value 1;
236 description
237 "A new instance of a resource has been created.";
238 }
239 enum "resourceModification" {
240 value 2;
241 description
242 "An exhisting instance of a resource has been modified. This shall be triggered by changes in configuration, state, status etc.
243 It shall not be triggered by changes in performance measurements, power and temperature readings or any other data that is highlyvolatile. ";
244 }
245 enum "resourceDeletion" {
246 value 3;
247 description
248 "An exhisting instance of a resource has been removed.";
249 }
250 }
251 }
252}