1$id: https://openbmc-project.xyz/sdbusplus/events.schema.yaml 2$schema: https://json-schema.org/draft/2020-12/schema 3title: Event and error definitions 4type: object 5$defs: 6 base-event: 7 type: object 8 properties: 9 name: 10 type: string 11 description: 12 An identifier for the event in UpperCamelCase; used as the 13 class and Redfish Message ID. 14 deprecated: 15 type: string 16 pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$" 17 description: 18 Indicates that the event is now deprecated and should not be 19 created by any OpenBMC software, but is required to still 20 exist for generation in the Redfish Message Registry. The 21 version listed here should be the first version where the 22 error is no longer used. 23 metadata: 24 type: array 25 items: 26 type: object 27 properties: 28 name: 29 type: string 30 pattern: "^[A-Z_][A-Z0-9_]*$" 31 description: The name of the metadata field. 32 description: 33 type: string 34 description: 35 A description of the field for use by 36 developers. 37 type: 38 type: string 39 pattern: "(string)|(size)|(u?int64)|(double)|(object_path)|(enum\\[.*\\])" 40 description: The type of the metadata field. 41 primary: 42 type: boolean 43 description: 44 Set to true when the metadata field is expected 45 to be part of the Redfish `MessageArgs` (and not 46 only in the extended `DiagnosticData`). 47 required: 48 - name 49 - description 50 - type 51 minItems: 1 52 required: 53 - name 54 event: 55 type: object 56 allOf: 57 - $ref: "#/$defs/base-event" 58 - oneOf: 59 - $ref: "#/$defs/redfish-messages" 60 - $ref: "#/$defs/redfish-map" 61 error: 62 type: object 63 $ref: "#/$defs/event" 64 properties: 65 severity: 66 enum: 67 - emergency 68 - alert 69 - critical 70 - error 71 - warning 72 - notice 73 - informational 74 - debug 75 description: The severity using `syslog`-style nomenclature. 76 errno: 77 type: string 78 pattern: "^E[A-Z0-9]+$" 79 description: The errno used for this error. 80 required: 81 - severity 82 - errno 83 redfish-messages: 84 type: object 85 properties: 86 en: 87 $ref: "#/$defs/redfish-lang-message" 88 description: English message details. 89 required: 90 - en 91 redfish-lang-message: 92 type: object 93 description: The message details for any language. 94 properties: 95 description: 96 type: string 97 description: 98 A developer-applicable description of the error reported. 99 These form the "description" of the Redfish message. 100 message: 101 type: string 102 description: 103 The end-user message, including placeholders for arguemnts. 104 resolution: 105 type: string 106 description: The end-user resolution. 107 required: 108 - message 109 redfish-map: 110 type: object 111 properties: 112 redfish-mapping: 113 type: string 114 pattern: "^[A-Z_][a-zA-Z0-9_]*(\\.[A-Z_][a-zA-Z0-9_]*)*$" 115 description: Used when a `sdbusplus` event should map to a 116 specific Redfish Message rather than a generated one. This 117 is useful when an internal error has an analog in a 118 standardized registry. 119 120 When specifying these, the version should be omitted. 121 required: 122 - redfish-mapping 123 124properties: 125 version: 126 type: string 127 pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$" 128 description: 129 The version of the file, which will be used as the Redfish Message 130 Registry version. 131 errors: 132 type: array 133 items: 134 $ref: "#/$defs/error" 135 minItems: 1 136 events: 137 type: array 138 items: 139 $ref: "#/$defs/event" 140 minItems: 1 141required: 142 - version 143