当前位置: 首页 > 工具软件 > RedFish > 使用案例 >

Redfish协议测试工具–Postman

戈巴英
2023-12-01

  1. 1. 工具和资料获取
  2. 2. 简单使用说明
    1. 1. GET类举例
    2. 2. PATCH类举例
  3. 3. 常见命令

§ 1. 工具和资料获取

Postman工具获取

服务器Redfish接口说明文档

使用前必读接口文档中“适用的产品”,查看自己的服务器是否支持此协议。

§ 2. 简单使用说明

§ 1. GET类举例

查看系统信息: SystemOverview

查看文档:

实操:

§ 2. PATCH类举例

首先获取指定用户信息:

查看文档:

要有Etag:获取方式是通过GET得到返回的响应头中找。

根据文档修改:


修改成功:

其他样例请查看文档。

§ 3. 常见命令

 

1

2

3

1.获取系统信息

4

白牌: GET https://150.1.24.109/redfish/v1/SystemInfo

5

华为:

6

1) 主机名称

7

https://150.1.24.109/redfish/v1/SystemOverview

8

https://150.1.24.109/redfish/v1/Managers/1

9

2) 主机BMC管理地址

10

https://150.1.24.109/redfish/v1/Chassis/1/Drives/HDDPlaneDisk0

11

3) 本地存储信息

12

https://150.1.24.109/redfish/v1/Storages/RAIDStorage0

13

4) 服务器电源信息

14

https://150.1.24.109/redfish/v1/Chassis/1/Power

15

5) 服务器风扇信息

16

https://150.1.24.109/redfish/v1/Chassis/1/Thermal

17

6) 服务器资产信息

18

https://150.1.24.109/redfish/v1/Systems/1

19

20

2.获取所有BMC用户信息

21

白牌:GET https://150.1.24.109/redfish/v1/AccountService/AccountsInfo

22

华为:GET https://150.1.24.109/redfish/v1/AccountService/Accounts

23

24

3.添加BMC用户

25

POST https://150.1.24.109/redfish/v1/AccountService/AccountsInfo

26

POST https://150.1.24.109/redfish/v1/AccountService/Accounts

27

28

4.获取单个BMC用户信息

29

白牌:GET https://150.1.24.109/redfish/v1/AccountService/AccountsInfo/4

30

华为:GET https://150.1.24.109/redfish/v1/AccountService/Accounts/4

31

32

5.修改BMC用户信息

33

白牌:PATCH https://150.1.24.109/redfish/v1/AccountService/AccountsInfo/4

34

华为:PATCH https://150.1.24.109/redfish/v1/AccountService/Accounts/4

35

36

6.删除BMC用户

37

白牌: DELETE https://150.1.24.109/redfish/v1/AccountService/AccountsInfo/4

38

华为: DELETE https://150.1.24.109/redfish/v1/AccountService/Accounts/4

39

40

7.查询BMC地址

41

白牌:GET https://150.1.24.109/redfish/v1/Managers/1/NICsInfo/DedicatedPort1

42

华为:GET https://150.1.24.109/redfish/v1/Managers/1/NICs/DedicatedPort1

43

44

8.修改BMC ip地址

45

白牌:PATCH https://150.1.24.109/redfish/v1/Managers/1/NICsInfo/DedicatedPort1

46

华为:PATCH https://150.1.24.109/redfish/v1/Managers/1/NICs/DedicatedPort1

47

48

9.查询启动顺序

49

白牌:GET https://150.1.24.109/redfish/v1/Systems/1/Bios/SettingsInfo

50

华为:GET https://150.1.24.109/redfish/v1/Systems/1/Bios/Settings

51

52

10.修改启动顺序

53

白牌:PATCH https://150.1.24.109/redfish/v1/Systems/1/Bios/SettingsInfo

54

华为:PATCH https://150.1.24.109/redfish/v1/Systems/1/Bios/Settings

55

 类似资料: