【待评审】支持Processors资源新增EnvironmentMetrics和Location属性

背景

为适配Redfish数据模型规范,需在Processors资源下新增EnvironmentMetrics子资源链接及Location属性,并新增EnvironmentMetrics子资源查询接口,支持处理器功耗、温度、电压等环境指标数据的查询。

关联ISSUE

支持Processors资源的EnvironmentMetrics和Location属性

评审点

1、在/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}下新增属性EnvironmentMetrics,用于链接处理器环境指标子资源
2、在/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}下新增属性Location/PartLocation/ServiceLabel、Location/PartLocation/LocationOrdinal、Location/PartLocation/LocationType,用于标识处理器部件位置信息
3、在/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}/EnvironmentMetrics下新增查询接口,返回PowerWatts、PowerLimitWatts、TemperatureCelsius、Voltage传感器数据

详细描述

评审点1:在/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}下新增属性EnvironmentMetrics,用于链接处理器环境指标子资源

资源URI:/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}

资源版本:Processor.v1_17_0

操作权限:ReadOnly

响应参数:

属性名 类型 示例/取值约束 readonly 易变属性 实现patch 操作权限 描述
EnvironmentMetrics object,null {“@odata.id”: “/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}/EnvironmentMetrics”} ReadOnly 处理器环境指标子资源链接,所有处理器类型(CPU/NPU/GPU)均返回此链接

Schema定义:

"EnvironmentMetrics": {
    "$ref": "http://redfish.dmtf.org/schemas/v1/EnvironmentMetrics.json#/definitions/EnvironmentMetrics",
    "description": "The link to the environment metrics for this processor.",
    "longDescription": "This property shall contain a link to a resource of type EnvironmentMetrics that specifies the environment metrics for this processor.",
    "readonly": true,
    "versionAdded": "v1_11_0"
}

评审点2:在/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}下新增属性Location/PartLocation/ServiceLabel、Location/PartLocation/LocationOrdinal、Location/PartLocation/LocationType,用于标识处理器部件位置信息

资源URI:/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}

资源版本:Processor.v1_17_0

操作权限:ReadOnly

响应参数:

属性名 类型 示例/取值约束 readonly 易变属性 实现patch 操作权限 描述
Location/PartLocation/ServiceLabel string,null CPU: “CPU {PhysicalId}”;NPU: “NPU {Id}”;GPU: 不返回Location ReadOnly 处理器部件位置服务标签,CPU类型基于PhysicalId生成,NPU类型基于Id生成
Location/PartLocation/LocationOrdinal integer,null CPU: PhysicalId数值;NPU: Id数值 ReadOnly 处理器部件位置序号,CPU类型基于PhysicalId,NPU类型基于Id
Location/PartLocation/LocationType string,null 枚举值:[Socket, Embedded];CPU可替换时为Socket,不可替换时为Embedded;NPU为Embedded;GPU不返回Location ReadOnly 处理器部件位置类型,CPU类型基于Replaceable属性判断(Replaceable为true时为Socket,否则为Embedded),NPU类型固定为Embedded

Schema定义:

"Location": {
    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Location",
    "description": "The location of the processor.",
    "longDescription": "This property shall contain location information of the associated processor.",
    "versionAdded": "v1_2_0"
}

评审点3:在/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}/EnvironmentMetrics下新增查询接口,返回PowerWatts、PowerLimitWatts、TemperatureCelsius、Voltage传感器数据

资源URI:/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}/EnvironmentMetrics

资源版本:EnvironmentMetrics.v1_5_0

操作权限:ReadOnly

响应参数:

属性名 类型 示例/取值约束 readonly 易变属性 实现patch 操作权限 描述
PowerWatts/Reading number,null CPU: PowerWatt(0/16384→null);NPU: Power(32768→null);GPU: PowerWatts(32768/16384→null) ReadOnly 处理器功耗读数(W),IgnoreEtags;CPU数据来源bmc.kepler.Systems.Processor.CPU,NPU数据来源bmc.kepler.Systems.Processor.NPU,GPU数据来源bmc.kepler.Systems.Processor.GPU.Power
PowerLimitWatts/Reading number,null NPU: PowerCapWatts(65535→null);CPU/GPU: 不返回此属性 ReadOnly 处理器功耗限制读数(W),IgnoreEtags;仅NPU类型返回此属性,数据来源bmc.kepler.Systems.Processor.NPU
TemperatureCelsius/Reading number,null CPU: Temperature(16384/32768→null);GPU: GPUTemp(32768/16384/小于0→null);NPU: 不返回此属性 ReadOnly 处理器温度读数(℃),IgnoreEtags;CPU数据来源bmc.kepler.Systems.Processor.CPU,GPU数据来源bmc.kepler.Systems.Processor.GPU
Voltage/Reading number,null NPU: Volt(32768→null);CPU/GPU: 不返回此属性 ReadOnly 处理器电压读数(V),IgnoreEtags;仅NPU类型返回此属性,数据来源bmc.kepler.Systems.Processor.NPU

Schema定义:

"PowerWatts": {
    "anyOf": [
        {
            "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorPowerExcerpt"
        },
        {
            "type": "null"
        }
    ],
    "description": "Power consumption (W).",
    "excerptCopy": "SensorPowerExcerpt",
    "longDescription": "This property shall contain the total power, in watt units, for this resource.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Power`."
},
"PowerLimitWatts": {
    "anyOf": [
        {
            "$ref": "http://redfish.dmtf.org/schemas/v1/Control.json#/definitions/ControlSingleExcerpt"
        },
        {
            "type": "null"
        }
    ],
    "description": "Power limit (W).",
    "excerptCopy": "ControlSingleExcerpt",
    "longDescription": "This property shall contain the power limit control, in watt units, for this resource.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Control` with the `ControlType` property containing the value of `Power`.",
    "readonly": false,
    "versionAdded": "v1_1_0"
},
"TemperatureCelsius": {
    "anyOf": [
        {
            "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorExcerpt"
        },
        {
            "type": "null"
        }
    ],
    "description": "Temperature (Celsius).",
    "excerptCopy": "SensorExcerpt",
    "longDescription": "This property shall contain the temperature, in degree Celsius units, for this resource.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Temperature`."
},
"Voltage": {
    "anyOf": [
        {
            "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorVoltageExcerpt"
        },
        {
            "type": "null"
        }
    ],
    "description": "The voltage (V) for this device.",
    "excerptCopy": "SensorVoltageExcerpt",
    "longDescription": "This property shall contain the voltage, in volt units, for this device.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Voltage`.",
    "versionAdded": "v1_5_0"
}

评审结论