【已评审】支持度量机柜节能健康度

背景

新需求:支持度量机柜的节能健康度并为用户推荐节能策略以节省能耗,如果推荐的节能策略为深度休眠,则同时推荐要休眠的电源数量。并且提供web rest和redfish接口以方便用户查看推荐的节能策略。

当前差距:

  1. 在计算电源的节能健康度时,需要用到参数“电源模块休眠状态下的待机功耗”,当前无法获取该值;
  2. 如果推荐的节能策略为深度休眠,用户休眠了推荐数量的电源后,剩余工作的电源数量应支持业务的正常运行,当前并没有相关属性可以对此进行约束,因此需要提供接口给用户去配置最小工作电源数量;
  3. 已有的web、redfish接口不支持查看新增的深度休眠推荐策略,因此需要提供对应的接口。

关联ISSUE

支持度量机柜节能健康度

评审点

  1. redfish新增HwMeasurement资源,新增/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement接口,并在该接口下新增查询和设置最小工作电源数量属性MinWorkPSUCount、查询节能策略信息对象PolicyGuidances及其属性;
  2. web接口PolicyGuidance下新增查询当前策略参数属性CurrentPolicyName 、查询推荐策略参数属性RecommendedPolicyName;
  3. 新增表示最小工作电源数量的属性MinWorkPSUCount,GetPolicyGuidances方法的返回参数新增CurrentPolicyName 、RecommendedPolicyName参数,分别用于表示推荐策略名称、当前策略名称;
  4. 新增表示电源模块深度休眠状态下的待机功耗的属性DeepSleepStandbyPowerWatts

详细描述

评审点1、 新增/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement接口,并在/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement接口下新增MinWorkPSUCount、PolicyGuidances字段,分别用于表示最小工作电源数量(GET、PATCH)和节能策略信息(GET)

URI(新增):/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement
变化类型:新增属性MinWorkPSUCount
操作类型: GET/PATCH
应用场景:用户发送redfish接口查询最小工作电源数量
参数说明:

属性名称 取值类型 说明 取值范围 默认值 操作权限 是否频繁变化并需要屏蔽变化事件 约束
MinWorkPSUCount integer,null 最小工作电源数量 [1,254]或null 根据产品形态确定 GET:ReadOnly,PATCH:PowerMgmt 该值不能超过当前电源模块数量

请求示例:

{
    "MinWorkPSUCount": 2
}

URI(新增):/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement
变化类型:新增PolicyGuidances对象及其属性ComponentType、EnergySavingScore 、Current、Recommended,在Current下新增PolicyName 、PolicyValue属性,在Recommended下新增PolicyName 、PolicyValue 、Effect属性
操作类型: GET
应用场景:用户发送redfish接口查询节能策略信息
参数说明:

属性名称 取值类型 说明 取值范围 默认值 操作权限 是否频繁变化并需要屏蔽变化事件 约束
PolicyGuidances [{ array 节能策略信息 array [] ReadOnly
ComponentType string 部件类型 string null ReadOnly
EnergySavingScore integer 部件节能评分 [0,100] 0 ReadOnly
Current [{ array 部件当前策略,数组元素为部件当前的策略对象,包括策略名称、策略参数 array [] ReadOnly
PolicyName string 策略名称 取值参考表《策略名称列表》 null ReadOnly
PolicyValue string 策略参数 string null ReadOnly
}]
Recommended [{ array 部件推荐策略,数组元素为部件推荐的策略对象,包括策略名称、策略参数、策略影响 array [] ReadOnly
PolicyName string 策略名称 取值参考表《策略名称列表》 null ReadOnly
PolicyValue string 策略参数 string null ReadOnly
Effect string 推荐策略的影响 string null ReadOnly
}]
}]
策略名称列表
部件类型 策略名称取值 说明
Fan SmartCoolingMode 智能调速模式
MPC 风扇转速智能调控
PSU WorkMode 工作模式

schema说明:

{
    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema.v1_1_0.json",
    "title": "#HwMeasurement.v1_0_0.HwMeasurement",
    "$ref": "#/definitions/Measurement",
    "definitions": {
        "PolicyGuidance": {
            "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",
                        "integer",
                        "null",
                        "object",
                        "string"
                    ],
                    "description": "This property shall specify a valid odata or Redfish property."
                }
            },
            "additionalProperties": true,
            "properties": {
                "ComponentType": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "readonly": true,
                    "description": "The type of the component",
                    "longDescription": "The value of this property indicates the type of the component."
                },
                "EnergySavingScore": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100,
                    "readonly": true,
                    "default": null,
                    "description": "The energy saving score of the component.",
                    "longDescription": "The value of this property indicates the energy saving score of the component, ranging from 0 to 100."
                },
                "Current": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Current"
                    },
                    "readonly": true,
                    "description": "This is the definition for Current.",
                    "longDescription": "This is the collection of current policies of the component type."
                },
                "Recommended": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Recommended"
                    },
                    "readonly": true,
                    "description": "This is the definition for Recommended.",
                    "longDescription": "This is the collection of Recommended policies of the component type."
                }
            },
            "description": "This is the definition for the policy guidance of the component type.",
            "longDescription": "This is the definition for the policy guidance of the component type, which is the member of the PolicyGuidances array."
        },
        "Current": {
            "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",
                        "integer",
                        "null",
                        "object",
                        "string"
                    ],
                    "description": "This property shall specify a valid odata or Redfish property."
                }
            },
            "additionalProperties": true,
            "properties": {
                "PolicyName": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "readonly": true,
                    "default": null,
                    "description": "The name of the current policy",
                    "longDescription": "The value of this property shall be the name of the current policy."
                },
                "PolicyValue": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "readonly": true,
                    "default": null,
                    "description": "The value of the current policy.",
                    "longDescription": "The value of this property shall be the value of the current policy."
                }
            },
            "description": "This is the information of the current policy.",
            "longDescription": "The value of this property shall be the information of the ComponentType's current policy, which is the member of the Current array."
        },
        "Recommended": {
            "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",
                        "integer",
                        "null",
                        "object",
                        "string"
                    ],
                    "description": "This property shall specify a valid odata or Redfish property."
                }
            },
            "additionalProperties": true,
            "properties": {
                "PolicyName": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "readonly": true,
                    "default": null,
                    "description": "The name of the recommended policy",
                    "longDescription": "The value of this property shall be the name of the recommended policy."
                },
                "PolicyValue": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "readonly": true,
                    "default": null,
                    "description": "The value of the recommended policy.",
                    "longDescription": "The value of this property shall be the value of the recommended policy."
                },
                "Effect": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "readonly": true,
                    "default": null,
                    "description": "The effect of the recommended policy.",
                    "longDescription": "The value of this property shall be the effect of the recommended policy."
                }
            },
            "description": "This is the recommended policy collection of the component type.",
            "longDescription": "The value of this property shall be the information of the ComponentType's recommended policy, which is the member of the Recommended array."
        },
        "Measurement": {
            "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",
                        "integer",
                        "null",
                        "object",
                        "string"
                    ],
                    "description": "This property shall specify a valid odata or Redfish property."
                }
            },
            "additionalProperties": true,
            "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",
                    "readonly": true
                },
                "Description": {
                    "anyOf": [
                        {
                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "readonly": true
                },
                "Name": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
                    "readonly": true
                },
                "PolicyGuidances": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/PolicyGuidance"
                    },
                    "readonly": true,
                    "description": "This is the definition of PolicyGuidances.",
                    "longDescription": "This property shall be the definition of PolicyGuidances, which indicates the energy saving policy collection."
                },
                "MinWorkPSUCount": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "readonly": false,
                    "minimum": 1,
                    "maximum": 254,
                    "description": "The minimum number of working power supply units.",
                    "longDescription": "The minimum number of working power supply units required to ensure the normal operation of tasks on the server."
                }
            },
            "required": [
                "Id",
                "Name"
            ],
            "description": "This is the information of measurement.",
            "longDescription": "Measurement information, including the measurement information."
        }
    },
    "copyright": "Copyright © Huawei Technologies Co., Ltd. 2025. All rights reserved."
}

响应示例:

{
    "@odata.context": "/redfish/v1/$metadata#EnergySavingService.Measurement",
    "@odata.id": "/redfish/v1/Managers/Rack/EnergySavingService/Measurement",
    "@odata.type": "#HwMeasurement.v1_0_0.HwMeasurement",
    "Description": "Measurement",
    "Id": "Measurement",
    "Name": "Measurement",
    "MinWorkPSUCount": 2,
    "PolicyGuidances": [
        {
            "ComponentType": "PSU",
            "EnergySavingScore": 74,
            "Current": [
                {
                    "PolicyName": "WorkMode",
                    "PolicyValue": "LoadBalance"
                }
            ],
            "Recommended": [
                {
                    "PolicyName" : "WorkMode",
                    "PolicyValue": "DeepSleep:2",
                    "Effect": "The power supply to the system is affected"
                }
            ]
        }
    ]
}

2. web接口/UI/Rest/System/EnergySavingMeasurement下,PolicyGuidance下新增CurrentPolicyName、RecommendedPolicyName字段

URI(新增):/UI/Rest/System/EnergySavingMeasurement
变化类型:新增属性CurrentPolicyName、RecommendedPolicyName
操作类型: GET
应用场景:用户发送redfish接口查询节能策略信息
参数说明:

属性名称 取值类型 说明 取值范围 默认值 操作权限 是否频繁变化并需要屏蔽变化事件 约束
CurrentPolicyName array 当前策略参数 数组元素取值类型为String,取值参考《策略名称列表》 [] ReadOnly
RecommendedPolicyName array 推荐策略参数 数组元素取值类型为String,取值参考《策略名称列表》 [] ReadOnly

响应示例:

{
    "Measurement": {
        "PredictedPowerSavedKwh": null,
        "TotalPowerSavedKwh": 2.172,
        "HistoryPowerAverageWatts": 81,
        "PowerPredictStatus": "NoData",
        "LastEnabledTime": "2025/10/21 11:46:51",
        "PolicyGuidance": [
            {
                "HealthPercent": 0,
                "CurrentPolicies": [
                    "EnergySaving"
                ],
                "Component": "Fan",
                "Influence": [],
                "RecommendedPolicies": ["EnergySaving"],
                "CurrentPolicyName": ["SmartCoolingMode"],
                "RecommendedPolicyName": ["SmartCoolingMode"]
            }
        ]
    },
    "PredictedPowerData": null,
    "PredictedPowerSavedData": null
}

评审点3、在 bmc.kepler.Chassis.EnergySavingMeasurement接口下新增属性MinWorkPSUCount,用于表示最小工作电源数量,该接口下GetPolicyGuidances方法的返回参数新增CurrentPolicyName 、RecommendedPolicyName参数,分别用于表示推荐策略名称、当前策略名称

资源path(已有): /bmc/kepler/Chassis/:ChassisId/EnergySavingMeasurement
资源interface(已有): bmc.kepler.Chassis.EnergySavingMeasurement
新增属性:MinWorkPSUCount
变更方法:GetPolicyGuidances

属性名称 变化类型 签名 访问权限 持久化 变化通知 属性值来源 说明 约束
MinWorkPSUCount 新增属性 y 读写,读:ReadOnly,写:PowerMgmt 掉电持久化 false CSR配置,默认值为255,表示无效值,可以设置 最小工作电源数量 该值不应超过电源模块数量
方法名称 变化类型 请求签名 请求参数说明 响应签名 响应参数说明 访问权限 说明 约束
GetPolicyGuidances 变更方法 不涉及 a(syasasasasas) s:Component部件名
y: HealthPercent健康度
as: CurrentPolicies当前策略
as: RecommendedPolicies推荐策略
as: Influence影响
as: CurrentPolicyName 当前策略名称(新增)
as: RecommendedPolicyName推荐策略名称(新增)
ReadOnly CurrentPolicyName、RecommendedPolicyName数组元素取值参考《策略名称列表》 CurrentPolicyName 中的元素与CurrentPolicies中的元素一一对应,RecommendedPolicyName中的元素与RecommendedPolicies、Influence中的元素一一对应

评审点4、在bmc.kepler.Systems.PowerMgmt.OnePower接口下新增属性DeepSleepStandbyPowerWatts,用于表示电源模块深度休眠状态下的待机功耗

资源path(已有): /bmc/kepler/Systems/:SystemId/PowerMgmt/:ID
资源interface(已有):bmc.kepler.Systems.PowerMgmt.OnePower
新增属性:DeepSleepStandbyPowerWatts

属性名称 变化类型 签名 访问权限 持久化 变化通知 属性值来源 说明 约束
DeepSleepStandbyPowerWatts 新增属性 q 只读,读:ReadOnly 不持久化 false CSR,默认值为65535,65535表示无效值 电源模块深度休眠状态下的待机功耗

评审结论

  1. 同意新增/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement接口,并在/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement接口下新增MinWorkPSUCount、PolicyGuidances字段,分别用于表示最小工作电源数量(GET、PATCH)和节能策略信息(GET)(参见评审点描述)

  2. 同意在web接口/UI/Rest/System/EnergySavingMeasurement下的PolicyGuidance字段下新增CurrentPolicyName、RecommendedPolicyName字段,分别用于表示当前策略参数、推荐策略参数(参见评审点描述)

  3. 同意在bmc.kepler.Chassis.EnergySavingMeasurement接口下新增属性MinWorkPSUCount,用于表示最小工作电源数量,该接口下GetPolicyGuidances方法的返回参数新增CurrentPolicyName 、RecommendedPolicyName参数,分别用于表示推荐策略名称、当前策略名称(参见评审点描述)

  4. 同意在bmc.kepler.Systems.PowerMgmt.OnePower接口下新增属性DeepSleepStandbyPowerWatts,用于表示电源模块深度休眠状态下的待机功耗(参见评审点描述)

遗留问题

  1. 需要确认/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement GET接口查询到MinWorkPSUCount为null时是否可以设置,PATCH接口是否可以设置MinWorkPSUCount为null,是否需要新增属性来判断是否支持设置MinWorkPSUCount
    结论:/redfish/v1/Managers/{manager_id}/EnergySavingService/Measurement GET接口查询到MinWorkPSUCount为null时可以设置,并且可以设置MinWorkPSUCount为null,对应的资源协作接口属性变为255,此时不进行节能健康度量。不需要新增属性来判断是否支持设置MinWorkPSUCount,会根据是否存在资源协作接口MinWorkPSUCount来判断。

  2. 需要确认bmc.kepler.Chassis.EnergySavingMeasurement下的GetPolicyGuidances方法新增返回参数CurrentPolicyName 、RecommendedPolicyName参数是否会影响伙伴已有的功能
    结论:已确认完成,影响可控,当前接口非社区组件提供,无伙伴使用。GetPolicyGuidances 的响应签名变更需要发起接口变更: 【变更声明】资源协作接口GetPolicyGuidances响应签名变更 - Interface SIG - openUBMC 论坛


【预审】

  1. 这个属性的消费者是谁?没有消费者的属性建议私有化
  2. 用于表示电源模块深度休眠状态下的空闲损耗 这个是整个电源的属性还是单个电源?
  3. 电源深度休眠专业术语是 DeepSleep,选择 ColdSleep 的原因是啥?

1、“电源模块深度休眠状态下的待机功耗”属性需要power_strategy来调用,因此需要上树。
2、表示的是单个电源深度休眠状态下的待机功耗。
3、“电源模块深度休眠状态下的待机功耗”属性名称已修改为“DeepSleepStandbyPowerWatts”。