upgrade models to OpenROADM service 5.1.0
[transportpce.git] / ordmodels / service / src / main / yang / org-openroadm-ber-test@2019-05-31.yang
1 module org-openroadm-ber-test {
2   namespace "http://org/openroadm/ber-test";
3   prefix org-openroadm-ber-test;
4
5   import org-openroadm-common-service-types {
6     prefix org-openroadm-common-service-types;
7     revision-date 2019-05-31;
8   }
9   import org-openroadm-common-ber-test {
10     prefix org-openroadm-common-ber-test;
11     revision-date 2018-11-30;
12   }
13   import ietf-yang-types {
14     prefix yang;
15     revision-date 2013-07-15;
16   }
17
18   organization
19     "Open ROADM MSA";
20   contact
21     "OpenROADM.org";
22   description
23     "YANG definitions for ber test
24
25       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
26       All other rights reserved.
27
28       Redistribution and use in source and binary forms, with or without modification,
29       are permitted provided that the following conditions are met:
30
31       * Redistributions of source code must retain the above copyright notice, this
32         list of conditions and the following disclaimer.
33       * Redistributions in binary form must reproduce the above copyright notice,
34         this list of conditions and the following disclaimer in the documentation and/or
35         other materials provided with the distribution.
36       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
37         contributors may be used to endorse or promote products derived from this software
38         without specific prior written permission.
39
40       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
41       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
42       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
43       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
44       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
46       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
47       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49       POSSIBILITY OF SUCH DAMAGE";
50
51   revision 2019-05-31 {
52     description
53       "Version 5.1.0";
54   }
55   revision 2019-03-29 {
56     description
57       "Version 5.0.0";
58   }
59   revision 2018-11-30 {
60     description
61       "Version 4.1.0";
62   }
63   revision 2018-09-28 {
64     description
65       "Version 4.0.0";
66   }
67   revision 2018-05-30 {
68     description
69       "Version 3.1.0";
70   }
71   revision 2018-03-30 {
72     description
73       "Version 3.0.0";
74   }
75
76   identity service-rpc-identity {
77     description
78       "Identifies the service rpc associated with this callback";
79   }
80
81   identity ber-test {
82     base service-rpc-identity;
83     description
84       "Identity for the ber-test rpc";
85   }
86
87   grouping ber-measurement {
88     leaf ber-passed {
89       type boolean;
90     }
91     leaf target-prefec-ber {
92       type decimal64 {
93         fraction-digits 4;
94       }
95     }
96     leaf measured-prefec-ber {
97       type decimal64 {
98         fraction-digits 4;
99       }
100     }
101   }
102
103   grouping ber-test-result-details-container {
104     container ber-results {
105       uses org-openroadm-common-ber-test:ber-test-options-container;
106       leaf line-rate {
107         type uint64;
108         units "seconds";
109       }
110       container a-end-ber-measurement {
111         uses ber-measurement;
112       }
113       container z-end-ber-measurement {
114         uses ber-measurement;
115       }
116     }
117   }
118   grouping ber-test-complex-result-details-container {
119     container ber-test-result-details {
120       list supporting-service-details {
121         key "index";
122         leaf index {
123           type uint16;
124           description
125             "Local id for list ";
126         }
127         uses org-openroadm-common-service-types:service-identifiers-container;
128         uses org-openroadm-common-service-types:service-ends-container;
129         leaf line-rate {
130           type uint64;
131           units "seconds";
132         }
133         container a-end-ber-measurement {
134           uses ber-measurement;
135         }
136         container z-end-ber-measurement {
137           uses ber-measurement;
138         }
139       }
140     }
141   }
142   grouping ber-test-complex-result-container {
143     container ber-results {
144       uses org-openroadm-common-ber-test:ber-test-options-container;
145       uses ber-test-complex-result-details-container;
146     }
147   }
148   rpc ber-test {
149     description
150       "This is the ber-test rpc. It is supported for a service in the service-list.";
151     input {
152       uses org-openroadm-common-service-types:sdnc-request-header;
153       leaf service-name {
154         type string;
155         mandatory true;
156       }
157       uses org-openroadm-common-ber-test:ber-test-options-container;
158     }
159     output {
160       uses org-openroadm-common-service-types:configuration-response-common;
161     }
162   }
163 rpc complex-ber-test {
164     description
165       "This is the complex-ber-test rpc. It is supported for a service in the service-list.";
166     input {
167       uses org-openroadm-common-service-types:sdnc-request-header;
168       leaf service-name {
169         type string;
170         mandatory true;
171       }
172       uses org-openroadm-common-ber-test:complex-ber-test-options-container;
173     }
174     output {
175       uses org-openroadm-common-service-types:configuration-response-common;
176     }
177   }
178   rpc service-rpc-ber-test-async-callback {
179     description
180       "This is the callback notification that the controller invokes on the carrier system.";
181     input {
182       uses org-openroadm-common-service-types:configuration-response-common;
183       uses org-openroadm-common-service-types:service-identifiers-container;
184       leaf rpc-timestamp {
185         type yang:date-and-time;
186         units "seconds";
187         description
188           "timestamp of the initial rpc command that invoked the test";
189       }
190       leaf timestamp {
191         type yang:date-and-time;
192         units "seconds";
193         description
194           "timestamp of the callback/notification.";
195       }
196       uses ber-test-result-details-container;
197     }
198     output {
199       uses org-openroadm-common-service-types:configuration-response-common;
200     }
201   }
202   rpc complex-service-rpc-ber-test-async-callback {
203     description
204       "This is the callback notification that the controller invokes on the carrier system.";
205     input {
206       uses org-openroadm-common-service-types:configuration-response-common;
207       uses org-openroadm-common-service-types:service-identifiers-container;
208       leaf rpc-timestamp {
209         type yang:date-and-time;
210         units "seconds";
211         description
212           "timestamp of the initial rpc command that invoked the test";
213       }
214       leaf timestamp {
215         type yang:date-and-time;
216         units "seconds";
217         description
218           "timestamp of the callback/notification.";
219       }
220       uses ber-test-complex-result-container;
221     }
222     output {
223       uses org-openroadm-common-service-types:configuration-response-common;
224     }
225   }
226   notification service-notification-ber-test {
227     description
228       "This is the callback notification that the controller invokes on the carrier system.";
229     uses org-openroadm-common-service-types:configuration-response-common;
230     uses org-openroadm-common-service-types:service-identifiers-container;
231     leaf rpc-timestamp {
232       type yang:date-and-time;
233       units "seconds";
234       description
235         "timestamp of the initial rpc command that invoked the test";
236     }
237     leaf timestamp {
238       type yang:date-and-time;
239       units "seconds";
240       description
241         "timestamp of the callback/notification.";
242     }
243     uses ber-test-result-details-container;
244   }
245   notification complex-service-notification-ber-test {
246     description
247       "This is the callback notification that the controller invokes on the carrier system.";
248     uses org-openroadm-common-service-types:configuration-response-common;
249     uses org-openroadm-common-service-types:service-identifiers-container;
250     leaf rpc-timestamp {
251       type yang:date-and-time;
252       units "seconds";
253       description
254         "timestamp of the initial rpc command that invoked the test";
255     }
256     leaf timestamp {
257       type yang:date-and-time;
258       units "seconds";
259       description
260         "timestamp of the callback/notification.";
261     }
262     uses ber-test-complex-result-details-container;
263   }
264 }
265