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