George Keishing | e7e9171 | 2021-09-03 11:28:44 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 2 | |
| 3 | r""" |
| 4 | IPMI REST FRU field mapping: |
| 5 | - Define IPMI-REST FRU data fields mapping for different components. |
| 6 | e.g. board_mfg field in IPMI is mapped to Manufacturer field in REST. |
| 7 | """ |
| 8 | |
| 9 | # TODO: Disabling board_mfg FRU field as logic needs to be added to test it. |
| 10 | ipmi_rest_fru_field_map = { |
| 11 | "cpu": { |
| 12 | # "board_mfg_date": "BuildDate", |
| 13 | "board_mfg": "Manufacturer", |
| 14 | "board_product": "PrettyName", |
| 15 | "board_serial": "SerialNumber", |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 16 | "board_part_number": "PartNumber", |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 17 | }, |
| 18 | "system": { |
| 19 | "chassis_part_number": "Model", |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 20 | "chassis_serial": "SerialNumber", |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 21 | }, |
| 22 | "motherboard": { |
| 23 | "board_mfg": "Manufacturer", |
| 24 | "board_product": "PrettyName", |
| 25 | "board_serial": "SerialNumber", |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 26 | "board_part_number": "PartNumber", |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 27 | }, |
| 28 | "dimm": { |
| 29 | "product_manufacturer": "Manufacturer", |
| 30 | "product_name": "PrettyName", |
| 31 | "product_part_number": "Model", |
| 32 | "product_version": "Version", |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 33 | "product_serial": "SerialNumber", |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 34 | }, |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 35 | "fan": {"product_name": "PrettyName"}, |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 36 | "bmc": { |
| 37 | # "board_mfg_date": "BuildDate", |
| 38 | "board_mfg": "Manufacturer", |
| 39 | "board_product": "PrettyName", |
| 40 | "board_serial": "SerialNumber", |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 41 | "board_part_number": "PartNumber", |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 42 | }, |
| 43 | "powersupply": { |
| 44 | # "board_mfg_date": "BuildDate", |
| 45 | "board_product": "PrettyName", |
| 46 | "board_serial": "SerialNumber", |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 47 | "board_part_number": "PartNumber", |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 48 | }, |
| 49 | "gv100card": { |
| 50 | # "board_mfg_date": "BuildDate", |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 51 | }, |
Rahul Maheshwari | 35aa8d5 | 2018-03-11 23:56:51 -0500 | [diff] [blame] | 52 | } |