aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/onf14/provider/src/test/resources/currentRevision/firmware-1-0@2021-04-01.yang
blob: 635e87bd3cb04a0046e896e44e81627de629663f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
module firmware-1-0 {
  yang-version 1.1;
  namespace "urn:onf:yang:firmware-1-0";
  prefix firmware;

  import ietf-yang-types {
    prefix yang;
  }
  import core-model-1-4 {
    prefix core-model;
  }

  organization
    "openBackhaul.com proposal to Open Networking Foundation (ONF)";
  contact
    "WG Web : https://github.com/openBackhaul/Overview
     WG List: firmware@openBackhaul.com
     Editor : Thorsten Heinze
     Email  : Thorsten.Heinze@openBackhaul.com";
  description
    "Augment to the ControlConstruct for managing firmware on the device.
     
     Copyright 2021 openBackhaul.com
     
     Licensed under the Apache License, Version 2.0 (the 'License');
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
     http://www.apache.org/licenses/LICENSE-2.0
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an 'AS IS' BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.";

  revision 2021-04-01 {
    description
      "Model for the Transport SDN Introduction at Telefonica.
       Please view https://github.com/openBackhaul/firmware/issues for changes.";
    reference
      "https://github.com/openBackhaul/firmware/tree/tsp: Model definition
       https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE {
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_UNKNOWN {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_OTHER {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_DRIVER {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_CONFIGURATION_DATA {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_CONFIGURATION_SOFTWARE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_APPLICATION_SOFTWARE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_INSTRUMENTATION {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_FIRMWARE_BIOS {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_DIAGNOSTIC_SOFTWARE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_OPERATING_SYSTEM {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_MIDDLEWARE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_FIRMWARE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_BIOS_CODE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_FPGA_CODE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_SUPPORT_SERVICE_PACK {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_PACKAGE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_RESERVE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_CLASS_TYPE_DOWNSTREAM_DEVICE {
    base FIRMWARE_COMPONENT_CLASS_TYPE;
    description
      "none";
  }

  identity DOWNLOAD_STATUS_TYPE {
    description
      "none";
  }

  identity DOWNLOAD_STATUS_TYPE_IDLE {
    base DOWNLOAD_STATUS_TYPE;
    description
      "There is no download status to be represented. The device is available for starting some.";
  }

  identity DOWNLOAD_STATUS_TYPE_DOWNLOAD_IN_PROGRESS {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process is currently in progress.";
  }

  identity DOWNLOAD_STATUS_TYPE_SUCCESSFUL {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process successfully accomplished.";
  }

  identity DOWNLOAD_STATUS_TYPE_INVALID_URI {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process could not be started, because of invalid URI.";
  }

  identity DOWNLOAD_STATUS_TYPE_UNABLE_TO_CONNECT_TO_SERVER {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process could not be started, because client could not reach the server.";
  }

  identity DOWNLOAD_STATUS_TYPE_ALIGNMENT_FAILURE {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process failed, because client and server could not align.";
  }

  identity DOWNLOAD_STATUS_TYPE_AUTHENTICATION_FAILED {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process could not be started, because client could not successfully authenticate at the server.";
  }

  identity DOWNLOAD_STATUS_TYPE_FILE_NOT_FOUND {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Client could connect to the server, but download process could not be started, because the file could not be found.";
  }

  identity DOWNLOAD_STATUS_TYPE_NO_SPACE_AVAILABLE {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Client could authenticate at the server and find the file, but download process has been aborted, because there is not sufficient storage space for the file on the client.";
  }

  identity DOWNLOAD_STATUS_TYPE_TRANSFER_MECHANISM_NOT_AVAILABLE {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Client could authenticate at the server and find the file, but download process could not be started, because transfer mechanism is not supported.";
  }

  identity DOWNLOAD_STATUS_TYPE_NETWORK_FAILURE {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process could be started, but got interrupted, because client lost connection to the server.";
  }

  identity DOWNLOAD_STATUS_TYPE_SW_UNIT_CHECK_FAILURE {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Client could connect to the server and download the file, but the file was corrupted.";
  }

  identity DOWNLOAD_STATUS_TYPE_INCOMPATIBLE_FILE {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Client could connect to the server and download the file, but the file cannot be used due to incompatibility with either hardware of other firmware components.";
  }

  identity DOWNLOAD_STATUS_TYPE_SW_RELEASE_CHECK_FAILURE {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Client could download the file, but the file cannot be used due to release mismatch with other firmware components.";
  }

  identity DOWNLOAD_STATUS_TYPE_INTERNAL_ERROR {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process has been terminated due to an error internal to the client.";
  }

  identity DOWNLOAD_STATUS_TYPE_ABORTED {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Client could connect to the server and start downloading the file, but the download process was interrupted by the client.";
  }

  identity DOWNLOAD_STATUS_TYPE_FAILED {
    base DOWNLOAD_STATUS_TYPE;
    description
      "Download process failed due to a reason, which is not more specifically described by any other value in this enumeration.";
  }

  identity DOWNLOAD_STATUS_TYPE_NOT_YET_DEFINED {
    base DOWNLOAD_STATUS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_STATUS_TYPE {
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_STATUS_TYPE_ACTIVE {
    base FIRMWARE_COMPONENT_STATUS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_STATUS_TYPE_STAND_BY {
    base FIRMWARE_COMPONENT_STATUS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_STATUS_TYPE_COMMITTED {
    base FIRMWARE_COMPONENT_STATUS_TYPE;
    description
      "Firmware component will be used after reboot.";
  }

  identity FIRMWARE_COMPONENT_STATUS_TYPE_LIKE_SUPERIOR_FIRMWARE_COMPONENT {
    base FIRMWARE_COMPONENT_STATUS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_STATUS_TYPE_NOT_APPLICABLE {
    base FIRMWARE_COMPONENT_STATUS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_STATUS_TYPE_INCOMPLETE {
    base FIRMWARE_COMPONENT_STATUS_TYPE;
    description
      "none";
  }

  identity FIRMWARE_COMPONENT_STATUS_TYPE_NOT_YET_DEFINED {
    base FIRMWARE_COMPONENT_STATUS_TYPE;
    description
      "none";
  }

  typedef firmware-component-class-type {
    type identityref {
      base FIRMWARE_COMPONENT_CLASS_TYPE;
    }
    description
      "none";
  }

  typedef download-status-type {
    type identityref {
      base DOWNLOAD_STATUS_TYPE;
    }
    description
      "Status or result of the download process, which had been started last.";
  }

  typedef firmware-component-status-type {
    type identityref {
      base FIRMWARE_COMPONENT_STATUS_TYPE;
    }
    description
      "Current operational status of the firmware component.";
  }

  grouping object-creation-notification {
    description
      "none";
    leaf counter {
      type int32;
      default "-1";
      config false;
      description
        "Counts object creation notifications.";
    }
    leaf timestamp {
      type yang:date-and-time;
      default "2010-11-20T14:00:00+01:00";
      config false;
      description
        "none";
    }
    leaf object-id-ref {
      type leafref {
        path "/core-model:control-construct/firmware:firmware-collection/firmware:firmware-component-list/firmware:local-id";
        require-instance false;
      }
      config false;
      description
        "none";
    }
    leaf object-type {
      type string;
      default "Type of created object not specified.";
      config false;
      description
        "none";
    }
  }

  grouping object-deletion-notification {
    description
      "none";
    leaf counter {
      type int32;
      default "-1";
      config false;
      description
        "Counts object deletion notifications.";
    }
    leaf timestamp {
      type yang:date-and-time;
      default "2010-11-20T14:00:00+01:00";
      config false;
      description
        "none";
    }
    leaf object-id-ref {
      type leafref {
        path "/core-model:control-construct/firmware:firmware-collection/firmware:firmware-component-list/firmware:local-id";
        require-instance false;
      }
      config false;
      description
        "none";
    }
  }

  grouping attribute-value-changed-notification {
    description
      "To be sent when an attribute has changed and one or more controllers have to update their data.";
    leaf counter {
      type int32;
      default "-1";
      config false;
      description
        "Counts attribute value changed notifications.";
    }
    leaf timestamp {
      type yang:date-and-time;
      default "2010-11-20T14:00:00+01:00";
      config false;
      description
        "none";
    }
    leaf object-id-ref {
      type leafref {
        path "/core-model:control-construct/firmware:firmware-collection/firmware:firmware-component-list/firmware:local-id";
        require-instance false;
      }
      config false;
      description
        "none";
    }
    leaf attribute-name {
      type string;
      default "Attribute name not specified.";
      config false;
      description
        "Name of the attribute that has been changed.";
    }
    leaf new-value {
      type string;
      default "New value not specified.";
      config false;
      description
        "Attribute value converted to a string (xml, json, ...)";
    }
  }

  grouping firmware-cc-spec {
    description
      "none";
    container firmware-collection {
      description
        "none";
      uses firmware-collection;
    }
  }

  grouping firmware-collection {
    description
      "none";
    list firmware-component-list {
      key "local-id";
      config false;
      description
        "none";
      uses firmware-component;
    }
    container download {
      config false;
      description
        "Currently on-going download.";
      uses download-type;
    }
  }

  grouping firmware-component {
    description
      "none";
    container firmware-component-pac {
      config false;
      description
        "none";
      uses firmware-component-pac;
    }
    leaf-list subordinate-firmware-component-list {
      type leafref {
        path "/core-model:control-construct/firmware:firmware-collection/firmware:firmware-component-list/firmware:local-id";
        require-instance false;
      }
      config false;
      description
        "none";
    }
    uses core-model:local-class;
  }

  grouping firmware-component-pac {
    description
      "none";
    container firmware-component-capability {
      config false;
      description
        "none";
      uses firmware-component-capability;
    }
    container firmware-component-status {
      config false;
      description
        "none";
      uses firmware-component-status;
    }
  }

  grouping firmware-component-capability {
    description
      "none";
    leaf firmware-component-name {
      type string;
      default "Firmware component name not yet defined.";
      config false;
      description
        "Name of the firmware component.";
    }
    leaf firmware-component-version {
      type string;
      default "Firmware component version not yet defined.";
      config false;
      description
        "Version of the firmware component.";
    }
    leaf firmware-component-class {
      type firmware-component-class-type;
      default "FIRMWARE_COMPONENT_CLASS_TYPE_UNKNOWN";
      config false;
      description
        "Class of firmware component.";
    }
    leaf individual-activation-is-avail {
      type boolean;
      default "false";
      config false;
      description
        "True = Firmware component could be individually activated. False = Firmware component would be activated together with a superior component.";
    }
    leaf-list related-kinds-of-equipment-list {
      type string;
      default "Affected equipment types not yet defined.";
      config false;
      description
        "Kinds of equipment using this firmware component after activation. Values should be identical with entries in Equipment::ManufacturedThing::EquipmentType::modelIdentifier attribute. Might be empty, if firmwareComponentClass==PACKAGE.";
    }
  }

  grouping firmware-component-status {
    description
      "none";
    leaf firmware-component-status {
      type firmware-component-status-type;
      default "FIRMWARE_COMPONENT_STATUS_TYPE_NOT_YET_DEFINED";
      config false;
      description
        "Operational status of the firmware.";
    }
    leaf firmware-component-activation-date {
      type yang:date-and-time;
      default "2010-11-20T14:00:00+01:00";
      config false;
      description
        "Date and time of the activation of this firmware component.";
    }
    leaf-list is-active-on-equipment-list {
      type leafref {
        path "/core-model:control-construct/core-model:equipment/core-model:uuid";
        require-instance false;
      }
      config false;
      description
        "none";
    }
  }

  grouping download-type {
    description
      "none";
    leaf filename {
      type string;
      default "Filename not yet defined.";
      config false;
      description
        "none";
    }
    leaf download-status {
      type download-status-type;
      default "DOWNLOAD_STATUS_TYPE_NOT_YET_DEFINED";
      config false;
      description
        "Status of the download, which had been initiated last.";
    }
    leaf download-status-description {
      type string;
      default "Status description not yet defined.";
      config false;
      description
        "Free text field for additional information about the download status.";
    }
  }

  augment "/core-model:control-construct" {
    description
      "none";
    uses firmware-cc-spec;
  }

  rpc download-firmware-component {
    description
      "Operation for downloading some firmware component (e.g. package) from a server onto the device.";

    input {
      leaf source-uri {
        type string;
        mandatory true;
        description
          "URI specifying the remote-file-path for downloading the firmware component. Format:<protocol>://<host>[:port]/path'.";
      }
      leaf filename {
        type string;
        mandatory true;
        description
          "Name of the file, which is to be downloaded.";
      }
      leaf username-at-file-server {
        type string;
        description
          "Username to access the file server.";
      }
      leaf password-at-file-server {
        type string;
        description
          "Password to access the file server.";
      }
      leaf ssh-key {
        type string;
        description
          "Client key for accessing the file server.";
      }
      leaf force-download {
        type boolean;
        mandatory true;
        description
          "Files to be downloaded, even if already present on the device.";
      }
    }
  }
  rpc abort-firmware-download {
    description
      "Currently on-going download of a firmware component shall immediately be terminated.";
  }

  rpc activate-firmware-component {
    description
      "Operation for activating some firmware component on the device. (Attention! Invoking this operation might cause the device to reboot.)";

    input {
      leaf firmware-component {
        type leafref {
          path "/core-model:control-construct/firmware:firmware-collection/firmware:firmware-component-list/firmware:local-id";
          require-instance false;
        }
        mandatory true;
        description
          "Reference of the firmware component, which shall be activated.";
      }
      leaf activation-delay-period {
        type uint64;
        mandatory true;
        description
          "Number of seconds the device shall delay the execution after receiving the invokation of the activation operation.";
      }
    }
  }

  notification object-creation-notification {
    description
      "none";
    uses object-creation-notification;
  }
  notification object-deletion-notification {
    description
      "none";
    uses object-deletion-notification;
  }
  notification attribute-value-changed-notification {
    description
      "none";
    uses attribute-value-changed-notification;
  }
}