背景
支持运维管理软件通过查询BMC的redfish注册表获取自定义事件定义,当前已支持查询英文事件定义,需另外提供查询中文事件定义的 redfish 接口。其中以下字段展示为中文:Description、Message、Severity、Resolution、EventEffect、EventCause、EventName。同时需要补充如下字段:EventType(事件类型),并且在英文和中文查询均能展现。
关联ISSUE
暂无关联
整体方案
根据英文接口新增查询中文事件定义的 redfish 接口,同时需要补充如下字段:EventType(事件类型),并且在英文和中文查询均能展现。
评审点1:新增 /redfish/v1/RegistryStore/Messages/zh/{{SoftwareName}}Events.:id 的 Oem 资源
资源URI:“/redfish/v1/RegistryStore/Messages/zh/{{SoftwareName}}Events.:id”
资源版本:messageregistry.v1_0_0.json
操作类型:GET
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| @odata.type | string | true | 否 | 否 | Readonly | 这个属性的值应该是一个 URI 片段,用来指定资源的类型,并且它应该是 Redfish 规范中定义的形式。 | |
| Id | string | true | 否 | 否 | Readonly | 这个属性应包含此资源的标识符。其值应符合 Redfish 规范中的 ‘Id’ 条款 | |
| Name | string | true | 否 | 否 | Readonly | 这个属性应包含该资源或数组成员的名称。其值应符合Redfish规范中的“名称”条款。 | |
| Language | string | 示例:en | true | 否 | 否 | Readonly | 属性注册表的 RFC5646 兼容语言代码。 |
| Description | string | true | 否 | 否 | Readonly | 这个属性应包含该资源的描述 | |
| RegistryPrefix | string | 示例:iBMCEvents | true | 否 | 否 | Readonly | 指示该服务是否支持按 RegistryPrefixes 属性过滤 |
| RegistryVersion | string | 示例:3.0.0 | true | 否 | 否 | Readonly | 该属性应包含此消息注册的版本 |
| OwningEntity | string | 示例:Huawei | true | 否 | 否 | Readonly | 发布此属性注册表的组织或公司。• 此属性应表示该属性注册表的发布者。 |
| Messages | object | true | 否 | 否 | Readonly | 包含一组事件消息的定义集合 | |
| Messageproperty | object | 示例:ResourceUpdated | true | 否 | 否 | Readonly | |
| Description | string | true | 否 | 否 | Readonly | 描述该事件的具体描述内容 | |
| Message | string | true | 否 | 否 | Readonly | 描述该事件的具体消息内容 | |
| Severity | string | 枚举值:“OK”, “Warning”, “Critical” | true | 否 | 否 | Readonly | 健康状态 |
| NumberOfArgs | string | 示例:0 | true | 否 | 否 | Readonly | 消息中的参数数量。• 该属性包含用于替换消息中用 % 标记的位置的参数数量 |
| ParamTypes | string | true | 否 | 否 | Readonly | 消息参数的数据类型,在转换为字符串以包含在消息中之前。 | |
| Resolution | string | true | 否 | 否 | Readonly | 解决方法 | |
| Oem | object | true | 否 | 否 | Readonly | ||
| Huawi | object | true | 否 | 否 | Readonly | ||
| @odata.type | string | true | 否 | 否 | Readonly | ||
| EventId | string | true | 否 | 否 | Readonly | 事件id | |
| EventName | string | true | 否 | 否 | Readonly | 事件名字 | |
| EventEffect | string | true | 否 | 否 | Readonly | 事件的影响 | |
| EventCause | string | true | 否 | 否 | Readonly | 事件的原因 | |
| EventType | string | true | 否 | 否 | Readonly | 事件类型 |
schema说明:
在/root/rackmount/interface_config/redfish/static_resource/redfish/v1/schemastore/en/oem/openubmc/json_schema/hwbmcevent.v1_0_0.json 增加EventType字段
"additionalProperties": false,
"properties": {
"@odata.type": {
"$ref": "http://redfish.dmtf.org/schemas/v1/odata.4.0.0.json#/definitions/type"
},
"EventId": {
"type": "string",
"readonly": true,
"description": " Event code of a BMC alarm.",
"longDescription": " Event code of a BMC alarm."
},
"EventName": {
"type": "string",
"readonly": true,
"description": "Name of the alarm.",
"longDescription": "Name of the alarm."
},
"EventEffect": {
"type": "string",
"readonly": true,
"description": "Effect of the alarm.",
"longDescription": "Effect of the alarm."
},
"EventCause": {
"type": "string",
"readonly": true,
"description": "Possible causes of the alarm.",
"longDescription": "Possible causes of the alarm."
},
"EventType": {
"type": "string",
"readonly": true,
"description": "Type of the event.",
"longDescription": "Type of the event"
}
}
评审点2:在/redfish/v1/Registries/iBMCEvents.v3_0_0 下添加属性内容
在上级接口 /redfish/v1/Registries/iBMCEvents.v3_0_0 里以下属性(Languages、Location)添加内容
变更前:
{
"@odata.context": "/redfish/v1/$metadata#MessageRegistryFile.MessageRegistryFile",
"@odata.id": "/redfish/v1/Registries/iBMCEvents.v3_0_0",
"@odata.type": "#MessageRegistryFile.v1_0_2.MessageRegistryFile",
"Id": "iBMCEvents.v3_0_0",
"Name": "iBMC Event Message Registry File",
"Description": "iBMC Event Message Registry File locations",
"Languages": [
"en"
],
"Registry": "iBMCEvents.3.0",
"Location": [
{
"Language": "en",
"Uri": "/redfish/v1/RegistryStore/Messages/en/iBMCEvents.v3_0_0.json"
}
]
}
变更后:
{
"@odata.context": "/redfish/v1/$metadata#MessageRegistryFile.MessageRegistryFile",
"@odata.id": "/redfish/v1/Registries/iBMCEvents.v3_0_0",
"@odata.type": "#MessageRegistryFile.v1_0_2.MessageRegistryFile",
"Id": "iBMCEvents.v3_0_0",
"Name": "iBMC Event Message Registry File",
"Description": "iBMC Event Message Registry File locations",
"Languages": [
"en","zh"
],
"Registry": "iBMCEvents.3.0",
"Location": [
{
"Language": "en",
"Uri": "/redfish/v1/RegistryStore/Messages/en/iBMCEvents.v3_0_0.json"
},
{
"Language": "zh",
"Uri": "/redfish/v1/RegistryStore/Messages/zh/iBMCEvents.v3_0_0.json"
}
]
}
是否准备好AI预审
是