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