2de186e69aa90fe10dd234ad39185b8d1123a474
[sdnc/core.git] / sli / common / src / main / yang / ase-type.yang
1 module ase-type {
2
3   namespace "att:ase:type";
4   prefix ase-type;
5
6   organization "AT&T ASE";
7
8   revision 2014-06-09 {
9     description
10       "Initial version";
11   }
12   
13   /////////////////////////////////////////////////////
14   // ASE Service Model Typedefs & Groupings
15   /////////////////////////////////////////////////////
16
17   typedef query-type {
18     type enumeration {
19       enum getDevicePortDetails{
20         value 0;
21       }
22       enum GetServiceDetailsRequest{
23         value 1;
24       }
25     }
26   }
27
28   typedef uni-action-type {   
29     type enumeration {
30       enum PortPreReserveRequest{
31         value 0;
32       }
33       enum PortReleaseRequest{
34         value 1;
35       }
36       enum PortDeProvRequest{
37         value 2;
38       }
39       enum ChangePortProvRequest{
40         value 3;
41       }
42       enum PortActivateRequest{
43         value 4;
44       }
45       enum ChangePortActivateRequest{
46         value 5;
47       }
48       enum DisconnectPortRequest{
49         value 6;
50       }
51       enum getDevicePortDetails{
52         value 7;
53       }
54     }
55   }
56
57   typedef evc-action-type {   
58     type enumeration {
59       enum ConnectionProvRequest{
60         value 0;
61       }
62       enum ChangeConnectionProvRequest{
63         value 1;
64       }
65       enum ConnectionDeProvrequest{
66         value 2;
67       }
68       enum ConnectionActivateRequest{
69         value 3;
70       }
71       enum ChangeConnectionActivateRequest{
72         value 4;
73       }
74       enum DisconnectConnectionRequest{
75         value 5;
76       }
77       enum GetServiceDetailsRequest{
78         value 6;
79       }
80     }
81   }
82   
83   typedef evc-gos-type {
84     type enumeration {
85       enum "REAL-TIME"{
86         value 0;
87       }
88       enum "INTERACTIVE"{
89         value 1;
90       }
91       enum "BUSINESS-CRITICAL-HIGH"{
92         value 2;
93       }
94       enum "BUSINESS-CRITICAL-MEDIUM"{
95         value 3;
96       }
97       enum "NON-CRITICAL-HIGH"{
98         value 4;
99       }
100       enum "NON-CRITICAL-LOW"{
101         value 5;
102       }
103     }
104   }
105
106   typedef cir-rate-type {
107     type enumeration {
108       enum "Mbps"{
109         value 0;
110       }
111       enum "Gbps"{
112         value 1;
113       }
114     }
115   } 
116   
117   typedef ase-yes-no-type {
118     type enumeration {
119       enum "Y"{
120         value 0;
121       }
122       enum "N"{
123         value 1;
124       }
125     }
126   }
127   
128   typedef provisioning-indicator {
129      type enumeration {
130       enum "Y"{
131         value 0;
132       }
133       enum "N"{
134         value 1;
135       }
136     }
137   }
138
139   typedef media-type {
140     type enumeration {
141       enum "SFP-1GE-SX"{
142         value 0;
143       }
144       enum "SFP-1GE-LX"{
145         value 1;
146       }
147       enum "SFP-1GE"{
148         value 2;
149       }
150       enum "Ethernet-10_100_1000M"{
151         value 3;
152       }
153     }
154   }
155
156   typedef media-speed-type {
157     type enumeration {
158       enum "100"{
159         value 0;
160       }
161       enum "1000"{
162         value 1;
163       }
164       enum "10000"{
165         value 2;
166       }
167     }
168   }
169
170   typedef cos-category-type {
171     type enumeration {
172       enum "GOS"{
173         value 0;
174       }
175       enum "PPCOS"{
176         value 1;
177       }
178     }
179   }
180
181   typedef uni-gos-type {
182     type enumeration {
183       enum "INTERACTIVE"{
184         value 0;
185       }
186       enum "BUSINESS-CRITICAL-HIGH"{
187         value 1;
188       }
189       enum "BUSINESS-CRITICAL-MEDIUM"{
190         value 2;
191       }
192       enum "NON-CRITICAL-HIGH"{
193         value 3;
194       }
195     }
196   }
197
198   typedef uni-cir-value-type {
199     type enumeration {
200       enum "2"{
201         value 0;
202       }
203       enum "4"{
204         value 1;
205       }
206       enum "5"{
207         value 2;
208       }
209       enum "8"{
210         value 3;
211       }
212       enum "10"{
213         value 4;
214       }
215       enum "20"{
216         value 5;
217       }
218       enum "30"{
219         value 6;
220       }
221       enum "40"{
222         value 7;
223       }
224       enum "50"{
225         value 8;
226       }
227       enum "60"{
228         value 9;
229       }
230       enum "70"{
231         value 10;
232       }
233       enum "80"{
234         value 11;
235       }
236       enum "90"{
237         value 12;
238       }
239       enum "100"{
240         value 13;
241       }
242       enum "125"{
243         value 14;
244       }
245       enum "150"{
246         value 15;
247       }
248       enum "175"{
249         value 16;
250       }
251       enum "200"{
252         value 17;
253       }
254       enum "225"{
255         value 18;
256       }
257       enum "250"{
258         value 19;
259       }
260     }
261   }
262
263   typedef uni-mac-limit-type {
264     description "MAC address limit for UNI port";
265     type enumeration {
266       enum "Y"{
267         value 0;
268       }
269       enum "N"{
270         value 1;
271       }
272     } 
273   }
274
275   typedef port-tagging-type {
276     type enumeration {
277       enum "port-based"{
278         value 0;
279       }
280       enum "vlan-based"{
281         value 1;
282       }
283     }
284   }
285   
286   typedef port-status {
287     type enumeration {
288       enum "Available"{
289         value 0;
290       }
291       enum "Reserved"{
292         value 1;
293       }
294       enum "Active" {
295         value 2;
296       }
297     }
298   }
299
300   grouping uni-common-request-hdr {        
301     leaf request-id {
302       type string;
303       mandatory true;
304     }
305     leaf source {
306       description "The source system requesting action or info";
307       type string;
308       mandatory true;
309     }
310     leaf request-action {
311       description "action indicator for this service instance";
312       type uni-action-type;
313     }
314     leaf undo-indicator {
315       type provisioning-indicator;
316     }  
317     leaf notification-url {
318       description "When this field exists, NCS will return an "
319         + "acknowledgement that the request is legal "
320         + "Once the activate is finished (or fails) NCS"
321         + "will utilize the URL to indicate the status";
322       type string;
323     }
324   }
325   
326   grouping uni-common-return-hdr {
327     leaf request-action {
328       description "action indicator for this service instance";
329       type uni-action-type;
330     } 
331     leaf request-id {
332       description "Identifier for the request from NGO";
333       type string;
334       
335     } 
336   }
337
338   grouping uni-common-error-format {
339     leaf error-code {
340       description "Error code";
341       type int32;
342     }
343     leaf error-message {
344       description "Error text describing the API error occurance";
345       type string;
346     }
347   }
348
349   grouping query-common-hdr {
350     leaf request-id {
351       description "Identifier for the request from NGO";
352       type string;    
353     }
354     leaf request-type {
355       description "action indicator for this service instance";
356       type query-type;
357     }
358   }
359
360   grouping query-error-format {
361     leaf error-code {
362       description "Error code";
363       type int32;
364     }
365     leaf error-message {
366       description "Error text describing the API error occurance";
367       type string;
368     }
369   }
370
371   grouping evc-common-request-hdr {
372     leaf request-id {
373       description "Identifier for the request from NGO";
374       type string;
375     }
376     leaf source {
377       description "The source system requesting action or info";
378       type string;
379       mandatory true;
380     }
381     leaf uni-order-number {
382       type string;
383     }
384     leaf request-action {
385       description "action indicator for this service instance";
386       type evc-action-type;
387       mandatory true;
388     }
389     leaf undo-indicator {
390       type provisioning-indicator;
391     }  
392     leaf notification-url {
393       description "When this field exists, NCS will return an "
394         + "acknowledgement that the request is legal "
395         + "Once the activate is finished (or fails) NCS"
396         + "will utilize the URL to indicate the status";
397       type string;
398     }
399     leaf evc-name {
400       type string;
401       mandatory true;
402     }
403   }
404    
405   grouping evc-common-error-format {
406     leaf error-code {
407       description "Error code";
408       type int32;
409     }
410     leaf error-message {
411       description "Error text describing the API error occurance";
412       type string;
413     }
414   }
415
416   /////////////////////////////////////////
417   // UNI-PORTS table contains all circuits
418   /////////////////////////////////////////
419   container uni-ports {
420     description
421       "UNI port container";
422     list uni-port {
423       key "uni-circuit-id";
424       leaf uni-circuit-id {
425         type string;
426         mandatory true;
427       }
428       leaf subscriber-name {
429         type string;
430         mandatory true;
431       }
432       leaf uni-order-number {
433         type string;
434         mandatory true;
435       }
436       leaf edge-device-clli {
437         description "Edge device (e.g. EMT) on which port " 
438           + " reservation is needed";
439         type string;
440         mandatory true;
441       }
442       leaf uni-location-city {
443         type string;
444         mandatory true;
445       }
446       leaf uni-location-state {
447         type string;
448         mandatory true;
449       }
450       leaf media-type {
451         type media-type;
452         mandatory true;
453       }
454       leaf media-speed {
455         type media-speed-type;
456         mandatory true;
457       }
458       leaf uni-cir-value {
459         description "Integer value for the CIR";
460         type uni-cir-value-type;
461         mandatory true;
462       }
463       leaf uni-cir-units {
464         description "Units for the CIR";
465         type cir-rate-type;
466         mandatory true;
467       }
468       leaf cos-category {
469         description "CoS Type";
470         type cos-category-type;
471         mandatory true;   
472       }
473       leaf gos-profile {
474         description "GoS tpye";
475         type uni-gos-type;
476         mandatory true;
477       } 
478       leaf aditional-mac-allowed {
479         type uni-mac-limit-type;
480       }
481       leaf port-tagging {
482         type port-tagging-type;
483         mandatory true;
484       }
485       leaf port-status {
486         type port-status;
487       }
488       leaf name-value-pair {
489         type string;
490       }  
491     }
492   }
493
494   ///////////////////////////////////////////
495   // EVCS table contains all evc associations
496   ///////////////////////////////////////////
497   container evcs {
498     list evc {
499       key "evc-name";
500       leaf evc-name {
501         type string;
502         mandatory true;
503       }
504       leaf topology {
505         type enumeration {
506           enum "MultiPoint"{
507             value 0;
508           }
509           enum "PointToPoint"{
510             value 1;
511           }
512         }
513       }
514       list evc-leg {
515         key evc-access-name;
516         leaf evc-access-name {
517           type string;    
518         }
519         leaf subscriber-name {
520           type string;
521         }
522         leaf cvlan {
523           type uint16 {
524             range "2..4090";
525           }
526         }
527         leaf connection-cir-value {
528           type uni-cir-value-type;
529         }
530         leaf connection-cir-units-string {
531           type cir-rate-type;
532         }
533         leaf connection-gos-profile {
534           type evc-gos-type;
535         }
536         leaf connection-additional-mac-allowed {
537           type uni-mac-limit-type;
538         }
539         leaf connection-emc-indicator {
540           type enumeration {
541             enum "Y"{
542               value 0;
543             }
544             enum "N"{
545               value 1;
546             }
547           } 
548         }
549         leaf connection-emc-speed-value {
550           type uni-cir-value-type;
551         }
552         leaf connection-emc-speed-units-string {
553           type cir-rate-type;
554         }
555       }
556       leaf name-value-pair {
557         type string;
558       } 
559     }   
560   }
561 }