背景
光模块可定位性增强,需要新增日志收集功能:支持带外收集光模块4种日志类型。
关联ISSUE
暂无
整体方案
1、资源协作接口bmc.kepler.Systems.OpticalModule.Diagnose新增RPC方法:DumpLog,支持光模块日志收集
2、新增redfish接口导出光模块日志/redfish/v1/Managers/:managerid/DiagnosticService/Actions/DiagnosticService.ExportTransceiverLog
3、新增redfish接口查询导出光模块日志方法参数/redfish/v1/Managers/:managerid/DiagnosticService/ExportTransceiverLogActionInfo
评审点
1、资源协作接口bmc.kepler.Systems.OpticalModule.Diagnose新增RPC方法:DumpLog,支持光模块日志收集
2、新增redfish接口导出光模块日志/redfish/v1/Managers/:managerid/DiagnosticService/Actions/DiagnosticService.ExportTransceiverLog
3、新增redfish接口查询导出光模块日志方法参数/redfish/v1/Managers/:managerid/DiagnosticService/ExportTransceiverLogActionInfo
详细描述
评审点1:资源协作接口bmc.kepler.Systems.OpticalModule.Diagnose新增RPC方法:DumpLog,支持光模块日志收集
资源path: /bmc/kepler/Chassis/:ChassisId/Transceivers/:ID
资源interface:bmc.kepler.Systems.OpticalModule.Diagnose
变化类型:新增方法
应用场景:北向接口触发光模块日志收集
操作权限:DiagnoseMgmt
详细描述:
| 方法名称 | 变化类型 | 签名 | 读写&权限 | 持久化 | 变化通知 | 接口说明 | 接口约束 |
|---|---|---|---|---|---|---|---|
| DumpLog | 新增方法 | 请求:ass 响应:u |
DiagnoseMgmt | NA | NA | 请求: LogType:日志类型,字符串数组类型。 OutputFilePath:导出文件路径,字符串类型。 响应: TaskId:任务ID,数字类型U32。 |
请求: LogType:日志类型,支持的日志类型包括HostOp、HostPerf、 SdkOp、SdkPerf日志。 OutputFilePath:操作路径 1、本地导出:“/tmp/文件路径” 2、远程导出:“文件传输协议://用户名:密码@ip地址/目录/文件名” 文件传输协议包括五种:sftp、https、nfs、cifs、scp。 响应: TaskId:任务ID。 |
LogType参数说明:
| 取值 | 说明 |
|---|---|
| HostOp | 表示Host 操作日志 |
| HostPerf | 表示Host 运行日志 |
| SdkOp | 表示SDK 操作日志 |
| SdkPerf | 表示SDK 运行日志 |
评审点2:新增redfish接口导出光模块日志/redfish/v1/Managers/:managerid/DiagnosticService/Actions/DiagnosticService.ExportTransceiverLog
URI:/redfish/v1/Managers/:managerid/DiagnosticService/Actions/DiagnosticService.ExportTransceiverLog
新增资源版本:hwdiagnosticservice.v1_0_0.json
操作类型: Post
操作权限: DiagnoseMgmt
输入参数:
| 参数名 | 类型 | 必填 | 示例/取值约束 | 描述 |
|---|---|---|---|---|
| TransceiverName | string | 否 | 示例: transceiver1 不填表示导出所有光模块的日志 |
指定光模块名称 |
| Type | string | 是 | 日志导出类型:URI | 日志类型 |
| Content | string | 是 | 示例: “/tmp/文件路径” | 导出文件路径,支持本地导出和远程导出 |
Schema定义:
hwdiagnosticservice.v1_0_0.json
"ExportTransceiverLog": {
"patternProperties": {
"^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
"type": [
"array",
"boolean",
"number",
"null",
"object",
"string"
],
"description": "This property shall specify a valid odata or Redfish property."
}
},
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Friendly action name"
},
"target": {
"type": "string",
"format": "uri",
"description": "Link to invoke action"
},
"@Redfish.ActionInfo": {
"description": "The term can be applied to an action to specify a URI to an ActionInfo resource that describes the parameters supported by this instance of the action.",
"type": "string",
"format": "uri-reference",
"readonly": true
}
},
"parameters": {
"TransceiverName": {
"type": "integer",
"readonly": false,
"requiredParameter": false,
"description": "Transceiver Name.",
"longDescription": "Transceiver Name."
},
"Type": {
"type": "string",
"readonly": false,
"requiredParameter": true,
"description": "Export type.",
"longDescription": "Export type."
},
"Content": {
"type": "string",
"readonly": false,
"requiredParameter": true,
"description": "File export directory.",
"longDescription": "File export directory."
}
},
"description": "This action export Transceiver log.",
"longDescription": "This action export Transceiver log."
}
评审点三:新增redfish接口查询导出光模块日志方法参数/redfish/v1/Managers/:managerid/DiagnosticService/ExportTransceiverLogActionInfo
资源URI:/redfish/v1/Managers/:managerid/DiagnosticService/ExportTransceiverLogActionInfo
新增资源版本:hwdiagnosticservice.v1_0_0.json
操作类型: Get
操作权限: ReadOnly
输入参数: 无
响应参数:
{
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/Managers/1/DiagnosticService/ExportTransceiverLogActionInfo",
"@odata.type": "#ActionInfo.v1_0_0.ActionInfo",
"Id": "ExportTransceiverLogActionInfo",
"Name": "Export Transceiver Log Action Info",
"Parameters": [
{
"Name": "TransceiverName",
"DataType": "String",
"Required": false
},
{
"Name": "Type",
"Required": true,
"DataType": "String",
"AllowableValues": [
"URI"
]
},
{
"Name": "Content",
"Required": true,
"DataType": "String"
}
],
"Oem": {}
}