§ 1. 工具和资料获取
使用前必读接口文档中“适用的产品”,查看自己的服务器是否支持此协议。
§ 2. 简单使用说明
§ 1. GET类举例
查看系统信息: SystemOverview
查看文档:
实操:
§ 2. PATCH类举例
首先获取指定用户信息:
查看文档:
要有Etag:获取方式是通过GET得到返回的响应头中找。
根据文档修改:
修改成功:
其他样例请查看文档。
§ 3. 常见命令
| |
| |
| 1.获取系统信息 |
| 白牌: GET https://150.1.24.109/redfish/v1/SystemInfo |
| 华为: |
| 1) 主机名称 |
| https://150.1.24.109/redfish/v1/SystemOverview |
| https://150.1.24.109/redfish/v1/Managers/1 |
| 2) 主机BMC管理地址 |
| https://150.1.24.109/redfish/v1/Chassis/1/Drives/HDDPlaneDisk0 |
| 3) 本地存储信息 |
| https://150.1.24.109/redfish/v1/Storages/RAIDStorage0 |
| 4) 服务器电源信息 |
| https://150.1.24.109/redfish/v1/Chassis/1/Power |
| 5) 服务器风扇信息 |
| https://150.1.24.109/redfish/v1/Chassis/1/Thermal |
| 6) 服务器资产信息 |
| https://150.1.24.109/redfish/v1/Systems/1 |
| |
| 2.获取所有BMC用户信息 |
| 白牌:GET https://150.1.24.109/redfish/v1/AccountService/AccountsInfo |
| 华为:GET https://150.1.24.109/redfish/v1/AccountService/Accounts |
| |
| 3.添加BMC用户 |
| POST https://150.1.24.109/redfish/v1/AccountService/AccountsInfo |
| POST https://150.1.24.109/redfish/v1/AccountService/Accounts |
| |
| 4.获取单个BMC用户信息 |
| 白牌:GET https://150.1.24.109/redfish/v1/AccountService/AccountsInfo/4 |
| 华为:GET https://150.1.24.109/redfish/v1/AccountService/Accounts/4 |
| |
| 5.修改BMC用户信息 |
| 白牌:PATCH https://150.1.24.109/redfish/v1/AccountService/AccountsInfo/4 |
| 华为:PATCH https://150.1.24.109/redfish/v1/AccountService/Accounts/4 |
| |
| 6.删除BMC用户 |
| 白牌: DELETE https://150.1.24.109/redfish/v1/AccountService/AccountsInfo/4 |
| 华为: DELETE https://150.1.24.109/redfish/v1/AccountService/Accounts/4 |
| |
| 7.查询BMC地址 |
| 白牌:GET https://150.1.24.109/redfish/v1/Managers/1/NICsInfo/DedicatedPort1 |
| 华为:GET https://150.1.24.109/redfish/v1/Managers/1/NICs/DedicatedPort1 |
| |
| 8.修改BMC ip地址 |
| 白牌:PATCH https://150.1.24.109/redfish/v1/Managers/1/NICsInfo/DedicatedPort1 |
| 华为:PATCH https://150.1.24.109/redfish/v1/Managers/1/NICs/DedicatedPort1 |
| |
| 9.查询启动顺序 |
| 白牌:GET https://150.1.24.109/redfish/v1/Systems/1/Bios/SettingsInfo |
| 华为:GET https://150.1.24.109/redfish/v1/Systems/1/Bios/Settings |
| |
| 10.修改启动顺序 |
| 白牌:PATCH https://150.1.24.109/redfish/v1/Systems/1/Bios/SettingsInfo |
| 华为:PATCH https://150.1.24.109/redfish/v1/Systems/1/Bios/Settings |
|