Sync Common folder
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-swdl@2017-12-15.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 2017-12-15;
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      AT&T Intellectual Property.  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 2017-12-15 {
48     description
49       "Version 2.2";
50   }
51   revision 2017-09-29 {
52     description
53       "Version 2.1";
54   }
55   revision 2017-07-28 {
56     description
57       "Version 2.0.1 - added revision-date to imports";
58   }
59   revision 2017-06-26 {
60     description
61       "Version 2.0";
62   }
63   revision 2016-10-14 {
64     description
65       "Version 1.2";
66   }
67
68   grouping sw-bank {
69     leaf sw-version {
70       type string;
71       description
72         "Gissue of the SW in this bank";
73     }
74     leaf sw-validation-timer {
75       type string {
76         pattern "(([0-1][0-9]|2[0-3])-([0-5][0-9])-([0-5][0-9]))";
77       }
78       description
79         "value of validation timer in hh-mm-ss";
80     }
81     leaf activation-date-time {
82       type yang:date-and-time;
83       description
84         "activation date and time: The date load was activated";
85     }
86   }
87
88   rpc sw-stage {
89     description
90       "SW stage - copies the SW from repo to staging bank";
91     input {
92       leaf filename {
93         type string {
94           length "10..255";
95         }
96         description
97           "file name which has the load";
98       }
99     }
100     output {
101       uses org-openroadm-common-types:rpc-response-status;
102     }
103   }
104   rpc sw-activate {
105     description
106       "Activate new load";
107     input {
108       leaf version {
109         type string;
110         description
111           " software version of the new load which is being activated";
112       }
113       leaf validationTimer {
114         type string;
115         description
116           "validation timer hh-mm-ss";
117       }
118     }
119     output {
120       uses org-openroadm-common-types:rpc-response-status;
121     }
122   }
123   rpc cancel-validation-timer {
124     description
125       "Cancel validation timer which user provisioned as part of activate command";
126     input {
127       leaf accept {
128         type boolean;
129         default "true";
130         description
131           " TRUE means  validation timer is cancelled and new load is accepted";
132       }
133     }
134     output {
135       uses org-openroadm-common-types:rpc-response-status;
136     }
137   }
138   notification sw-stage-notification {
139     description
140       "notification for sw-stage.";
141     uses org-openroadm-common-types:rpc-response-status;
142   }
143   notification sw-activate-notification {
144     description
145       "notification for sw-activate events.";
146     leaf sw-active-notification-type {
147       type org-openroadm-common-types:activate-notification-type;
148     }
149     uses org-openroadm-common-types:rpc-response-status;
150   }
151 }