Sync Common folder
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-database@2017-12-15.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 2017-12-15;
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      AT&T Intellectual Property.  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 2017-12-15 {
44     description
45       "Version 2.2";
46   }
47   revision 2017-09-29 {
48     description
49       "Version 2.1";
50   }
51   revision 2017-07-28 {
52     description
53       "Version 2.0.1 - added revision-date to imports";
54   }
55   revision 2017-06-26 {
56     description
57       "Version 2.0";
58   }
59   revision 2016-10-14 {
60     description
61       "Version 1.2";
62   }
63
64   rpc db-backup {
65     description
66       "copy  running DB to user provided file to a given path";
67     input {
68       leaf filename {
69         type string {
70           length "10..255";
71         }
72         description
73           "Path and file name is used with back-up.(xxx.DBS)";
74       }
75     }
76     output {
77       uses org-openroadm-common-types:rpc-response-status;
78     }
79   }
80   rpc db-restore {
81     description
82       "Restore database ";
83     input {
84       leaf filename {
85         type string {
86           length "10..255";
87         }
88         description
89           "PATH/file name use file name.(xxx.DBS)";
90       }
91       leaf nodeIDCheck {
92         type boolean;
93         default "true";
94         description
95           "Flag to indicate if sysNameCheck is required";
96       }
97     }
98     output {
99       uses org-openroadm-common-types:rpc-response-status;
100     }
101   }
102   rpc db-activate {
103     description
104       "activate the database";
105     input {
106       leaf rollBackTimer {
107         type string;
108         description
109           "rollbackTimer ";
110       }
111     }
112     output {
113       uses org-openroadm-common-types:rpc-response-status;
114     }
115   }
116   rpc cancel-rollback-timer {
117     description
118       "Cancel roll back timer which user provisioned as part of activate command";
119     input {
120       leaf accept {
121         type boolean;
122         description
123           " TRUE means rollback timer is cancelled and new load is accepted";
124       }
125     }
126     output {
127       uses org-openroadm-common-types:rpc-response-status;
128     }
129   }
130   rpc database-init {
131     description
132       "Initialize the database to default DB";
133     output {
134       uses org-openroadm-common-types:rpc-response-status;
135     }
136   }
137   notification db-backup-notification {
138     description
139       "notification for db-backup operation events.";
140     uses org-openroadm-common-types:rpc-response-status;
141   }
142   notification db-restore-notification {
143     description
144       "notification for db-restore operation events.";
145     uses org-openroadm-common-types:rpc-response-status;
146   }
147   notification db-activate-notification {
148     description
149       "notification for database activation events.";
150     leaf db-active-notification-type {
151       type org-openroadm-common-types:activate-notification-type;
152     }
153     uses org-openroadm-common-types:rpc-response-status;
154   }
155 }