| George Keishing | d2795d6 | 2018-02-04 23:12:23 -0600 | [diff] [blame] | 1 | #!/usr/bin/env python | 
|  | 2 |  | 
|  | 3 | r""" | 
| George Keishing | dcf746b | 2018-02-06 12:43:44 -0600 | [diff] [blame] | 4 | IPMI raw commands table: | 
| George Keishing | d2795d6 | 2018-02-04 23:12:23 -0600 | [diff] [blame] | 5 |  | 
|  | 6 | - Define IPMI interface index, commands and expected output. | 
|  | 7 |  | 
|  | 8 | """ | 
|  | 9 |  | 
| George Keishing | 39967eb | 2018-04-30 11:36:23 -0500 | [diff] [blame] | 10 | # The currently supported cipher level list. | 
| Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 11 | # Refer: | 
|  | 12 | # openbmc/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipe | 
|  | 13 | # s-phosphor/ipmi/phosphor-ipmi-host/cipher_list.json | 
| George Keishing | 39967eb | 2018-04-30 11:36:23 -0500 | [diff] [blame] | 14 | valid_cipher_list = [1, 2, 3, 15, 16, 17] | 
|  | 15 |  | 
| George Keishing | d2795d6 | 2018-02-04 23:12:23 -0600 | [diff] [blame] | 16 | IPMI_RAW_CMD = { | 
|  | 17 | # Interface name | 
|  | 18 | 'power_supply_redundancy': | 
|  | 19 | { | 
|  | 20 | # Command action type | 
|  | 21 | 'Get': | 
|  | 22 | [ | 
|  | 23 | # raw command, expected output(s), comment | 
|  | 24 | "0x04 0x2d 0x0b", | 
|  | 25 | "00 00 01 00", | 
|  | 26 | "Byte position 3rd LSB e.g. 01 indicates disabled", | 
|  | 27 | "00 00 02 00", | 
|  | 28 | "Byte position 3rd LSB e.g. 02 indicates enabled", | 
|  | 29 | ], | 
|  | 30 | 'Enabled': | 
|  | 31 | [ | 
|  | 32 | # raw command, expected output, comment | 
|  | 33 | "0x04 0x30 0x0b 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00", | 
|  | 34 | "none", | 
|  | 35 | "Enabled nibble position 6th LSB e.g. 0x2", | 
|  | 36 | ], | 
|  | 37 | 'Disabled': | 
|  | 38 | [ | 
|  | 39 | # raw command, expected output, comment | 
|  | 40 | "0x04 0x30 0x0b 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00", | 
|  | 41 | "none", | 
|  | 42 | "Enabled nibble position 6th LSB e.g. 0x1", | 
|  | 43 | ], | 
| Rahul Maheshwari | abe13af | 2018-02-15 22:42:08 -0600 | [diff] [blame] | 44 | }, | 
|  | 45 | 'power_reading': | 
|  | 46 | { | 
|  | 47 | 'Get': | 
|  | 48 | [ | 
|  | 49 | # raw command, expected output(s), comment | 
|  | 50 | "0x2c 0x02 0xdc 0x01 0x01 0x00", | 
|  | 51 | "dc d5 00 d5 00 d5 00 d5 00 00 00 00 00 00 00 00 00 00", | 
|  | 52 | "Byte position 2nd LSB e.g. d5 Instantaneous power readings", | 
|  | 53 | ], | 
| Rahul Maheshwari | 0eb33f0 | 2018-04-10 02:31:54 -0500 | [diff] [blame] | 54 | }, | 
|  | 55 | 'conf_param': | 
|  | 56 | { | 
|  | 57 | 'Enabled': | 
|  | 58 | [ | 
|  | 59 | # raw command, expected output, comment | 
|  | 60 | "0x2c 0x12 0xdc 0x02 0x00 0x01", | 
|  | 61 | "dc", | 
|  | 62 | "Enabled nibble position 6th LSB e.g. 0x01", | 
|  | 63 | ], | 
|  | 64 | 'Disabled': | 
|  | 65 | [ | 
|  | 66 | # raw command, expected output, comment | 
|  | 67 | "0x2c 0x12 0xdc 0x02 0x00 0x00", | 
|  | 68 | "dc", | 
|  | 69 | "Disable nibble position 6th LSB e.g. 0x00", | 
|  | 70 | ] | 
| George Keishing | d2795d6 | 2018-02-04 23:12:23 -0600 | [diff] [blame] | 71 | } | 
|  | 72 | } |