背景
在多主机(Multi-host)计算系统场景下,BMC需要对多台主机进行统一的电源控制、启动证书管理及BIOS设置等批量操作。当前openUBMC的Redfish接口中缺少对多主机系统的统一管理资源,用户无法通过单一接口对多台主机执行批量复位、启动证书重置/导入等操作,影响多主机系统的运维效率。
依据openUBMC OEM扩展规范,新增SystemAssembly OEM资源,提供多主机系统的统一管理入口,支持批量电源控制、启动证书管理以及BIOS设置下发等功能。
关联ISSUE
待补充
整体方案
新增OEM资源SystemAssembly及其配套Action,整体方案包括:
- 新增OEM资源SystemAssembly,提供多主机系统列表查询(GET)和批量BIOS设置/启动配置下发(PATCH)
- 新增Action SystemAssembly.Reset,支持对指定多台主机批量执行电源复位操作
- 新增Action SystemAssembly.ResetBootCert,支持对指定多台主机批量重置启动证书
- 新增Action SystemAssembly.ImportBootCert,支持对指定多台主机批量导入启动证书
- 配套新增3个ActionInfo资源,描述各Action的参数定义
- 新增资源协作接口及路径,为SystemAssembly资源提供数据来源
评审点
新增OEM资源SystemAssembly、3个Action(Reset、ResetBootCert、ImportBootCert)及对应ActionInfo、资源协作接口。
详细描述
评审点1:新增OEM资源 SystemAssembly
资源URI:/redfish/v1/Oem/{{OemIdentifier}}/SystemAssembly
属性列表:
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| Systems | array | 数组元素包含SystemId、BiosSettings、Boot、PowerState属性 | true | 否 | 否 | ReadOnly | 多主机系统信息数组,通过Expand展开获取 |
| Actions | object | 包含#SystemAssembly.Reset、#SystemAssembly.ResetBootCert、#SystemAssembly.ImportBootCert三个Action | true | 否 | / | ReadOnly | 可执行的操作集合 |
Systems数组元素属性:
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| SystemId | string | “1” | true | 否 | / | ReadOnly | 主机系统标识 |
| BiosSettings | object | 包含Attributes子属性 | true | 否 | / | ReadOnly | BIOS设置信息 |
| Attributes | object | BIOS属性键值对 | true | 否 | / | ReadOnly | BIOS配置属性集合 |
| Boot | object | 包含BootSourceOverrideTarget等子属性 | true | 否 | / | ReadOnly | 启动配置信息 |
| BootSourceOverrideTarget | string | 枚举值:None、Pxe、Floppy、Cd、Hdd、BiosSetup | true | 否 | / | ReadOnly | 启动源覆盖目标 |
| BootSourceOverrideEnabled | string | / | true | 否 | / | ReadOnly | 启动源覆盖是否启用 |
| BootSourceOverrideMode | string | / | true | 否 | / | ReadOnly | 启动模式 |
| PowerState | string | 枚举值:On、Off | true | 是 | / | ReadOnly | 主机电源状态 |
PATCH操作属性列表:
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| Systems | array | 数组元素包含SystemId、BiosSettings、Boot属性 | / | 否 | 是 | SystemMgmt | 待批量配置的多主机系统列表 |
| Systems[].SystemId | string | “1” | / | 否 | 是 | SystemMgmt | 主机系统标识 |
| Systems[].BiosSettings | object | 包含Attributes子属性 | / | 否 | 是 | SystemMgmt | 待下发的BIOS设置 |
| Systems[].BiosSettings.Attributes | object | BIOS属性键值对 | / | 否 | 是 | SystemMgmt | 待下发的BIOS配置属性 |
| Systems[].Boot | object | 包含BootSourceOverrideTarget等子属性 | / | 否 | 是 | SystemMgmt | 待下发的启动配置 |
| Systems[].Boot.BootSourceOverrideTarget | string | 枚举值:None、Pxe、Floppy、Cd、Hdd、BiosSetup | / | 否 | 是 | SystemMgmt | 启动源覆盖目标 |
| Systems[].Boot.BootSourceOverrideMode | string | / | / | 否 | 是 | SystemMgmt | 启动模式 |
| Systems[].Boot.BootSourceOverrideEnabled | string | / | / | 否 | 是 | SystemMgmt | 启动源覆盖是否启用 |
Schema定义:SystemAssembly为OEM自定义资源,需提供独立Schema定义文件SystemAssembly.v1_0_0.json,该文件在格式、语法和结构上须与官方Redfish Schema文件保持一致。
Redfish返回示例:
GET /redfish/v1/Oem/openUBMC/SystemAssembly:
{
"@odata.context": "/redfish/v1/$metadata#SystemAssembly.SystemAssembly",
"@odata.id": "/redfish/v1/Oem/openUBMC/SystemAssembly",
"@odata.type": "#SystemAssembly.v1_0_0.SystemAssembly",
"Id": "SystemAssembly",
"Name": "System Assembly",
"Systems": [
{
"SystemId": "1",
"BiosSettings": {
"Attributes": {}
},
"Boot": {
"BootSourceOverrideTarget": null,
"BootSourceOverrideEnabled": null,
"BootSourceOverrideMode": null,
"BootSourceOverrideTarget@Redfish.AllowableValues": [
"None", "Pxe", "Floppy", "Cd", "Hdd", "BiosSetup"
]
},
"PowerState": "On"
}
],
"Actions": {
"#SystemAssembly.Reset": {
"target": "/redfish/v1/Oem/openUBMC/SystemAssembly/Actions/SystemAssembly.Reset",
"@Redfish.ActionInfo": "/redfish/v1/Oem/openUBMC/SystemAssembly/ResetActionInfo"
},
"#SystemAssembly.ResetBootCert": {
"target": "/redfish/v1/Oem/openUBMC/SystemAssembly/Actions/SystemAssembly.ResetBootCert",
"@Redfish.ActionInfo": "/redfish/v1/Oem/openUBMC/SystemAssembly/ResetBootCertActionInfo"
},
"#SystemAssembly.ImportBootCert": {
"target": "/redfish/v1/Oem/openUBMC/SystemAssembly/Actions/SystemAssembly.ImportBootCert",
"@Redfish.ActionInfo": "/redfish/v1/Oem/openUBMC/SystemAssembly/ImportBootCertActionInfo"
}
}
}
评审点2:新增Action SystemAssembly.Reset
资源URI:/redfish/v1/Oem/{{OemIdentifier}}/SystemAssembly/Actions/SystemAssembly.Reset
操作权限:SystemMgmt
输入参数:
| 参数名 | 类型 | 必填 | 示例/取值约束 | 描述 |
|---|---|---|---|---|
| SystemId | array | 是 | [“1”, “2”] | 待执行复位操作的主机系统标识列表 |
| ResetType | string | 是 | 枚举值:On、ForceOff、GracefulShutdown、ForceRestart、Nmi、ForcePowerCycle、PowerCycle | 复位类型 |
ActionInfo:/redfish/v1/Oem/{{OemIdentifier}}/SystemAssembly/ResetActionInfo
ActionInfo参数定义:
| 参数名 | 必填 | DataType | AllowableValues | 描述 |
|---|---|---|---|---|
| SystemId | 是 | Array | / | 主机系统标识列表 |
| ResetType | 是 | String | On、ForceOff、GracefulShutdown、ForceRestart、Nmi、ForcePowerCycle、PowerCycle | 复位类型 |
评审点3:新增Action SystemAssembly.ResetBootCert
资源URI:/redfish/v1/Oem/{{OemIdentifier}}/SystemAssembly/Actions/SystemAssembly.ResetBootCert
操作权限:SystemMgmt
输入参数:
| 参数名 | 类型 | 必填 | 示例/取值约束 | 描述 |
|---|---|---|---|---|
| SystemId | array | 是 | [“1”, “2”] | 待重置启动证书的主机系统标识列表 |
| ResetKeysType | string | 是 | 枚举值:DeleteAllKeys、ResetAllKeysToDefault | 证书重置类型 |
ActionInfo:/redfish/v1/Oem/{{OemIdentifier}}/SystemAssembly/ResetBootCertActionInfo
ActionInfo参数定义:
| 参数名 | 必填 | DataType | AllowableValues | 描述 |
|---|---|---|---|---|
| SystemId | 是 | Array | / | 主机系统标识列表 |
| ResetKeysType | 是 | String | DeleteAllKeys、ResetAllKeysToDefault | 证书重置类型 |
评审点4:新增Action SystemAssembly.ImportBootCert
资源URI:/redfish/v1/Oem/{{OemIdentifier}}/SystemAssembly/Actions/SystemAssembly.ImportBootCert
操作权限:SystemMgmt
输入参数:
| 参数名 | 类型 | 必填 | 示例/取值约束 | 描述 |
|---|---|---|---|---|
| SystemId | array | 是 | [“1”, “2”] | 待导入启动证书的主机系统标识列表 |
| CertificateString | string | 是 | PEM格式的证书内容 | 证书内容字符串 |
| CertificateType | string | 否 | 枚举值:PEM(默认值) | 证书类型,缺省时默认为PEM |
ActionInfo:/redfish/v1/Oem/{{OemIdentifier}}/SystemAssembly/ImportBootCertActionInfo
ActionInfo参数定义:
| 参数名 | 必填 | DataType | AllowableValues | 描述 |
|---|---|---|---|---|
| SystemId | 是 | Array | / | 主机系统标识列表 |
| CertificateString | 是 | String | / | 证书内容字符串 |
| CertificateType | 否 | String | PEM | 证书类型 |