背景
redfish接口需要支持返回风扇的完整位置信息。为了支持web页面显示风扇的位置信息,在web_backend同步返回风扇的位置信息。
关联ISSUE
[需求]: 支持redfish/web rest接口风扇位置信息展示-rackmount-AtomGit | GitCode
评审点
- redfish新增标准属性 :/redfish/v1/Chassis/:chassisid/ThermalSubsystem/Fans/:fanid资源新增标准Location属性。
- web rest新增属性 :/UI/Rest/System/Thermal资源新增风扇Position属性。
详细描述
评审点1:redfish Fan资源新增标准Location属性
资源URI:/redfish/v1/Chassis/:chassisid/ThermalSubsystem/Fans/:fanid
资源版本:Fan.v1_5_2
| 一级属性 | 二级属性 | 三级属性 | 类型 | 示例/默认值/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|---|---|
Location |
object |
/ |
/ |
/ |
/ |
ReadOnly |
风扇的物理位置信息对象 |
||
PartLocation |
object |
/ |
/ |
/ |
/ |
ReadOnly |
风扇部件的详细位置描述 |
||
ServiceLabel |
[string, null] |
示例:"CLU1 Slot1" |
true |
否 |
/ |
ReadOnly |
服务标签,记录风扇的完整位置标识 |
||
LocationType |
[string, null] |
示例:"Slot" |
true |
否 |
/ |
ReadOnly |
位置类型,描述风扇的安装方式 |
||
LocationOrdinalValue |
[integer, null] |
示例:1 |
true |
否 |
/ |
ReadOnly |
风扇的安装槽位编号 |
Schema定义:
"Location": {
"$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Location",
"description": "The location of the fan.",
"longDescription": "This property shall contain the location information of this fan."
},
响应示例:
{
"@odata.context": "/redfish/v1/$metadata#Fan.Fan",
"@odata.id": "/redfish/v1/Chassis/1/ThermalSubsystem/Fans/1",
"@odata.type": "#Fan.v1_5_2.Fan",
...
"Location": {
"PartLocation": {
"ServiceLabel": "CLU1 Slot1",
"LocationType": "Slot",
"LocationOrdinalValue": 1
}
}
}
评审点2 :web rest新增/UI/Rest/System/Thermal资源风扇Position属性
资源URI:/UI/Rest/System/Thermal
操作类型 :GET
| 属性名 | 类型 | 示例/默认值/取值约束 | readonly | 操作权限 | 描述 |
|---|---|---|---|---|---|
Position |
string |
示例:"CLU1 Slot1" |
true |
ReadOnly |
风扇位置信息 |
响应示例:
{
...
"Fans": [
[
{
"Name": "Fan1",
"ExpectedSpeedRatio": 80,
"Position": "CLU1 Slot1",
...
}
],
...
],
...
}
预期界面:
评审结论
- redfish Fan资源新增标准Location属性
同意新增如下属性
资源URI:/redfish/v1/Chassis/:chassisid/ThermalSubsystem/Fans/:fanid
资源版本:Fan.v1_5_2
| 属性名称 | 取值类型 | 说明 | 默认值 | 操作权限 | 变更类型 |
|---|---|---|---|---|---|
| ServiceLabel | [string, null] | 风扇的完整位置标识 | 无 | ReadOnly | 新增 |
| LocationType | [string, null] | 风扇的安装方式 | 无 | ReadOnly | 新增 |
| LocationOrdinalValue | [integer, null] | 风扇的安装槽位编号 | 无 | ReadOnly | 新增 |
- web rest新增/UI/Rest/System/Thermal资源风扇Position属性
同意新增如下属性
| 属性名称 | 取值类型 | 说明 | 默认值 | 操作权限 | 变更类型 |
|---|---|---|---|---|---|
| Position | string | 风扇的位置信息 | 无 | ReadOnly | 新增 |
遗留问题
1、确认Location的schema定义中是否包含null,如果不包含,在无法访问到信息时也不能返回null。
结论:已闭环,“ServiceLabel”、“LocationType”、"LocationOrdinalValue"三个属性均可以为null。
