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