恢复出厂设置
命令功能
远程恢复出厂设置。
命令格式
操作类型:POST
URL:https://device_ip/redfish/v1/Systems/Actions/RestoreDefaults.Reset
请求头:
X-Auth-Token: auth_value Content-Type: header_type
请求消息体:
{
    "ethernet": ethernet,
    "root_pwd": password
}
请求参数
| 参数名 | 是否必选 | 参数说明 | 取值 | 
|---|---|---|---|
| ethernet | 必选 | 网口设备名称。 | 字符串,例如:eth0:1。长度为0~32字符,可由小写字母(a~z)、数字(0~9)和其他字符(:)组成,且不能以冒号开头;为空则表示不保留IP恢复出厂设置。 | 
| root_pwd | 必选 | root用户密码。 | 字符串,当前系统的root用户密码。 | 
使用指南
接口已默认开发,但功能暂未完全实现,需要开发者适配恢复出厂设置命令。
使用实例
请求样例:
POST https://10.10.10.10/redfish/v1/Systems/RestoreDefaults/Reset
请求头:
X-Auth-Token: auth_value Content-Type: application/json
请求消息体:
{
    "ethernet": "eth0",
    "root_pwd": "password"
}
响应样例:
{
    "error": {
        "code": "Base.1.0.Success",
        "message": "Operation success. See ExtendedInfo for more information.",
        "@Message.ExtendedInfo": [
            {
                "@odata.type": "#MessageRegistry.v1_0_0.MessageRegistry",
                "Description": "Indicates that no error has occurred.",
                "Message": "Restore defaults system successfully.",
                "Severity": "OK",
                "NumberOfArgs": null,
                "ParamTypes": null,
                "Resolution": "None"
            }
        ]
    }
}
响应码:200
输出说明
| 字段 | 类型 | 说明 | 
|---|---|---|
| code | 字符串 | 指示消息注册表中特定消息ID的字符串。 | 
| message | 字符串 | 消息详情。 | 
| @odata.type | 字符串 | 会话资源类型。 | 
| Description | 字符串 | 详细信息。 | 
| Message | 字符串 | 返回消息。 | 
| Severity | 字符串 | 严重性,Redfish支持的严重级。 
 | 
| NumberOfArgs | 数字 | 传递的参数数量。 | 
| ParamTypes | 数组 | 传递的参数类型。 | 
| Resolution | 字符串 | 解决方案描述。 | 
父主题: 软件管理