Merge "Fix bug when creating SRG termination points"
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-swdl@2020-05-29.yang
1 module org-openroadm-swdl {
2   namespace "http://org/openroadm/de/swdl";
3   prefix org-openroadm-swdl;
4
5   import ietf-yang-types {
6     prefix yang;
7     revision-date 2013-07-15;
8   }
9   import org-openroadm-common-types {
10     prefix org-openroadm-common-types;
11     revision-date 2020-05-29;
12   }
13
14   organization
15     "Open ROADM MSA";
16   contact
17     "OpenROADM.org";
18   description
19     "Yang definitions for System Management.
20
21      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
22      All other rights reserved.
23
24      Redistribution and use in source and binary forms, with or without modification,
25      are permitted provided that the following conditions are met:
26
27      * Redistributions of source code must retain the above copyright notice, this
28        list of conditions and the following disclaimer.
29      * Redistributions in binary form must reproduce the above copyright notice,
30        this list of conditions and the following disclaimer in the documentation and/or
31        other materials provided with the distribution.
32      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
33        contributors may be used to endorse or promote products derived from this software
34        without specific prior written permission.
35
36      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
37      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
40      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
42      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
43      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45      POSSIBILITY OF SUCH DAMAGE.";
46
47   revision 2020-05-29 {
48     description
49       "Version 7.1.0";
50   }
51   revision 2020-03-27 {
52     description
53       "Version 7.0.0";
54   }
55   revision 2019-11-29 {
56     description
57       "Version 6.1.0";
58   }
59   revision 2019-09-27 {
60     description
61       "Version 6.0.0";
62   }
63   revision 2019-05-31 {
64     description
65       "Version 5.1.0";
66   }
67   revision 2019-03-29 {
68     description
69       "Version 5.0.0";
70   }
71   revision 2018-11-30 {
72     description
73       "Version 4.1.0";
74   }
75   revision 2018-09-28 {
76     description
77       "Version 4.0.0";
78   }
79   revision 2018-03-30 {
80     description
81       "Version 3.0.0";
82   }
83   revision 2017-12-15 {
84     description
85       "Version 2.2";
86   }
87   revision 2017-09-29 {
88     description
89       "Version 2.1";
90   }
91   revision 2017-07-28 {
92     description
93       "Version 2.0.1 - added revision-date to imports";
94   }
95   revision 2017-06-26 {
96     description
97       "Version 2.0";
98   }
99   revision 2016-10-14 {
100     description
101       "Version 1.2";
102   }
103
104   grouping sw-bank {
105     description
106       "software bank group";
107     leaf sw-version {
108       type string;
109       description
110         "Gissue of the SW in this bank";
111     }
112     leaf sw-validation-timer {
113       type string {
114         pattern '(([0-1][0-9]|2[0-3])-([0-5][0-9])-([0-5][0-9]))';
115       }
116       description
117         "value of validation timer in hh-mm-ss";
118     }
119     leaf activation-date-time {
120       type yang:date-and-time;
121       description
122         "activation date and time: The date load was activated";
123     }
124   }
125
126   grouping database-info-group {
127     description
128       "database info group";
129     leaf last-restored-time {
130       type yang:date-and-time;
131       description
132         "last restored time for the database, or the time that the database was created, whichever is later";
133     }
134     leaf rollback-timer {
135       type string {
136         pattern '(([0-1][0-9]|2[0-3])-([0-5][0-9])-([0-5][0-9]))';
137       }
138       description
139         "value of rollback timer in hh-mm-ss";
140     }
141     leaf activation-date-time {
142       type yang:date-and-time;
143       description
144         "activation date and time: The date load was activated";
145     }
146   }
147
148   rpc sw-stage {
149     description
150       "SW stage - copies the SW from repo to staging bank";
151     input {
152       leaf filename {
153         type string {
154           length "10..255";
155         }
156         description
157           "file name which has the load";
158       }
159     }
160     output {
161       uses org-openroadm-common-types:rpc-response-status;
162     }
163   }
164
165   rpc sw-activate {
166     description
167       "Activate new load";
168     input {
169       leaf version {
170         type string;
171         description
172           " software version of the new load which is being activated";
173       }
174       leaf validationTimer {
175         type string;
176         description
177           "validation timer hh-mm-ss";
178       }
179     }
180     output {
181       uses org-openroadm-common-types:rpc-response-status;
182     }
183   }
184
185   rpc cancel-validation-timer {
186     description
187       "Cancel validation timer which user provisioned as part of activate command";
188     input {
189       leaf accept {
190         type boolean;
191         default "true";
192         description
193           " TRUE means  validation timer is cancelled and new load is accepted";
194       }
195     }
196     output {
197       uses org-openroadm-common-types:rpc-response-status;
198     }
199   }
200
201   notification sw-stage-notification {
202     description
203       "notification for sw-stage.";
204     uses org-openroadm-common-types:rpc-response-status;
205   }
206
207   notification sw-activate-notification {
208     description
209       "notification for sw-activate events.";
210     leaf sw-active-notification-type {
211       type org-openroadm-common-types:activate-notification-type;
212     }
213     uses org-openroadm-common-types:rpc-response-status;
214   }
215 }