d87aceeaaf766d969781ffb5f7ab19758b238add
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-database@2016-10-14.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 2016-10-14;
8   }
9
10   organization "Open ROADM MSA";
11   contact
12     "OpenROADM.org";
13   description
14     "This module contains definitions for System Management.
15
16      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
17      AT&T Intellectual Property.  All other rights reserved.
18
19      Redistribution and use in source and binary forms, with or without modification,
20      are permitted provided that the following conditions are met:
21
22      * Redistributions of source code must retain the above copyright notice, this
23        list of conditions and the following disclaimer.
24      * Redistributions in binary form must reproduce the above copyright notice,
25        this list of conditions and the following disclaimer in the documentation and/or
26        other materials provided with the distribution.
27      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
28        contributors may be used to endorse or promote products derived from this software
29        without specific prior written permission.
30
31      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
32      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
34      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
35      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
36      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
37      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40      POSSIBILITY OF SUCH DAMAGE.";
41
42   revision 2016-10-14 {
43     description
44       "Version 1.2";
45   }
46
47   rpc db-backup {
48     description
49       "copy  running DB to user provided file to a given path";
50     input {
51       leaf filename {
52         type string {
53           length "10..255";
54         }
55         description
56           "Path and file name is used with back-up.(xxx.DBS)";
57       }
58     }
59     output {
60       uses org-openroadm-common-types:rpc-response-status;
61     }
62   }
63   rpc db-restore {
64     description
65       "Restore database ";
66     input {
67       leaf filename {
68         type string {
69           length "10..255";
70         }
71         description
72           "PATH/file name use file name.(xxx.DBS)";
73       }
74       leaf nodeIDCheck {
75         type boolean;
76         default "true";
77         description
78           "Flag to indicate if sysNameCheck is required";
79       }
80     }
81     output {
82       uses org-openroadm-common-types:rpc-response-status;
83     }
84   }
85   rpc db-activate {
86     description
87       "activate the database";
88     input {
89       leaf rollBackTimer {
90         type string;
91         description
92           "rollbackTimer ";
93       }
94     }
95     output {
96       uses org-openroadm-common-types:rpc-response-status;
97     }
98   }
99   rpc cancel-rollback-timer {
100     description
101       "Cancel roll back timer which user provisioned as part of activate command";
102     input {
103       leaf accept {
104         type boolean;
105         description
106           " TRUE means rollback timer is cancelled and new load is accepted";
107       }
108     }
109     output {
110       uses org-openroadm-common-types:rpc-response-status;
111     }
112   }
113   rpc database-init {
114     description
115       "Initialize the database to default DB";
116     output {
117       uses org-openroadm-common-types:rpc-response-status;
118     } //output
119   }
120 }