-
Notifications
You must be signed in to change notification settings - Fork 655
/
openconfig-platform.yang
1207 lines (999 loc) · 31.7 KB
/
openconfig-platform.yang
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
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
module openconfig-platform {
yang-version "1";
// namespace
namespace "http://openconfig.net/yang/platform";
prefix "oc-platform";
import openconfig-platform-types { prefix oc-platform-types; }
import openconfig-extensions { prefix oc-ext; }
import openconfig-alarm-types { prefix oc-alarm-types; }
import openconfig-yang-types { prefix oc-yang; }
import openconfig-types { prefix oc-types; }
include openconfig-platform-common;
// meta
organization "OpenConfig working group";
contact
"OpenConfig working group
www.openconfig.net";
description
"This module defines a data model for representing a system
component inventory, which can include hardware or software
elements arranged in an arbitrary structure. The primary
relationship supported by the model is containment, e.g.,
components containing subcomponents.
It is expected that this model reflects every field replacable
unit on the device at a minimum (i.e., additional information
may be supplied about non-replacable components).
Every element in the inventory is termed a 'component' with each
component expected to have a unique name and type, and optionally
a unique system-assigned identifier and FRU number. The
uniqueness is guaranteed by the system within the device.
Components may have properties defined by the system that are
modeled as a list of key-value pairs. These may or may not be
user-configurable. The model provides a flag for the system
to optionally indicate which properties are user configurable.
Each component also has a list of 'subcomponents' which are
references to other components. Appearance in a list of
subcomponents indicates a containment relationship as described
above. For example, a linecard component may have a list of
references to port components that reside on the linecard.
This schema is generic to allow devices to express their own
platform-specific structure. It may be augmented by additional
component type-specific schemas that provide a common structure
for well-known component types. In these cases, the system is
expected to populate the common component schema, and may
optionally also represent the component and its properties in the
generic structure.
The properties for each component may include dynamic values,
e.g., in the 'state' part of the schema. For example, a CPU
component may report its utilization, temperature, or other
physical properties. The intent is to capture all platform-
specific physical data in one location, including inventory
(presence or absence of a component) and state (physical
attributes or status).";
oc-ext:openconfig-version "0.23.0";
revision "2023-02-13" {
description
"Refactor resource utilization threshold config into a separate grouping.
Update 'utilization resource' to 'resource utilization'.";
reference "0.23.0";
}
revision "2022-12-20" {
description
"Add threshold and threshold-exceeded for resource usage.";
reference "0.22.0";
}
revision "2022-12-19" {
description
"Update last-high-watermark timestamp documentation.";
reference "0.21.1";
}
revision "2022-09-26" {
description
"Add state data for base-mac-address.";
reference "0.21.0";
}
revision "2022-08-31" {
description
"Add new state data for component CLEI code.";
reference "0.20.0";
}
revision "2022-07-28" {
description
"Add container for controller card component";
reference "0.19.0";
}
revision "2022-07-11" {
description
"Add switchover ready";
reference "0.18.0";
}
revision "2022-06-10" {
description
"Specify units and epoch for switchover and reboot times.";
reference "0.17.0";
}
revision "2022-04-21" {
description
"Add platform utilization.";
reference "0.16.0";
}
revision "2022-02-02" {
description
"Add new state data for component reboot and
switchover.";
reference "0.15.0";
}
revision "2021-08-13" {
description
"Add container for PCIe error statistics";
reference "0.14.0";
}
revision "2021-01-18" {
description
"Add container for software module component";
reference "0.13.0";
}
revision "2019-04-16" {
description
"Fix bug in parent path reference";
reference "0.12.2";
}
revision "2018-11-21" {
description
"Add OpenConfig module metadata extensions.";
reference "0.12.1";
}
revision "2018-06-29" {
description
"Added location description for components";
reference "0.12.0";
}
revision "2018-06-03" {
description
"Added parent reference, empty flag and preconfiguration
for components";
reference "0.11.0";
}
revision "2018-04-20" {
description
"Added new per-component state data: mfg-date and removable";
reference "0.10.0";
}
revision "2018-01-30" {
description
"Amended approach for modelling CPU - rather than having
a local CPU utilisation state variable, a component with
a CPU should create a subcomponent of type CPU to report
statistics.";
reference "0.9.0";
}
revision "2018-01-16" {
description
"Added new per-component common data; add temp alarm;
moved hardware-port reference to port model";
reference "0.8.0";
}
revision "2017-12-14" {
description
"Added anchor containers for component data, added new
component types";
reference "0.7.0";
}
revision "2017-08-16" {
description
"Added power state enumerated type";
reference "0.6.0";
}
revision "2016-12-22" {
description
"Added temperature state variable to component";
reference "0.5.0";
}
// OpenConfig specific extensions for module metadata.
oc-ext:regexp-posix;
oc-ext:catalog-organization "openconfig";
oc-ext:origin "openconfig";
// grouping statements
grouping platform-component-properties-config {
description
"System-defined configuration data for component properties";
leaf name {
type string;
description
"System-supplied name of the property -- this is typically
non-configurable";
}
leaf value {
type union {
type string;
type boolean;
type int64;
type uint64;
type decimal64 {
fraction-digits 2;
}
}
description
"Property values can take on a variety of types. Signed and
unsigned integer types may be provided in smaller sizes,
e.g., int8, uint16, etc.";
}
}
grouping platform-component-properties-state {
description
"Operational state data for component properties";
leaf configurable {
type boolean;
description
"Indication whether the property is user-configurable";
}
}
grouping platform-component-properties-top {
description
"Top-level grouping ";
container properties {
description
"Enclosing container ";
list property {
key "name";
description
"List of system properties for the component";
leaf name {
type leafref {
path "../config/name";
}
description
"Reference to the property name.";
}
container config {
description
"Configuration data for each property";
uses platform-component-properties-config;
}
container state {
config false;
description
"Operational state data for each property";
uses platform-component-properties-config;
uses platform-component-properties-state;
}
}
}
}
grouping platform-subcomponent-ref-config {
description
"Configuration data for subcomponent references";
leaf name {
type leafref {
path "../../../../../component/config/name";
}
description
"Reference to the name of the subcomponent";
}
}
grouping platform-subcomponent-ref-state {
description
"Operational state data for subcomponent references";
}
grouping platform-subcomponent-ref-top {
description
"Top-level grouping for list of subcomponent references";
container subcomponents {
description
"Enclosing container for subcomponent references";
list subcomponent {
key "name";
description
"List of subcomponent references";
leaf name {
type leafref {
path "../config/name";
}
description
"Reference to the name list key";
}
container config {
description
"Configuration data for the subcomponent";
uses platform-subcomponent-ref-config;
}
container state {
config false;
description
"Operational state data for the subcomponent";
uses platform-subcomponent-ref-config;
uses platform-subcomponent-ref-state;
}
}
}
}
grouping platform-component-config {
description
"Configuration data for components";
leaf name {
type string;
description
"Device name for the component -- this may not be a
configurable parameter on many implementations. Where
component preconfiguration is supported, for example,
the component name may be configurable.";
}
}
grouping platform-component-state {
description
"Operational state data for device components.";
leaf type {
type union {
type identityref {
base oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT;
}
type identityref {
base oc-platform-types:OPENCONFIG_SOFTWARE_COMPONENT;
}
}
description
"Type of component as identified by the system";
}
leaf id {
type string;
description
"Unique identifier assigned by the system for the
component";
}
leaf location {
type string;
description
"System-supplied description of the location of the
component within the system. This could be a bay position,
slot number, socket location, etc. For component types that
have an explicit slot-id attribute, such as linecards, the
system should populate the more specific slot-id.";
}
leaf description {
type string;
description
"System-supplied description of the component";
}
leaf mfg-name {
type string;
description
"System-supplied identifier for the manufacturer of the
component. This data is particularly useful when a
component manufacturer is different than the overall
device vendor.";
}
leaf mfg-date {
type oc-yang:date;
description
"System-supplied representation of the component's
manufacturing date.";
}
leaf hardware-version {
type string;
description
"For hardware components, this is the hardware revision of
the component.";
}
leaf firmware-version {
type string;
description
"For hardware components, this is the version of associated
firmware that is running on the component, if applicable.";
}
leaf software-version {
type string;
description
"For software components such as operating system or other
software module, this is the version of the currently
running software.";
}
leaf serial-no {
type string;
description
"System-assigned serial number of the component.";
}
leaf part-no {
type string;
description
"System-assigned part number for the component. This should
be present in particular if the component is also an FRU
(field replaceable unit)";
}
leaf clei-code {
type string;
description
"Common Language Equipment Identifier (CLEI) code of the
component. This should be present in particular if the
component is also an FRU (field replaceable unit)";
}
leaf removable {
type boolean;
description
"If true, this component is removable or is a field
replaceable unit";
}
leaf oper-status {
type identityref {
base oc-platform-types:COMPONENT_OPER_STATUS;
}
description
"If applicable, this reports the current operational status
of the component.";
}
leaf empty {
type boolean;
default false;
description
"The empty leaf may be used by the device to indicate that a
component position exists but is not populated. Using this
flag, it is possible for the management system to learn how
many positions are available (e.g., occupied vs. empty
linecard slots in a chassis).";
}
leaf parent {
type leafref {
path "../../../component/config/name";
}
description
"Reference to the name of the parent component. Note that
this reference must be kept synchronized with the
corresponding subcomponent reference from the parent
component.";
}
leaf redundant-role {
type oc-platform-types:component-redundant-role;
description
"For components that have redundant roles (e.g. two
supervisors in a device, one as primary the other as secondary),
this reports the role of the component.";
}
container last-switchover-reason {
description
"For components that have redundant roles (e.g. two
supervisors in a device, one as primary the other as secondary),
this reports the reason of the last change of the
component's role.";
uses oc-platform-types:component-redundant-role-switchover-reason;
}
leaf last-switchover-time {
type oc-types:timeticks64;
units "nanoseconds";
description
"For components that have redundant roles (e.g. two
supervisors in a device, one as primary the other as
secondary), this reports the time of the last change of
the component's role. The value is the timestamp in
nanoseconds relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).";
}
leaf last-reboot-reason {
type identityref {
base oc-platform-types:COMPONENT_REBOOT_REASON;
}
description
"This reports the reason of the last reboot of the component.";
}
leaf last-reboot-time {
type oc-types:timeticks64;
units "nanoseconds";
description
"This reports the time of the last reboot of the component. The
value is the timestamp in nanoseconds relative to the Unix Epoch
(Jan 1, 1970 00:00:00 UTC).";
}
leaf switchover-ready {
type boolean;
description
"For components that have redundant roles, this reports a value
that indicates if the component is ready to support failover.
The components with a redundant-role should reflect the overall
system's switchover status. For example, two supervisors in a
device, one as primary and the other as secondary, should both
report the same value.";
}
leaf base-mac-address {
type oc-yang:mac-address;
description
"This is a MAC address representing the root or primary MAC
address for a component. Components such as CHASSIS and
CONTROLLER_CARD are expected to provide a base-mac-address. The
base mac-address for CHASSIS and a PRIMARY CONTROLLER_CARD may
contain the same value.";
}
}
grouping platform-component-temp-alarm-state {
description
"Temperature alarm data for platform components";
// TODO(aashaikh): consider if these leaves could be in a
// reusable grouping (not temperature-specific); threshold
// may always need to be units specific.
leaf alarm-status {
type boolean;
description
"A value of true indicates the alarm has been raised or
asserted. The value should be false when the alarm is
cleared.";
}
leaf alarm-threshold {
type uint32;
description
"The threshold value that was crossed for this alarm.";
}
leaf alarm-severity {
type identityref {
base oc-alarm-types:OPENCONFIG_ALARM_SEVERITY;
}
description
"The severity of the current alarm.";
}
}
grouping platform-component-power-state {
description
"Power-related operational state for device components.";
leaf allocated-power {
type uint32;
units watts;
description
"Power allocated by the system for the component.";
}
leaf used-power {
type uint32;
units watts;
description
"Actual power used by the component.";
}
}
grouping platform-component-temp-state {
description
"Temperature state data for device components";
container temperature {
description
"Temperature in degrees Celsius of the component. Values include
the instantaneous, average, minimum, and maximum statistics. If
avg/min/max statistics are not supported, the target is expected
to just supply the instant value";
uses oc-platform-types:avg-min-max-instant-stats-precision1-celsius;
uses platform-component-temp-alarm-state;
}
}
grouping platform-component-memory-state {
description
"Per-component memory statistics";
container memory {
description
"For components that have associated memory, these values
report information about available and utilized memory.";
leaf available {
type uint64;
units bytes;
description
"The available memory physically installed, or logically
allocated to the component.";
}
// TODO(aashaikh): consider if this needs to be a
// min/max/avg statistic
leaf utilized {
type uint64;
units bytes;
description
"The memory currently in use by processes running on
the component, not considering reserved memory that is
not available for use.";
}
}
}
grouping pcie-uncorrectable-errors {
description
"PCIe uncorrectable error statistics.";
leaf total-errors {
type oc-yang:counter64;
description
"Total number of uncorrectable errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf undefined-errors {
type oc-yang:counter64;
description
"Number of undefined errors detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf data-link-errors {
type oc-yang:counter64;
description
"Number of data-link errors detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf surprise-down-errors {
type oc-yang:counter64;
description
"Number of unexpected link down errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf poisoned-tlp-errors {
type oc-yang:counter64;
description
"Number of poisoned TLP errors detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf flow-control-protocol-errors {
type oc-yang:counter64;
description
"Number of flow control protocol errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf completion-timeout-errors {
type oc-yang:counter64;
description
"Number of completion timeout errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf completion-abort-errors {
type oc-yang:counter64;
description
"Number of completion abort errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf unexpected-completion-errors {
type oc-yang:counter64;
description
"Number of unexpected completion errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf receiver-overflow-errors {
type oc-yang:counter64;
description
"Number of receiver overflow errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf malformed-tlp-errors {
type oc-yang:counter64;
description
"Number of malformed TLP errors detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf ecrc-errors {
type oc-yang:counter64;
description
"Number of ECRC errors detected by PCIe device since the system
booted, according to PCIe AER driver.";
}
leaf unsupported-request-errors {
type oc-yang:counter64;
description
"Number of unsupported request errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf acs-violation-errors {
type oc-yang:counter64;
description
"Number of access control errors detected by PCIe device since
the system booted, according to PCIe AER driver.";
}
leaf internal-errors {
type oc-yang:counter64;
description
"Number of internal errors detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf blocked-tlp-errors {
type oc-yang:counter64;
description
"Number of blocked TLP errors detected by PCIe device since
the system booted, according to PCIe AER driver.";
}
leaf atomic-op-blocked-errors {
type oc-yang:counter64;
description
"Number of atomic operation blocked errors detected by PCIe
device since the system booted, according to PCIe AER driver.";
}
leaf tlp-prefix-blocked-errors {
type oc-yang:counter64;
description
"Number of TLP prefix blocked errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
}
grouping pcie-correctable-errors {
description
"PCIe correctable error statistics.";
leaf total-errors {
type oc-yang:counter64;
description
"Total number of correctable errors detected by PCIe device
since the system booted, according to PCIe AER driver.";
}
leaf receiver-errors {
type oc-yang:counter64;
description
"Number of receiver errors detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf bad-tlp-errors {
type oc-yang:counter64;
description
"Number of TLPs with bad LCRC detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf bad-dllp-errors {
type oc-yang:counter64;
description
"Number of DLLPs with bad LCRC detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf relay-rollover-errors {
type oc-yang:counter64;
description
"Number of relay rollover errors detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf replay-timeout-errors {
type oc-yang:counter64;
description
"Number of replay timeout errors detected by PCIe device since the
system booted, according to PCIe AER driver.";
}
leaf advisory-non-fatal-errors {
type oc-yang:counter64;
description
"Number of advisory non fatal errors detected by PCIe device since
the system booted, according to PCIe AER driver.";
}
leaf internal-errors {
type oc-yang:counter64;
description
"Number of internal errors detected by PCIe device since the system
booted, according to PCIe AER driver.";
}
leaf hdr-log-overflow-errors {
type oc-yang:counter64;
description
"Number of header log overflow errors detected by PCIe device since
the system booted, according to PCIe AER driver.";
}
}
grouping platform-component-pcie-state {
description
"Per-component PCIe error statistics";
container pcie {
description
"Components that are connected to the system over the Peripheral
Component Interconnect Express (PCIe), report the fatal, non-fatal
and correctable PCIe error counts.";
container fatal-errors {
description
"The count of the fatal PCIe errors.";
uses pcie-uncorrectable-errors;
}
container non-fatal-errors {
description
"The count of the non-fatal PCIe errors.";
uses pcie-uncorrectable-errors;
}
container correctable-errors {
description
"The count of the correctable PCIe errors.";
uses pcie-correctable-errors;
}
}
}
grouping platform-anchors-top {
description
"This grouping is used to add containers for components that
are common across systems, but do not have a defined schema
within the openconfig-platform module. Containers should be
added to this grouping for components that are expected to
exist in multiple systems, with corresponding modules
augmenting the config/state containers directly.";
container chassis {
description
"Data for chassis components";
container config {
description
"Configuration data for chassis components";
}
container state {
config false;
description
"Operational state data for chassis components";
}
uses platform-resource-utilization-top;
}
// TODO(aashaikh): linecard container is already defined in
// openconfig-platform-linecard; will move to this module
// in future.
/*
container linecard {
description
"Data for linecard components";
container config {
description
"Configuration data for linecard components";
}
container state {
config false;
description
"Operational state data for linecard components";
}
}
*/
container port {
description
"Data for physical port components";
container config {
description
"Configuration data for physical port components";
}
container state {
config false;
description
"Operational state data for physical port components";
}
}
// TODO(aashaikh): transceiver container is already defined in
// openconfig-platform-transceiver; will move to this module
// in future.
/*
container transceiver {
description
"Data for transceiver components";
container config {
description
"Configuration data for transceiver components";
}
container state {
config false;
description
"Operational state data for transceiver components";
}
}
*/
container power-supply {
description
"Data for power supply components";
container config {
description
"Configuration data for power supply components";
}