【已评审】支持电源通信丢失时相关属性返回NULL

背景

电源通讯异常场景,无法获取电源的动态信息(功率、电压、电流、温度),当前该场景下会将电源动态相关属性刷新显示为0。
schema定义中,相关属性均支持为null,但目前无场景返回null。电源通讯异常场景动态属性返回与redfish标准规范要求不符,需要修改电源通讯异常场景下的动态数据显示为null。

关联ISSUE

[缺陷]: 模拟电源通讯丢失,剩余属性显示为0是不合理的 - undefined/undefined - AtomGit (gitcode.com)

整体方案

redfish下的Power、PowerSupplies/:powersuppliesid/Metrics资源中,功率、电压、电流等属性在通信异常时返回null。
web中的PowerSupply资源,功率、电压、电流等属性在通信异常时返回null,网页端显示为“–”。
通信状态根据电源的CommunicationStatus属性判断,CommunicationStatus为1代表异常,为0代表正常。

评审点

评审点1:redfish变更Power资源,部分属性通信状态异常时返回null

资源URI :/redfish//redfish/v1/Chassis/:chassisid/Power
变更属性 :PowerInputWatts、InputAmperage、PowerOutputWatts、OutputAmperage、InletTemperatureCelsius、InnerTemperatureCelsius、OutputVoltage

评审点2:redfish变更PowerSupplies Metrics资源,部分属性通信状态异常时返回null

资源URI :/redfish//redfish/v1/Chassis/:chassisid/Power
变更属性 : FrequencyHz/Reading、InputCurrentAmps/Reading、InputPowerWatts/Reading、InputVoltage/Reading、OutputPowerWatts/Reading、TemperatureCelsius/Reading

评审点3:web变更PowerSupply资源,部分属性通信异常时返回null

资源URI :/UI/Rest/System/PowerSupply
变更属性 :OutputVoltage、InputWatts、LineInputVoltage、PowerCapacityWatts

详细描述

场景1:redfish变更Power资源,部分属性通信状态异常时返回null

资源URI :/redfish//redfish/v1/Chassis/:chassisid/Power
资源版本 :Power.v1_2_1

属性名 类型 示例/取值约束 readonly 易变属性 实现PATCH 操作权限 描述
PowerInputWatts [number,null] 206 true ReadOnly 电源输入功率
InputAmperage [number,null] 0.93 true ReadOnly 电源输入电流
PowerOutputWatts [number,null] 185 true ReadOnly 电源输出功率
OutputAmperage [number,null] 15 true ReadOnly 电源输出电流
InletTemperatureCelsius [number,null] 0 true ReadOnly 电源进风口温度
InnerTemperatureCelsius [number,null] 0 true ReadOnly 电源出风口温度
OutputVoltage [number,null] 12.28 true ReadOnly 电源输出电压

Schema定义(上述属性取值均可以为null)

                "PowerInputWatts": {
                    "type": [
                        "number",
                        "null"
                    ],
                    "units": "W",
                    "minimum": 0,
                    "readonly": true,
                    "description": "Input power.",
                    "longDescription": "The value of this property shall represent the input power. The unit is W."
                },
                "InputAmperage": {
                    "type": [
                        "number",
                        "null"
                    ],
                    "units": "A",
                    "minimum": 0,
                    "readonly": true,
                    "description": "Input current.",
                    "longDescription": "The value of this property shall represent the input current. The unit is A."
                },
                "PowerOutputWatts": {
                    "type": [
                        "number",
                        "null"
                    ],
                    "units": "W",
                    "minimum": 0,
                    "readonly": true,
                    "description": "Output power.",
                    "longDescription": "The value of this property shall represent the output power. The unit is W."
                },
                "OutputAmperage": {
                    "type": [
                        "number",
                        "null"
                    ],
                    "units": "A",
                    "minimum": 0,
                    "readonly": true,
                    "description": "Output current.",
                    "longDescription": "The value of this property shall represent the output current. The unit is A."
                },
                "OutputVoltage": {
                    "type": [
                        "number",
                        "null"
                    ],
                    "units": "V",
                    "minimum": 0,
                    "readonly": true,
                    "description": "Output voltage.",
                    "longDescription": "The value of this property shall represent the output voltage. The unit is V."
                },
                "InletTemperatureCelsius": {
                    "type": [
                        "number",
                        "null"
                    ],
                    "readonly": true,
                    "description": "Power Inlet Temperature.",
                    "longDescription": "The value of this property shall represent the inlet temperature of power psu. The unit is C."
                },
                "InnerTemperatureCelsius": {
                    "type": [
                        "number",
                        "null"
                    ],
                    "readonly": true,
                    "description": "Power Inner Temperature.",
                    "longDescription": "The value of this property shall represent the inner temperature of power psu. The unit is C."
                },

通讯正常响应示例

            "Oem": {
                "Huawei": {
                    "Protocol": "pmbus",
                    "ActiveStandby": "Active",
                    "PowerInputWatts": 206,
                    "InputAmperage": 0.93,
                    "PowerOutputWatts": 185,
                    "OutputAmperage": 15,
                    "InletTemperatureCelsius": 0,
                    "InnerTemperatureCelsius": 0,
                    "OutputVoltage": 12.28,
                    "DeviceLocator": "PSU1",
                    "SlotNumber": 1,
                    ...
                }
            }

通讯异常响应示例

            "Oem": {
                "Huawei": {
                    "Protocol": "pmbus",
                    "ActiveStandby": "Active",
                    "PowerInputWatts": null,
                    "InputAmperage": null,
                    "PowerOutputWatts": null,
                    "OutputAmperage": null,
                    "InletTemperatureCelsius": null,
                    "InnerTemperatureCelsius": null,
                    "OutputVoltage": null,
                    "DeviceLocator": "PSU1",
                    "SlotNumber": 1,
                    ...
                }
            }
        },

场景2:redfish变更PowerSupplies Metrics资源,部分属性通信状态异常时返回null

资源URI :/redfish/v1/Chassis/:chassisid/PowerSubsystem/PowerSupplies/:powersuppliesid/Metrics
资源版本 :PowerSupplyMetrics.v1_1_2

属性名 类型 示例/取值约束 readonly 易变属性 实现PATCH 操作权限 描述
FrequencyHz/Reading [number,null] 0 true ReadOnly 电源频率,交流显示频率,直流显示为0
InputCurrentAmps/Reading [number,null] 1 true ReadOnly 电源输入电流
InputPowerWatts/Reading [number,null] 206 true ReadOnly 电源输出功率
InputVoltage/Reading [number,null] 222 true ReadOnly 电源输出电流
OutputPowerWatts/Reading [number,null] 185 true ReadOnly 电源进风口温度
TemperatureCelsius/Reading [number,null] 33 true ReadOnly 电源出风口温度

Schema定义(上述属性取值均可以为null)

"Reading": {
    "description": "The sensor value.",
    "excerpt": "Sensor",
    "longDescription": "This property shall contain the sensor value.  This property shall not be returned if the `Enabled` property is supported and contains `false`.",
    "readonly": true,
    "type": [
        "number",
        "null"
    ]
}

通讯正常响应示例

{
...
    "FrequencyHz": {
        "Reading": 0
        ...
    },
    "InputCurrentAmps": {
        "Reading": 1,
        ...
    },
    "InputPowerWatts": {
        "Reading": 206,
        ...
    },
    "InputVoltage": {
        "Reading": 222,
        ...
    },
    "OutputPowerWatts": {
        "Reading": 184,
        ...
    },
    "TemperatureCelsius": {
        "Reading": 33
        ...
    },
...
}

通讯异常响应示例

{
...
    "FrequencyHz": {
        "Reading": null
        ...
    },
    "InputCurrentAmps": {
        "Reading": null,
        ...
    },
    "InputPowerWatts": {
        "Reading": null,
        ...
    },
    "InputVoltage": {
        "Reading": null,
        ...
    },
    "OutputPowerWatts": {
        "Reading": null,
        ...
    },
    "TemperatureCelsius": {
        "Reading": null
        ...
    },
...
}

场景3:web变更PowerSupply资源,部分属性通信异常时返回null

资源URI : /UI/Rest/System/PowerSupply

属性名 类型 示例/取值约束 描述
OutputVoltage [number,null] 12.29 电源输出电压
InputWatts [number,null] 170 电源输入功率
LineInputVoltage [number,null] 223 电源输入电压
PowerCapacityWatts [number,null] 2000 电源额定功率

响应示例(电源1通信异常,电源2通信正常)

{
...
    "SupplyList": [
        {
            "OutputVoltage": null,
            "InputWatts": null,
            "Name": "PSU1",
            "LineInputVoltage": null,
            "PowerCapacityWatts": null,
            ...
        },
        {
            "OutputVoltage": 12.29,
            "InputWatts": 170,
            "Name": "PSU2",
            "LineInputVoltage": 223,
            "PowerCapacityWatts": 2000,
            ...
        }
    ],
...
}

网页端示例(电源1通信异常,电源2通信正常):

PSU1 负载均衡 当前功率W --
槽位	1
厂商	    HUAWEI
类型	    PAC2000S12-B1
序列号	2102314KMUW0Q1000928
固件版本	DC:108 PFC:108
部件编码	02314KMU
生产日期	2024-01-07
额定功率	--
供电线路	主电路
输入模式	AC
输入电压	--
输出电压	--

PSU2 负载均衡 当前功率W 133
槽位	2
厂商	    HUAWEI
类型	    PAC2000S12-B1
序列号	2102314KMUW0Q1002274
固件版本	DC:108 PFC:108
部件编码	02314KMU
生产日期	2024-01-10
额定功率	2000 W
供电线路	主电路
输入模式	AC
输入电压	222 V
输出电压	12.29 V

是否准备好AI预审

评审结论

同意Power和PowerSupplies Metrics两个redfish资源的动态属性在通信异常时返回null,同意web端PowerSupply在通信异常时返回null,前端显示为"- -"。具体属性为下面三个评审点:

评审点1:redfish变更Power资源,部分属性通信状态异常时返回null

资源URI :/redfish//redfish/v1/Chassis/:chassisid/Power
变更属性 :PowerInputWatts、InputAmperage、PowerOutputWatts、OutputAmperage、InletTemperatureCelsius、InnerTemperatureCelsius、OutputVoltage

评审点2:redfish变更PowerSupplies Metrics资源,部分属性通信状态异常时返回null

资源URI :/redfish//redfish/v1/Chassis/:chassisid/Power
变更属性 : FrequencyHz/Reading、InputCurrentAmps/Reading、InputPowerWatts/Reading、InputVoltage/Reading、OutputPowerWatts/Reading、TemperatureCelsius/Reading

评审点3:web变更PowerSupply资源,部分属性通信异常时返回null

资源URI :/UI/Rest/System/PowerSupply
变更属性 :OutputVoltage、InputWatts、LineInputVoltage、PowerCapacityWatts

遗留问题

1、发一下接口变更声明并审核,让PAE将接口变更声明发给伙伴。
已审核接口变更声明并和pae同步

预审答案内容由AI生成,仅供参考:

帖子评审结论:【待评审】支持电源通信丢失时相关属性返回NULL

帖子相关性:相关(Redfish 相关: 帖子内容包含 ‘redfish’ 关键字)

  • 总评审点数:3
  • Redfish 相关评审点:3
  • 其他评审点:0

总体结果:不通过(1/3 个评审点通过)

评审点 1:redfish变更Power资源,部分属性通信状态异常时返回null【Redfish】

结果:不通过

  • URI 示例生成:通过
  • Schema 验证:出错(未知错误)
  • 规则合规性检查:通过(18 项检查全部通过)

评审点 2:redfish变更PowerSupplies Metrics资源,部分属性通信状态异常时返回null【Redfish】

结果:通过

  • URI 示例生成:通过
  • Schema 验证:通过(0 项通过,5 项警告)
    • Schema 来源:DMTF ✓,OEM ✗(实际参与校验:DMTF)
    • 入口 schema 文件:dmtf/Power.v1_2_1.json(DMTF 官方 schema(SchemaFiles/dmtf))
    • Schema 依据:静态校验直接依据:DMTF 官方 schema(SchemaFiles/dmtf)(dmtf/Power.v1_2_1.json)
  • 规则合规性检查:通过(18 项检查全部通过)

评审点 3:web变更PowerSupply资源,部分属性通信异常时返回null【Redfish】

结果:不通过

  • URI 示例生成:通过
  • Schema 验证:通过(0 项通过,4 项警告)
    • Schema 来源:DMTF ✓,OEM ✗(实际参与校验:DMTF)
    • 入口 schema 文件:dmtf/Power.v1_2_1.json(DMTF 官方 schema(SchemaFiles/dmtf))
    • Schema 依据:静态校验直接依据:DMTF 官方 schema(SchemaFiles/dmtf)(dmtf/Power.v1_2_1.json)
  • 规则合规性检查:不通过(1/18 项失败)
    • 规则合规性失败项(必须项)
      规则ID:RULE-004
      级别:必须项
      问题描述:URI 格式不符合 Redfish 规范,缺少必需的 redfish/v1/ 层级
      处理建议:将 URI 修改为标准 Redfish 格式,例如:/redfish/v1/Chassis/{ChassisId}/Power 或 /redfish/v1/Managers/{ManagerId}/Power。标准 Redfish 资源必须以 /redfish/v1/ 开头