代码仓
中
ComponentConfiguration
更新时间: 2026/09/24
在AtomGit上查看源码

ResourceDefinition ​

uris ​

  • /redfish/v1/Managers/manager_id/Oem/openUBMC/ComponentConfiguration

properties ​

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-备件更换配置资源模型的OData描述信息
@odata.idstringtrue-该接口的访问路径
@odata.typestringtrue-该接口的资源类型
Idstringtrue-该接口的ID
Namestringtrue-该接口的名称
RecoveryEnabledbooleantrue-部件配置恢复使能
Components [ {arraytrue-需要恢复的配置信息列表
Components[].Namestringtrue--
Components[].ConfigurationStatestringtrue--
Components[].Typestringtrue--
} ]
ConfigurationStatestringtrue-部件配置恢复状态:
● “Inconsistent”:配置不一致,有配置需要恢复
● “Recovering”:配置恢复中
● “Consistent”:配置一致,当前无需恢复
Typestringtrue-部件类型
Actions {objecttrue--
Actions.#ComponentConfiguration.Recover {objecttrue--
Actions.#ComponentConfiguration.Recover.targetstringtrue--
Actions.#ComponentConfiguration.Recover.@Redfish.ActionInfostringtrue--
}
}

supported_methods ​

  • GET
  • PATCH
  • POST

HTTP methods ​

GET ​

命令功能

查询备件更换配置信息。

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/Oem/openUBMC/ComponentConfiguration

请求头:

X-Auth-Token: 123456789***********************

请求消息体: 无

参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
manager_id管理资源ID● 针对机架服务器,取值为1
● 针对高密服务器,取值为BladeN(N表示节点槽位号),例如“Blade1”
● 针对刀片服务器,取值可以为BladeN(N表示计算节点槽位号)或SwiN(N表示交换模块槽位号),例如“Swi1”
● 针对X6800 V5,X6000 V5,G5500,XA320 V2服务器,取值还可以为Enc,表示计算节点所在的机框资源
● 针对设备U位信息,取值可以为UN(N表示设备U位号),例如"U1"
● 针对机柜资源,取值为Rack
auth_value执行该GET请求时,必须在“Headers”中携带“X-Auth-Token”值用于鉴权。可通过/redfish/v1/SessionService/Sessions创建会话时获得

使用指南

BMC500 5.15.0.1及以上版本支持此功能

使用实例

请求样例:

http
GET https://device_ip/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration

请求头:

X-Auth-Token: 123456789***********************

请求消息体:无

响应样例:

json
{ 
    "@odata.context": "/redfish/v1/$metadata#openUBMCComponentConfiguration.openUBMCComponentConfiguration", 
    "@odata.id": "/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration", 
    "@odata.type": "#openUBMCComponentConfiguration.v1_0_0.openUBMCComponentConfiguration", 
    "Id": "1", 
    "Name": "Component Configuration Settings", 
    "RecoveryEnabled": true, 
    "Components": [ 
        { 
            "Name": "BIOS1", 
            "ConfigurationState": "Inconsistent", 
            "Type": "BIOS" 
        }, 
        { 
            "Name": "BIOS2", 
            "ConfigurationState": "Consistent", 
            "Type": "BIOS" 
        }, 
        { 
            "Name": "NIC 1 (SF221Q)", 
            "ConfigurationState": "Recovering", 
            "Type": "NetworkAdapter" 
        } 
    ], 
    "Actions": { 
        "#ComponentConfiguration.Recover": { 
            "target": "/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration/Actions/ComponentConfiguration.Recover", 
            "@Redfish.ActionInfo": "/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration/RecoverActionInfo" 
        } 
    } 
}

响应码:200

PATCH ​

命令功能

查询备件更换配置信息。

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/Oem/openUBMC/ComponentConfiguration

请求头:

X-Auth-Token: 123456789***********************
If-Match: ifmatch_value

请求消息体:

json
{ 
    "RecoveryEnabled": enable 
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
manager_id管理资源ID● 针对机架服务器,取值为1
● 针对高密服务器,取值为BladeN(N表示节点槽位号),例如“Blade1”
● 针对刀片服务器,取值可以为BladeN(N表示计算节点槽位号)或SwiN(N表示交换模块槽位号),例如“Swi1”
● 针对X6800 V5,X6000 V5,G5500,XA320 V2服务器,取值还可以为Enc,表示计算节点所在的机框资源
● 针对设备U位信息,取值可以为UN(N表示设备U位号),例如"U1"
● 针对机柜资源,取值为Rack
auth_value执行该GET请求时,必须在“Headers”中携带“X-Auth-Token”值用于鉴权。可通过/redfish/v1/SessionService/Sessions创建会话时获得
ifmatch_value请求消息的匹配参数可通过对相应资源发起GET操作,从响应头中获取(对应于“ETag”参数)
enable备件更换配置恢复使能true或false

使用指南

BMC500 5.15.0.1及以上版本支持此功能

使用实例

请求样例:

http
PATCH https://device_ip/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration

请求头:

X-Auth-Token: 123456789***********************

请求消息体:

{ 
    "RecoveryEnabled": true 
}

响应样例:

json
{ 
    "@odata.context": "/redfish/v1/$metadata#openUBMCComponentConfiguration.openUBMCComponentConfiguration", 
    "@odata.id": "/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration", 
    "@odata.type": "#openUBMCComponentConfiguration.v1_0_0.openUBMCComponentConfiguration", 
    "Id": "1", 
    "Name": "Component Configuration Settings", 
    "RecoveryEnabled": true, 
    "Components": [ 
        { 
            "Name": "BIOS1", 
            "ConfigurationState": "Inconsistent", 
            "Type": "BIOS" 
        }, 
        { 
            "Name": "BIOS2", 
            "ConfigurationState": "Consistent", 
            "Type": "BIOS" 
        }, 
        { 
            "Name": "NIC 1 (SF221Q)", 
            "ConfigurationState": "Recovering", 
            "Type": "NetworkAdapter" 
        } 
    ], 
    "Actions": { 
        "#ComponentConfiguration.Recover": { 
            "target": "/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration/Actions/ComponentConfiguration.Recover", 
            "@Redfish.ActionInfo": "/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration/RecoverActionInfo" 
        } 
    } 
}

响应码:200

POST (ACTION) ​

Recover ​

命令功能

执行备件更换恢复任务。

命令格式

URL: https://device_ip/redfish/v1/Managers/manager_id/Oem/openUBMC/ComponentConfiguration/Actions/ComponentConfiguration.Recover

请求头:

X-Auth-Token: 123456789***********************

请求消息体:

json
{ 
    "Components":["component_name","component_name"] 
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
manager_id管理资源ID● 针对机架服务器,取值为1
● 针对高密服务器,取值为BladeN(N表示节点槽位号),例如“Blade1”
● 针对刀片服务器,取值可以为BladeN(N表示计算节点槽位号)或SwiN(N表示交换模块槽位号),例如“Swi1”
● 针对X6800 V5,X6000 V5,G5500,XA320 V2服务器,取值还可以为Enc,表示计算节点所在的机框资源
● 针对设备U位信息,取值可以为UN(N表示设备U位号),例如"U1"
● 针对机柜资源,取值为Rack
component_name部件名字符串

使用指南

BMC500 5.15.0.1及以上版本支持此功能

使用实例

请求样例:

http
POST https://device_ip/redfish/v1/Managers/1/Oem/openUBMC/ComponentConfiguration/Actions/ComponentConfiguration.Recover

请求头:

X-Auth-Token: 123456789***********************

请求消息体:

{ 
    "Components":["BIOS1","BIOS2"] 
}

响应样例:

json
{ 
    "@odata.context": "/redfish/v1/$metadata#Task.Task", 
    "@odata.type": "#Task.v1_7_4.Task", 
    "@odata.id": "/redfish/v1/TaskService/Tasks/1", 
    "Id": "1", 
    "Name": "recover_component_config", 
    "Description": "", 
    "TaskState": "Running", 
    "TaskStatus": "OK", 
    "StartTime": "2026-08-20T03:03:58+00:00", 
    "Messages": [], 
    "PercentComplete": null, 
    "Oem": { 
        "openUBMC": { 
            "TaskPercentage": null 
        } 
    } 
}

响应码:202