背景
扩展对redfish新规范的支持:支持规范定义的MemoryMetrics和ProcessorMetrics资源ClearCurrentPeriod Action方法(如{Base URI of target resource}/Actions/MemoryMetrics.ClearCurrentPeriod),用于清零该资源下当前周期的度量统计数据
关联ISSUE
支持指定MemoryRAS/CPURAS的当前周期统计清除资源协作接口
整体方案
北向接口调用清除资源协作接口,触发组件清零度量统计相关属性,当前属性包括MemoryRAS类CurrentPeriodUncorrectableECCErrorCount,CPURAS类CurrentPeriodCacheUncorrectableECCErrorCount
评审点
1)新增资源协作接口方法
CPURAS类新增资源协作接口方法:ClearCurrentPeriodMetrics
MemoryRAS类新增资源协作接口方法:ClearCurrentPeriodMetrics
2)实现对redfish新规范的支持
父资源/redfish/v1/Systems/:systemid/Processors/:processorid/ProcessorMetrics资源下新增如下接口:
POST方法
/redfish/v1/Systems/:systemid/Processors/:processorid/ProcessorMetrics/Actions/ProcessorMetrics.ClearCurrentPeriod
用于清零该资源下当前周期的度量统计数据
GET方法
/redfish/v1/Systems/:systemid/Processors/:processorid/ProcessorMetrics/ClearCurrentPeriodActionInfo
用于返回Action方法信息
父资源/redfish/v1/Systems/:systemid/Memory/:memoryid/MemoryMetrics资源下新增如下接口:
POST方法
/redfish/v1/Systems/:systemid/Memory/:memoryid/MemoryMetrics/Actions/MemoryMetrics.ClearCurrentPeriod
用于清零该资源下当前周期的度量统计数据
GET方法
/redfish/v1/Systems/:systemid/Memory/:memoryid/MemoryMetrics/ClearCurrentPeriodActionInfo
用于返回Action方法信息
详细描述
1)新增资源协作接口方法
资源path: /bmc/kepler/Systems/${SystemId}/FDMDomain/MemoryRAS/${Id}
资源interface: bmc.kepler.Systems.FDMDomain.MemoryRAS
变化类型:新增方法
应用场景:清零该资源下当前周期的度量统计数据,如CurrentPeriodUncorrectableECCErrorCount
| 方法名称 | 变化类型 | req签名 | 请求参数 | rsp签名 | 响应参数 | 权限 | 说明 | 接口约束 |
|---|---|---|---|---|---|---|---|---|
| ClearCurrentPeriodMetrics | 新增方法 | 无 | 无 | 无 | 无 | BasicSetting | 清零该资源下当前周期的度量统计数据,如CurrentPeriodUncorrectableECCErrorCount | 无 |
资源path: /bmc/kepler/Systems/${SystemId}/FDMDomain/CPURAS/${Id}
资源interface: bmc.kepler.Systems.FDMDomain.CPURAS
变化类型:新增方法
应用场景:清零该资源下当前周期的度量统计数据,如CurrentPeriodCacheUncorrectableECCErrorCount
| 方法名称 | 变化类型 | req签名 | 请求参数 | rsp签名 | 响应参数 | 权限 | 说明 | 接口约束 |
|---|---|---|---|---|---|---|---|---|
| ClearCurrentPeriodMetrics | 新增方法 | 无 | 无 | 无 | 无 | BasicSetting | 清零该资源下当前周期的度量统计数据,如CurrentPeriodCacheUncorrectableECCErrorCount | 无 |
2)实现对redfish新规范的支持
/redfish/v1/Systems/:systemid/Processors/:processorid/ProcessorMetrics/Actions/ProcessorMetrics.ClearCurrentPeriod
变化类型:新增接口
应用场景:redfish清零该资源下当前周期的度量统计数据
操作类型:POST
详细描述:
请求体为空对象
返回为空对象
/redfish/v1/Systems/:systemid/Memory/:memoryid/MemoryMetrics/Actions/MemoryMetrics.ClearCurrentPeriod
变化类型:新增接口
应用场景:redfish清零该资源下当前周期的度量统计数据
操作类型:POST
详细描述:
请求体为空对象
返回为空对象
操作日志
clear XXX current period metrics successfully
clear XXX current period metrics failed
注:其中XXX为CPU/DIMM名称
评审结论
1、同意新增资源协作接口方法用于清除CPU和内存当前统计周期内度量数据,具体如下:
path: /bmc/kepler/Systems/${SystemId}/FDMDomain/MemoryRAS/${Id}
interface: bmc.kepler.Systems.FDMDomain.MemoryRAS
变化类型:新增方法
- ClearCurrentPeriodMetrics:清除CPU当前统计周期内的RAS度量数据,权限:BasicSetting,无请求/响应参数
path: /bmc/kepler/Systems/${SystemId}/FDMDomain/CPURAS/${Id}
interface: bmc.kepler.Systems.FDMDomain.CPURAS
变化类型:新增方法
- ClearCurrentPeriodMetrics:清除内存当前统计周期内的RAS度量数据,权限:BasicSetting,无请求/响应参数
2、同意新增redfish标准资源ProcessorMetrics的Action,具体如下:
uri:/redfish/v1/Systems/:systemid/Processors/:processorid/ProcessorMetrics/Actions/ProcessorMetrics.ClearCurrentPeriod
操作类型:POST
变化类型:新增Action
请求参数:无
uri: /redfish/v1/Systems/:systemid/Processors/:processorid/ProcessorMetrics/ClearCurrentPeriodActionInfo
操作类型:GET
变化类型:响应体中增加Action链接
3、同意新增redfish标准资源MemoryMetrics的Action,具体如下:
uri:/redfish/v1/Systems/:systemid/Memory/:memoryid/MemoryMetrics/Actions/MemoryMetrics.ClearCurrentPeriod
操作类型:POST
变化类型:新增Action
请求参数:无
uri:/redfish/v1/Systems/:systemid/Memory/:memoryid/MemoryMetrics/ClearCurrentPeriodActionInfo
操作类型:GET
变化类型:响应体增加Action链接
遗留问题
1、操作日志需要优化,不能体现接口上的属性名称,要以客户能理解的语言描述
原操作日志为:
Set XXX ProcessorMetrics CurrentPeriod property’s values to 0
Failed to set XXX ProcessorMetrics CurrentPeriod property’s values to 0
Set XXX MemoryMetrics CurrentPeriod property’s values to 0
Failed to set XXX MemoryMetrics CurrentPeriod property’s values to 0
结论: 已修改,参见详细描述