Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation This testsuite is for testing the Boot Device Functions |
| 4 | |
| 5 | Resource ../lib/rest_client.robot |
| 6 | Resource ../lib/ipmi_client.robot |
| 7 | |
| 8 | Suite Setup Open Connection And Log In |
| 9 | Suite Teardown Close All Connections |
| 10 | |
| 11 | *** Test Cases *** |
| 12 | |
| 13 | Set the Boot Device as Default using REST API |
| 14 | [Documentation] This testcase is to set the boot device as Default using REST |
| 15 | ... URI. The Boot device is read using REST API and ipmitool. |
| 16 | |
| 17 | ${bootDevice} = Set Variable Default |
| 18 | ${valueDict} = create dictionary data=${bootDevice} |
| 19 | Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict} |
| 20 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 21 | Response Should Be Equal Default |
| 22 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 23 | Should Contain ${output} No override |
| 24 | |
| 25 | Set the Boot Device as Default using ipmitool |
| 26 | [Documentation] This testcase is to set the boot device as Default using |
| 27 | ... ipmitool. The Boot device is read using REST API and |
| 28 | ... ipmitool. |
| 29 | |
| 30 | Run IPMI command 0x0 0x8 0x05 0x80 0x00 0x00 0x00 0x00 |
| 31 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 32 | Response Should Be Equal Default |
| 33 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 34 | Should Contain ${output} No override |
| 35 | |
| 36 | Set the Boot Device as Network using REST API |
| 37 | [Documentation] This testcase is to set the boot device as Network using REST |
| 38 | ... URI. The Boot device is read using REST API and ipmitool. |
| 39 | |
| 40 | ${bootDevice} = Set Variable Network |
| 41 | ${valueDict} = create dictionary data=${bootDevice} |
| 42 | Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict} |
| 43 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 44 | Response Should Be Equal Network |
| 45 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 46 | Should Contain ${output} Force PXE |
| 47 | |
| 48 | Set the Boot Device as Network using ipmitool |
| 49 | [Documentation] This testcase is to set the boot device as Network using |
| 50 | ... ipmitool. The Boot device is read using REST API and |
| 51 | ... ipmitool. |
| 52 | |
| 53 | Run IPMI command 0x0 0x8 0x05 0x80 0x04 0x00 0x00 0x00 |
| 54 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 55 | Response Should Be Equal Network |
| 56 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 57 | Should Contain ${output} Force PXE |
| 58 | |
| 59 | Set the Boot Device as Disk using REST API |
| 60 | [Documentation] This testcase is to set the boot device as Disk using REST |
| 61 | ... URI. The Boot device is read using REST API and ipmitool. |
| 62 | |
| 63 | ${bootDevice} = Set Variable Disk |
| 64 | ${valueDict} = create dictionary data=${bootDevice} |
| 65 | Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict} |
| 66 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 67 | Response Should Be Equal Disk |
| 68 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 69 | Should Contain ${output} Force Boot from default Hard-Drive |
| 70 | |
| 71 | Set the Boot Device as Disk using ipmitool |
| 72 | [Documentation] This testcase is to set the boot device as Disk using |
| 73 | ... ipmitool. The Boot device is read using REST API and |
| 74 | ... ipmitool. |
| 75 | |
| 76 | Run IPMI command 0x0 0x8 0x05 0x80 0x08 0x00 0x00 0x00 |
| 77 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 78 | Response Should Be Equal Disk |
| 79 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 80 | Should Contain ${output} Force Boot from default Hard-Drive |
| 81 | |
| 82 | Set the Boot Device as Safe using REST API |
| 83 | [Documentation] This testcase is to set the boot device as Safe using REST |
| 84 | ... URI. The Boot device is read using REST API and ipmitool. |
| 85 | |
| 86 | ${bootDevice} = Set Variable Safe |
| 87 | ${valueDict} = create dictionary data=${bootDevice} |
| 88 | Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict} |
| 89 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 90 | Response Should Be Equal Safe |
| 91 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 92 | Should Contain ${output} Force Boot from default Hard-Drive, request Safe-Mode |
| 93 | |
| 94 | Set the Boot Device as Safe using ipmitool |
| 95 | [Documentation] This testcase is to set the boot device as Safe using |
| 96 | ... ipmitool. The Boot device is read using REST API and |
| 97 | ... ipmitool. |
| 98 | |
| 99 | Run IPMI command 0x0 0x8 0x05 0x80 0x0C 0x00 0x00 0x00 |
| 100 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 101 | Response Should Be Equal Safe |
| 102 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 103 | Should Contain ${output} Force Boot from default Hard-Drive, request Safe-Mode |
| 104 | |
| 105 | Set the Boot Device as CDROM using REST API |
| 106 | [Documentation] This testcase is to set the boot device as CDROM using REST |
| 107 | ... URI. The Boot device is read using REST API and ipmitool. |
| 108 | |
| 109 | ${bootDevice} = Set Variable CDROM |
| 110 | ${valueDict} = create dictionary data=${bootDevice} |
| 111 | Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict} |
| 112 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 113 | Response Should Be Equal CDROM |
| 114 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 115 | Should Contain ${output} Force Boot from CD/DVD |
| 116 | |
| 117 | Set the Boot Device as CDROM using ipmitool |
| 118 | [Documentation] This testcase is to set the boot device as CDROM using |
| 119 | ... ipmitool. The Boot device is read using REST API and |
| 120 | ... ipmitool. |
| 121 | |
| 122 | Run IPMI command 0x0 0x8 0x05 0x80 0x14 0x00 0x00 0x00 |
| 123 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 124 | Response Should Be Equal CDROM |
| 125 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 126 | Should Contain ${output} Force Boot from CD/DVD |
| 127 | |
| 128 | Set the Boot Device as Setup using REST API |
| 129 | [Documentation] This testcase is to set the boot device as Setup using REST |
| 130 | ... URI. The Boot device is read using REST API and ipmitool. |
| 131 | |
| 132 | ${bootDevice} = Set Variable Setup |
| 133 | ${valueDict} = create dictionary data=${bootDevice} |
| 134 | Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict} |
| 135 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 136 | Response Should Be Equal Setup |
| 137 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 138 | Should Contain ${output} Force Boot into BIOS Setup |
| 139 | |
| 140 | Set the Boot Device as Setup using ipmitool |
| 141 | [Documentation] This testcase is to set the boot device as Setup using |
| 142 | ... ipmitool. The Boot device is read using REST API and |
| 143 | ... ipmitool. |
| 144 | |
| 145 | Run IPMI command 0x0 0x8 0x05 0x80 0x18 0x00 0x00 0x00 |
| 146 | Read the Attribute /org/openbmc/settings/host0 boot_flags |
| 147 | Response Should Be Equal Setup |
| 148 | ${output} = Run IPMI Standard command chassis bootparam get 5 |
| 149 | Should Contain ${output} Force Boot into BIOS Setup |
| 150 | |
| 151 | *** Keywords *** |
| 152 | |
| 153 | Response Should Be Equal |
| 154 | [arguments] ${args} |
| 155 | Should Be Equal ${OUTPUT} ${args} |
| 156 | |
| 157 | Read the Attribute |
| 158 | [arguments] ${uri} ${parm} |
| 159 | ${output} = Read Attribute ${uri} ${parm} |
| 160 | set test variable ${OUTPUT} ${output} |
| 161 | |