blob: f5b0653f4f0816603311b0bbe18a9a47c7c4e952 [file] [log] [blame]
Jeff Groom34c28ce2018-04-26 19:42:18 -06001module ciena-waveserver-software {
2 namespace "urn:ciena:params:xml:ns:yang:ciena-ws:ciena-waveserver-software";
3 prefix software;
4
5 import ciena-waveserver-typedefs {
6 prefix cienawstypes;
7 }
8
9 organization
10 "Ciena Corporation";
11 contact
12 "Web URL: http://www.ciena.com/
13 Postal: 7035 Ridge Road
14 Hanover, Maryland 21076
15 U.S.A.
16 Phone: +1 800-921-1144
17 Fax: +1 410-694-5750";
18 description
19 "This module defines Software Status and Upgrade support for Ciena's Waveserver Platform.";
20
21 revision 2017-12-07 {
22 description
23 "Added support for multi-step upgrade RPCs for 'download', 'activate', and 'commit'.
24 Added 'upgrade-log' attribute support.";
25 reference "Waveserver Ai user's guide.";
26 }
27 revision 2017-09-07 {
28 description
29 "Waveserver Platform Data Model
30 Migrated from Waveserver Classic R1.4 YANG model.
31 Updated namespace to 'ciena-waveserver'.
32 Updated 'software-op-state' and 'upgrade-op-state' enum values.
33 Removed several unsupported attributes/containers/RPCs.
34 Added WCS and Module status containers/attributes.
35 Moved some common attributes into groupings.";
36 reference "Waveserver Ai user's guide.";
37 }
38
39 grouping software-device-status-group {
40 description
41 "Grouping for WCS and Module software status attributes.";
42 leaf boot-zone {
43 type boot-zone;
44 description
45 "The boot zone for the specified device.";
46 }
47 leaf last-restart {
48 type cienawstypes:string-maxl-32;
49 description
50 "The date and time of last restart in the format of a human readable string. e.g 'Wed Jun 30 21:49:08 2015'";
51 }
52 leaf last-restart-reason {
53 type cienawstypes:restart-reason;
54 description
55 "Cause for the last restart.";
56 }
57 leaf boot-image-a {
58 type cienawstypes:string-maxl-64;
59 description
60 "The boot image or firmware image name for zone A.";
61 }
62 leaf boot-image-b {
63 type cienawstypes:string-maxl-64;
64 description
65 "The boot image or firmware image name for zone B.";
66 }
67 }
68
69 grouping software-release-group {
70 description
71 "Grouping for active and installed software release attributes.";
72 leaf version {
73 type cienawstypes:string-maxl-32;
74 description
75 "The software release version.";
76 }
77 leaf build-number {
78 type cienawstypes:string-maxl-32;
79 description
80 "The software release build number.";
81 }
82 leaf build-tag {
83 type cienawstypes:string-maxl-32;
84 description
85 "The software release build tag.";
86 }
87 leaf build-date {
88 type cienawstypes:string-maxl-32;
89 description
90 "The software release build date.";
91 }
92 }
93
94 typedef software-rtncode {
95 type uint32;
96 description
97 "Return code value used in the software module. 0 indicate success. None-zero indicate failure.";
98 }
99
100 typedef software-op-state {
101 type enumeration {
102 enum "unknown" {
103 description
104 "Software operational state is unknown.";
105 }
106 enum "normal" {
107 description
108 "Software operational state is normal.";
109 }
110 enum "upgrade-in-progress" {
111 description
112 "Software upgrade is in progress.";
113 }
114 enum "automatic-upgrade-in-progress" {
115 description
116 "Automatic software upgrade is in progress.";
117 }
118 enum "restart-in-progress" {
119 description
120 "System restart is in progress. WCS is initializing but not yet in 'boot-complete' state.";
121 }
122 enum "module-restart-in-progress" {
123 description
124 "One or more modules is initializing and has not yet reached run-mode 'run' state.";
125 }
126 enum "application-failed" {
127 description
128 "One or more required applications is not running.";
129 }
130 }
131 description
132 "Software operational state.";
133 }
134
135 typedef upgrade-op-state {
136 type enumeration {
137 enum "unknown" {
138 description
139 "Upgrade operational state is unknown.";
140 }
141 enum "idle" {
142 description
143 "Software upgrade is idle.";
144 }
145 enum "download-in-progress" {
146 description
147 "Software download is in progress.";
148 }
149 enum "download-complete" {
150 description
151 "Software download is complete.";
152 }
153 enum "download-failed" {
154 description
155 "Software download failed.";
156 }
157 enum "activation-in-progress" {
158 description
159 "Software activation is in progress.";
160 }
161 enum "activation-complete" {
162 description
163 "Software activation is complete.";
164 }
165 enum "activation-failed" {
166 description
167 "Software activation failed.";
168 }
169 enum "installation-in-progress" {
170 description
171 "Software installation is in progress.";
172 }
173 enum "installation-failed" {
174 description
175 "Software installation failed.";
176 }
177 enum "commit-in-progress" {
178 description
179 "Software commit is in progress.";
180 }
181 enum "commit-failed" {
182 description
183 "Software commit failed.";
184 }
185 enum "cancel-in-progress" {
186 description
187 "Software cancel operation is in progress.";
188 }
189 enum "cancel-failed" {
190 description
191 "Software cancel operation failed.";
192 }
193 enum "delete-in-progress" {
194 description
195 "Software delete operation is in progress.";
196 }
197 enum "delete-failed" {
198 description
199 "Software delete operation failed.";
200 }
201 enum "automatic-upgrade-in-progress" {
202 description
203 "Automatic software upgrade is in progress.";
204 }
205 enum "automatic-upgrade-failed" {
206 description
207 "Automatic software upgrade failed.";
208 }
209 enum "module-cold-restart-required" {
210 description
211 "A cold restart is required on one or more modules.";
212 }
213 }
214 description
215 "Software upgrade operational state.";
216 }
217
218 typedef boot-zone {
219 type enumeration {
220 enum "unknown" {
221 description
222 "Boot zone is unknown.";
223 }
224 enum "a" {
225 description
226 "Boot zone A.";
227 }
228 enum "b" {
229 description
230 "Boot zone B.";
231 }
232 }
233 description
234 "The boot zone type.";
235 }
236
237 container waveserver-software {
238 config false;
239 description
240 "Waveserver software upgrade and load management.";
241 container status {
242 description
243 "Waveserver software status information.";
244 leaf software-operational-state {
245 type software-op-state;
246 description
247 "The current software operational state.";
248 }
249 leaf upgrade-operational-state {
250 type upgrade-op-state;
251 description
252 "The current upgrade operational state.";
253 }
254 leaf committed-version {
255 type cienawstypes:string-maxl-64;
256 description
257 "The committed software release version.";
258 }
259 leaf active-version {
260 type cienawstypes:string-maxl-64;
261 description
262 "The active software release version.";
263 }
264 leaf upgrade-to-version {
265 type cienawstypes:string-maxl-64;
266 description
267 "The software release version currently being upgraded to, if applicable.";
268 }
269 leaf last-operation {
270 type cienawstypes:string-maxl-128;
271 description
272 "The software upgrade last operation.";
273 }
274 leaf upgrade-log {
275 type cienawstypes:string-maxl-128;
276 description
277 "The software upgrade log file URI on the Waveserver.";
278 }
279 }
280 container wcs-status {
281 description
282 "Software status information for the Waveserver Control Subsystem control module.";
283 leaf boot-image-version {
284 type cienawstypes:string-maxl-32;
285 description
286 "The current boot image version for the WCS.";
287 }
288 leaf fpga-id {
289 type cienawstypes:string-maxl-64;
290 description
291 "The current FPGA image identifier for the WCS.";
292 }
293 uses software-device-status-group;
294 }
295 container module-status {
296 description
297 "Module software status information.";
298 list module {
299 key "module-id";
300 description
301 "List containing module-specific software status information.";
302 leaf module-id {
303 type cienawstypes:name-string;
304 mandatory true;
305 description
306 "Unique access identifier string of the Module, which may just be a slot number (e.g. '1'). Key value for the Module list. Read-only attribute.";
307 }
308 uses software-device-status-group;
309 }
310 }
311 container active {
312 description
313 "Waveserver active software information.";
314 uses software-release-group;
315 }
316 container installed {
317 description
318 "Waveserver installed software release information.";
319 list versions {
320 key "index";
321 description
322 "A list of installed software releases on this Waveserver.";
323 leaf index {
324 type uint8;
325 description
326 "Unique id, read-only attribute.";
327 }
328 uses software-release-group;
329 }
330 }
331 }
332 rpc waveserver-software-install {
333 description
334 "Perform one-step software upgrade (download, activate, and commit) via url string.";
335 input {
336 leaf url {
337 type cienawstypes:string-maxl-254;
338 mandatory true;
339 description
340 "The URL specifying the remote location and package name to be installed. Example format is 'scp://<uid>:<pwd>@<ip-address>/<path>/<filename>'.";
341 }
342 }
343 output {
344 leaf return-code {
345 type software-rtncode;
346 description
347 "return code: 0 is success; non-zero is failure";
348 }
349 leaf return-string {
350 type cienawstypes:string-maxl-254;
351 description
352 "Return code description";
353 }
354 }
355 }
356 rpc waveserver-software-download {
357 description
358 "Download software load via url string.";
359 input {
360 leaf url {
361 type cienawstypes:string-maxl-254;
362 mandatory true;
363 description
364 "The URL specifying the remote location and package name to be installed. Example format is 'scp://<uid>:<pwd>@<ip-address>/<path>/<filename>'.";
365 }
366 }
367 output {
368 leaf return-code {
369 type software-rtncode;
370 description
371 "return code: 0 is success; non-zero is failure";
372 }
373 leaf return-string {
374 type cienawstypes:string-maxl-254;
375 description
376 "Return code description";
377 }
378 }
379 }
380 rpc waveserver-software-activate {
381 description
382 "Perform software activate via version string.";
383 input {
384 leaf version {
385 type cienawstypes:string-maxl-32;
386 mandatory true;
387 description
388 "The load version string.";
389 }
390 leaf auto-commit {
391 type boolean;
392 default "false";
393 description
394 "Optionally specify that the software load be automatically committed after activation.";
395 }
396 }
397 output {
398 leaf return-code {
399 type software-rtncode;
400 description
401 "return code: 0 is success; non-zero is failure";
402 }
403 leaf return-string {
404 type cienawstypes:string-maxl-254;
405 description
406 "Return code description";
407 }
408 }
409 }
410 rpc waveserver-software-delete {
411 description
412 "Perform software delete via version string.";
413 input {
414 leaf version {
415 type cienawstypes:string-maxl-32;
416 mandatory true;
417 description
418 "The load version string.";
419 }
420 }
421 output {
422 leaf return-code {
423 type software-rtncode;
424 description
425 "return code: 0 is success; non-zero is failure";
426 }
427 leaf return-string {
428 type cienawstypes:string-maxl-254;
429 description
430 "Return code description";
431 }
432 }
433 }
434 rpc waveserver-software-commit {
435 description
436 "Perform software commit operation in the current load has not been committed and it is in boot completion state.";
437 output {
438 leaf return-code {
439 type software-rtncode;
440 description
441 "return code: 0 is success; non-zero is failure";
442 }
443 leaf return-string {
444 type cienawstypes:string-maxl-254;
445 description
446 "Return code description";
447 }
448 }
449 }
450 rpc waveserver-software-cancel {
451 description
452 "Cancel an existing software upgrade operation that is in a failed state.";
453 output {
454 leaf return-code {
455 type software-rtncode;
456 description
457 "return code: 0 is success; non-zero is failure";
458 }
459 leaf return-string {
460 type cienawstypes:string-maxl-254;
461 description
462 "Return code description";
463 }
464 }
465 }
466}