背景
客户使用该redfish接口查询历史功耗信息,可查询7天共1008条数据,每10分钟1条,包含整机功耗、平均功耗、峰值功耗信息。
关联ISSUE
整体方案
评审点
评审点1:
新增URI:/redfish/v1/Chassis/{ChassisId}/Power/PowerHistoryData
评审点2:
URI: /redfish/v1/Chassis/{ChassisId}/Power新增属性PowerHistoryData
详细描述
1、新增URI:/redfish/v1/Chassis/{ChassisId}/Power/PowerHistoryData
URI: /redfish/v1/Chassis/{ChassisId}/Power/PowerHistoryData
变化类型:新增URI
操作类型:GET
权限:ReadOnly
参数说明:
| 属性名称 | 取值类型 | 说明 | 取值范围 | 默认值 | 操作权限 | 是否频繁变化并需要屏蔽变化事件 |
|---|---|---|---|---|---|---|
| Data[{ | array | 历史功耗数据 | NA | 空表 | ReadOnly | 是 |
| Time | string | 功耗数据记录时间,格式“yy/mm/dd hh:mm:ss”,例“ 2025/11/01 11:17:34” | string | 无 | ReadOnly | 是 |
| PowerWatts | number | 整机实时功耗,单位Watt | 大于等于0 | 无 | ReadOnly | 是 |
| PowerAverageWatts | number | 平均功耗,单位Watt | 大于等于0 | 无 | ReadOnly | 是 |
| PowerPeakWatts | number | 峰值功耗,单位Watt | 大于等于0 | 无 | ReadOnly | 是 |
| }] |
schema说明:
{
"$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema.v1_1_0.json",
"title": "#HwPowerHistoryData.v1_0_0.HwPowerHistoryData",
"$ref": "#/definitions/HwPowerHistoryData",
"definitions": {
"HwPowerHistoryData": {
"type": "object",
"patternProperties": {
"^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
"type": [
"array",
"boolean",
"number",
"null",
"object",
"string"
],
"description": "This property shall specify a valid odata or Redfish property."
}
},
"additionalProperties": false,
"properties": {
"@odata.context": {
"$ref": "http://redfish.dmtf.org/schemas/v1/odata.4.0.0.json#/definitions/context"
},
"@odata.id": {
"$ref": "http://redfish.dmtf.org/schemas/v1/odata.4.0.0.json#/definitions/id"
},
"@odata.type": {
"$ref": "http://redfish.dmtf.org/schemas/v1/odata.4.0.0.json#/definitions/type"
},
"Id": {
"$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id"
},
"Description": {
"anyOf": [
{"$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"},
{"type": "null"}
]
},
"Name": {
"$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name"
},
"Data": {
"type": "array",
"items": {
"$ref": "#/definitions/DataItem"
},
"readonly": true,
"description": "Power data collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago.",
"longDescription": "Power data collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago."
}
},
"required": [
"Id",
"Name"
],
"description": "Power collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago.",
"longDescription": "Power collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago."
},
"DataItem": {
"type": "object",
"patternProperties": {
"^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
"type": [
"array",
"boolean",
"number",
"null",
"object",
"string"
],
"description": "This property shall specify a valid odata or Redfish property."
}
},
"additionalProperties": false,
"properties": {
"Time": {
"type": "string",
"readonly": true,
"description": "History time recorded for power consumption data.",
"longDescription": "History time recorded for power consumption data."
},
"PowerWatts": {
"type": "number",
"readonly": true,
"description": "The power collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago.",
"longDescription": "The power collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago."
},
"PowerAverageWatts": {
"type": "number",
"readonly": true,
"description": "Average power collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago.",
"longDescription": "Average power collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago."
},
"PowerPeakWatts": {
"type": "number",
"readonly": true,
"description": "Peak power collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago.",
"longDescription": "Peak power collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago."
}
},
"description": "Power data collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago.",
"longDescription": "Power data collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago."
}
},
"copyright": "Copyright © Huawei Technologies Co., Ltd. 2018. All rights reserved."
}
响应示例:
{
"@odata.context": "/redfish/v1/$metadata#Chassis/Members/1/Power/PowerHistoryData/$entity",
"@odata.id": "/redfish/v1/Chassis/1/Power/PowerHistoryData",
"@odata.type": "#HwPowerHistoryData.v1_0_0.HwPowerHistoryData",
“Id”: “PowerHistoryData”,
“Name”: “Power History Data”,
“Description”: “Power History Data”,
“Data”: [
{
“Time”: “2025/05/15 23:26:01”,
“PowerWatts”: 462,
“PowerAverageWatts”: 462,
“PowerPeakWatts”: 468
}
...
{
“Time”: “2025/05/22 23:31:05”,
“PowerWatts”: 462,
“PowerAverageWatts”: 462,
“PowerPeakWatts”: 468
}
]
}
2、URI: /redfish/v1/Chassis/{ChassisId}/Power新增属性PowerHistoryData
URI: /redfish/v1/Chassis/{ChassisId}/Power
变化类型:新增属性
操作类型:GET
权限:ReadOnly
| 属性名称 | 取值类型 | 说明 | 取值范围 | 默认值 | 操作权限 | 是否频繁变化并需要屏蔽变化事件 |
|---|---|---|---|---|---|---|
| PowerHistoryData | object | 历史功耗数据资源的链接集合 | NA | null | ReadOnly | 否 |
schema说明:
"PowerHistoryData": {
"anyOf": [
{ "$ref": "http://redfish.dmtf.org/schemas/v1/HwPowerHistoryData.json#/definitions/HwPowerHistoryData" },
{ "type": "null" }
],
"readonly": true,
"description": "Power data collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago.",
"longDescription": "Power data collected within the last week, day, or the period from the last statistics collection start time to 10 minutes ago."
}
响应示例:
{
"Oem": {
"openUBMC": {
"PowerHistoryData": {
"@odata.id": "/redfish/v1/Chassis/1/Power/PowerHistoryData"
}
}
}
}
评审结论
1、同意新增redfish接口查询历史功率信息,具体属性如下:URI:/redfish/v1/Chassis/{ChassisId}/Power/PowerHistoryData
| 属性名称 | 取值类型 | 说明 | 取值范围 | 默认值 | 操作权限 | 是否频繁变化并需要屏蔽变化事件 |
|---|---|---|---|---|---|---|
| Data[{ | array | 历史功耗数据 | NA | 空表 | ReadOnly | 是 |
| Time | string | 功耗数据记录时间,格式“yy/mm/dd hh:mm:ss”,例“ 2025/11/01 11:17:34” | string | 无 | ReadOnly | 是 |
| PowerWatts | number | 整机实时功耗,单位Watt | 大于等于0 | 无 | ReadOnly | 是 |
| PowerAverageWatts | number | 平均功耗,单位Watt | 大于等于0 | 无 | ReadOnly | 是 |
| PowerPeakWatts | number | 峰值功耗,单位Watt | 大于等于0 | 无 | ReadOnly | 是 |
| }] |
2、同意在URI: /redfish/v1/Chassis/{ChassisId}/Power的GET操作响应体新增属性PowerHistoryData,链接到历史功率数据查询接口,具体如下:
| 属性名称 | 取值类型 | 说明 | 取值范围 | 默认值 | 操作权限 | 是否频繁变化并需要屏蔽变化事件 |
|---|---|---|---|---|---|---|
| PowerHistoryData{ | object | |||||
| @odata.id | string | 历史功耗数据资源的链接 | 符合redfish uri格式要求的字符串 | 无 | 只读,ReadOnly | 否 |
| } |
3、redfish标准中Power资源已被废弃,接口说明中需要注明不建议使用
遗留问题
无