Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 3 | Documentation Test Save Area feature of Management Console on BMC. |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 4 | |
| 5 | Resource ../../lib/rest_client.robot |
| 6 | Resource ../../lib/openbmc_ffdc.robot |
| 7 | Resource ../../lib/resource.robot |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 8 | Resource ../../lib/bmc_redfish_utils.robot |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 9 | Resource ../../lib/utils.robot |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 10 | Resource ../../lib/bmc_redfish_resource.robot |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 11 | |
Vijay | 3937315 | 2020-02-14 08:08:20 -0600 | [diff] [blame] | 12 | Suite Setup Suite Setup Execution |
| 13 | Test Teardown Test Teardown Execution |
| 14 | Suite Teardown Suite Teardown Execution |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 15 | |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 16 | *** Variables *** |
| 17 | |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 18 | ${MAXIMUM_FILE_SIZE_MESSAGE} File size exceeds maximum allowed size[10MB] |
| 19 | ${MAXIMUM_DIR_SIZE_MESSAGE} |
| 20 | ... File size does not fit in the savearea directory maximum allowed size[10MB] |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 21 | ${FILE_UPLOAD_MESSAGE} File Created |
| 22 | ${FILE_DELETED_MESSAGE} File Deleted |
| 23 | ${FILE_UPDATED_MESSAGE} File Updated |
| 24 | ${FORBIDDEN_MESSAGE} Forbidden |
| 25 | ${ERROR_MESSAGE} Error while creating the file |
| 26 | ${RESOURCE_NOT_FOUND_MESSAGE} Resource Not Found |
| 27 | ${MINIMUM_FILE_SIZE_MESSAGE} File size is less than minimum allowed size[100B] |
| 28 | ${MAXIMUM_FILE_NAME_MESSAGE} Filename must be maximum 20 characters |
| 29 | ${UNSUPPORTED_FILE_NAME_MESSAGE} Unsupported character in filename |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 30 | |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 31 | ${content-1} Sample Content to test partition file upload |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 32 | ... Sample Content to test partition file upload |
| 33 | ... Sample Content to test partition file upload |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 34 | ${content-2} Sample Content to test partition file upload after reboot |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 35 | ... Sample Content to test partition file upload after reboot |
| 36 | ... Sample Content to test partition file upload after reboot |
| 37 | |
Sushil Singh | 44b8cf3 | 2021-11-17 06:57:09 -0600 | [diff] [blame^] | 38 | ${LOOP_COUNT} 10 |
| 39 | |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 40 | *** Test Cases *** |
| 41 | |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 42 | Redfish Upload Lower Limit Partition File To BMC |
| 43 | [Documentation] Upload lower limit of allowed partition file to BMC using Redfish. |
| 44 | [Tags] Redfish_Upload_Lower_Limit_Partition_File_To_BMC |
| 45 | [Template] Redfish Upload Partition File |
| 46 | |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 47 | # file_name |
| 48 | 100-file |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 49 | |
| 50 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 51 | Redfish Upload Partition File To BMC |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 52 | [Documentation] Upload partition file to BMC using Redfish. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 53 | [Tags] Redfish_Upload_Partition_File_To_BMC |
| 54 | [Template] Redfish Upload Partition File |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 55 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 56 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 57 | 500KB-file |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 58 | 501KB-file |
| 59 | 550KB-file |
| 60 | 10000KB-file |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 61 | |
| 62 | |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 63 | Test Upload Lower Limit Partition File To BMC And Expect Failure |
| 64 | [Documentation] Fail to upload partition file to BMC with file size |
| 65 | ... below the lower limit of allowed partition file size using Redfish. |
| 66 | [Tags] Test_Upload_Lower_Limit_Partition_File_To_BMC_And_Expect_Failure |
| 67 | [Template] Redfish Fail To Upload Partition File |
| 68 | |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 69 | # file_name status_code partition_status response_message |
| 70 | 99-file ${HTTP_BAD_REQUEST} 0 ${MINIMUM_FILE_SIZE_MESSAGE} |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 71 | |
| 72 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 73 | Redfish Fail To Upload Partition File To BMC |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 74 | [Documentation] Fail to upload partition file to BMC using Redfish. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 75 | [Tags] Redfish_Fail_To_Upload_Partition_File_To_BMC |
| 76 | [Template] Redfish Fail To Upload Partition File |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 77 | |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 78 | # file_name status_code partition_status response_message |
| 79 | 10001KB-file ${HTTP_BAD_REQUEST} 0 ${MAXIMUM_FILE_SIZE_MESSAGE} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 80 | |
| 81 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 82 | Redfish Upload Multiple Partition File To BMC |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 83 | [Documentation] Upload multiple partition file to BMC using Redfish. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 84 | [Tags] Redfish_Upload_Multiple_Partition_File_To_BMC |
| 85 | [Template] Redfish Upload Partition File |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 86 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 87 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 88 | 250KB-file,500KB-file |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 89 | |
| 90 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 91 | Redfish Fail To Upload Multiple Partition File To BMC |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 92 | [Documentation] Fail to upload multiple partition file to BMC using Redfish. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 93 | [Tags] Redfish_Fail_To_Upload_Multiple_Partition_File_To_BMC |
| 94 | [Template] Redfish Fail To Upload Partition File |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 95 | |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 96 | # file_name status_code partition_status response_message |
| 97 | 5000KB-file ${HTTP_OK} 1 ${FILE_UPLOAD_MESSAGE} |
| 98 | 6000KB-file ${HTTP_BAD_REQUEST} 0 ${MAXIMUM_DIR_SIZE_MESSAGE} |
| 99 | 10000KB-file ${HTTP_OK} 1 ${FILE_UPLOAD_MESSAGE} |
| 100 | 100-file ${HTTP_BAD_REQUEST} 0 ${MAXIMUM_DIR_SIZE_MESSAGE} |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 101 | |
| 102 | |
Sushil Singh | df6ba52 | 2020-11-24 04:17:00 -0600 | [diff] [blame] | 103 | Redfish Upload Same Partition File To BMC In Loop |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 104 | [Documentation] Upload same partition file to BMC using Redfish in loop. |
Sushil Singh | df6ba52 | 2020-11-24 04:17:00 -0600 | [diff] [blame] | 105 | [Tags] Redfish_Upload_Same_Partition_File_To_BMC_In_Loop |
| 106 | [Template] Redfish Upload Partition File In Loop |
| 107 | |
| 108 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 109 | 500KB-file |
Sushil Singh | df6ba52 | 2020-11-24 04:17:00 -0600 | [diff] [blame] | 110 | |
| 111 | |
Sushil Singh | f39629c | 2020-12-11 07:30:21 -0600 | [diff] [blame] | 112 | Redfish Upload And Delete Same Partition File To BMC In Loop |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 113 | [Documentation] Upload same partition file to BMC using Redfish in loop. |
Sushil Singh | f39629c | 2020-12-11 07:30:21 -0600 | [diff] [blame] | 114 | [Tags] Redfish_Upload_And_Delete_Same_Partition_File_To_BMC_In_Loop |
| 115 | [Template] Redfish Upload And Delete Partition File In Loop |
| 116 | |
| 117 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 118 | 500KB-file |
Sushil Singh | f39629c | 2020-12-11 07:30:21 -0600 | [diff] [blame] | 119 | |
| 120 | |
Sushil Singh | 5d0782f | 2020-11-23 06:35:35 -0600 | [diff] [blame] | 121 | Redfish Partition File Upload Post BMC Reboot |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 122 | [Documentation] Upload partition file to BMC using Redfish, after the BMC reboot. |
Sushil Singh | 5d0782f | 2020-11-23 06:35:35 -0600 | [diff] [blame] | 123 | [Tags] Redfish_Partition_File_Upload_Post_BMC_Reboot |
| 124 | [Template] Verify Partition File Upload Post BMC Reboot |
| 125 | |
| 126 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 127 | 500KB-file |
Sushil Singh | 5d0782f | 2020-11-23 06:35:35 -0600 | [diff] [blame] | 128 | |
| 129 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 130 | Redfish Partition File Persistency On BMC Reboot |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 131 | [Documentation] Upload partition file to BMC using Redfish and is same after reboot. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 132 | [Tags] Redfish_Partition_File_Persistency_On_BMC_Reboot |
| 133 | [Template] Redfish Partition File Persistency |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 134 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 135 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 136 | 500KB-file |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 137 | |
| 138 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 139 | Redfish Multiple Partition File Persistency On BMC Reboot |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 140 | [Documentation] Upload multiple partition file to BMC using Redfish and is same after reboot. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 141 | [Tags] Redfish_Multiple_Partition_File_Persistency_On_BMC_Reboot |
| 142 | [Template] Redfish Partition File Persistency |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 143 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 144 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 145 | 250KB-file,500KB-file |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 146 | |
| 147 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 148 | Redfish Read Partition File On BMC |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 149 | [Documentation] Upload partition file to BMC using Redfish and verify the content. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 150 | [Tags] Redfish_Read_Partition_File_On_BMC |
| 151 | [Template] Redfish Read Partition File |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 152 | |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 153 | # file_name reboot_flag |
| 154 | testfile01-file False |
| 155 | testfile01-file,testfile02-file False |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 156 | |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 157 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 158 | Redfish Read Partition File On BMC Reboot |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 159 | [Documentation] Upload partition file to BMC using Redfish and verify the content after reboot. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 160 | [Tags] Check_Redfish_Read_Partition_File_On_BMC_Reboot |
| 161 | [Template] Redfish Read Partition File |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 162 | |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 163 | # file_name reboot_flag |
| 164 | testfile01-file True |
| 165 | testfile01-file,testfile02-file True |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 166 | |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 167 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 168 | Redfish Update Partition File On BMC |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 169 | [Documentation] Upload partition file to BMC using Redfish and verify the content. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 170 | [Tags] Redfish_Update_Partition_File_On_BMC |
| 171 | [Template] Redfish Update Partition File With Different Content |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 172 | |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 173 | # file_name reboot_flag |
| 174 | testfile01-file False |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 175 | |
| 176 | |
| 177 | Redfish Update Partition File On BMC Reboot |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 178 | [Documentation] Upload partition file to BMC using Redfish and verify the content after the reboot. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 179 | [Tags] Redfish_Update_Partition_File_On_BMC_Reboot |
| 180 | [Template] Redfish Update Partition File With Different Content |
| 181 | |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 182 | # file_name reboot_flag |
| 183 | testfile01-file True |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 184 | |
| 185 | |
| 186 | Redfish Persistency Update Partition File On BMC |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 187 | [Documentation] Upload partition file to BMC using Redfish and verify the content. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 188 | [Tags] Redfish_Persistency_Update_Partition_File_On_BMC |
| 189 | [Template] Redfish Update Partition File With Same Content |
| 190 | |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 191 | # file_name reboot_flag |
| 192 | testfile01-file False |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 193 | |
| 194 | |
| 195 | Redfish Persistency Update Partition File On BMC Reboot |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 196 | [Documentation] Upload partition file to BMC using Redfish and verify the content after the reboot. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 197 | [Tags] Redfish_Persistency_Update_Partition_File_On_BMC_Reboot |
| 198 | [Template] Redfish Update Partition File With Same Content |
| 199 | |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 200 | # file_name reboot_flag |
| 201 | testfile01-file True |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 202 | |
| 203 | |
| 204 | Redfish Delete Non Existence Of Partition File |
| 205 | [Documentation] Delete the partition file if do not exists. |
| 206 | [Tags] Redfish_Delete_Non_Existence_Of_Partition_File |
| 207 | [Template] Redfish Delete Non Existence Partition File |
| 208 | |
| 209 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 210 | testfile01-file |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 211 | |
| 212 | |
| 213 | Verify One Thousand Partitions File Upload |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 214 | [Documentation] Upload 1000 partition file to BMC. |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 215 | [Tags] Verify_One_Thousand_Partitions_File_Upload |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 216 | [Template] Redfish Upload Partition File With Range |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 217 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 218 | # range |
| 219 | 1000 |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 220 | |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 221 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 222 | Non Admin Users Fail To Upload Partition File |
| 223 | [Documentation] Non admin user will fail to upload the partition file. |
| 224 | [Tags] Non_Admin_Users_Fail_To_Upload_Partition_File |
| 225 | [Template] Non Admin User To Upload Partition File |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 226 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 227 | # file_name username password role_id |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 228 | 500KB-file operator_user TestPwd123 Operator |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 229 | |
| 230 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 231 | Non Admin User Delete Non Existence Of Partition File |
George Keishing | 16b3c7b | 2021-01-28 09:23:37 -0600 | [diff] [blame] | 232 | [Documentation] Delete the partition file if does not exists. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 233 | [Tags] Non_Admin_User_Delete_Non_Existence_Of_Partition_File |
| 234 | [Template] Non Admin Delete Non Existence Partition File |
| 235 | |
| 236 | # file_name username password role_id |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 237 | 500KB-file operator_user TestPwd123 Operator |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 238 | |
| 239 | |
| 240 | Redfish Update Wrong Partition File To BMC |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 241 | [Documentation] Upload partition file to BMC by wrong URI using Redfish. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 242 | [Tags] Redfish_Update_Wrong_Partition_File_To_BMC |
| 243 | [Template] Verify Update Wrong Partition File To BMC |
| 244 | |
| 245 | # file_name |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 246 | 500KB-file |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 247 | |
Sushil Singh | 9942df5 | 2021-09-03 02:28:11 -0500 | [diff] [blame] | 248 | |
| 249 | Test Redfish Upload Partition File Name With Character Limit To BMC |
| 250 | [Documentation] Upload partition file to BMC with file name character allowed limit |
| 251 | ... and above allowed limit using Redfish. |
| 252 | [Tags] Test_Redfish_Upload_Partition_File_Name_With_Character_Limit_To_BMC |
| 253 | [Template] Check Redfish Upload Partition File Name With Character Limit To BMC |
| 254 | |
| 255 | # file_name status_code message |
| 256 | 50KB-testfilesavfile ${HTTP_OK} ${FILE_UPLOAD_MESSAGE} |
| 257 | 50KB-testsaveareafile ${HTTP_BAD_REQUEST} ${MAXIMUM_FILE_NAME_MESSAGE} |
| 258 | |
Sushil Singh | 2dbcbde | 2021-09-09 08:50:48 -0500 | [diff] [blame] | 259 | |
| 260 | Test Redfish Fail To Upload Partition File Name With Special Character To BMC |
| 261 | [Documentation] Upload partition file to BMC with special character file name and |
| 262 | ... Redfish through an error. |
| 263 | [Tags] Test_Redfish_Fail_To_Upload_Partition_File_Name_With_Special_Character_To_BMC |
| 264 | [Template] Check Redfish Fail To Upload Partition File Name With Special Character To BMC |
| 265 | |
| 266 | # file_name status_code message |
| 267 | 1KB-*filename ${HTTP_BAD_REQUEST} ${UNSUPPORTED_FILE_NAME_MESSAGE} |
| 268 | 1KB-!filename ${HTTP_BAD_REQUEST} ${UNSUPPORTED_FILE_NAME_MESSAGE} |
| 269 | 1KB-@filename ${HTTP_BAD_REQUEST} ${UNSUPPORTED_FILE_NAME_MESSAGE} |
| 270 | |
Sushil Singh | 44b8cf3 | 2021-11-17 06:57:09 -0600 | [diff] [blame^] | 271 | |
| 272 | Redfish Upload Validated Partition File From Path To BMC |
| 273 | [Documentation] Upload valid partition file to BMC from file path define by user in loop. |
| 274 | ... By default loop count values is 10 times. |
| 275 | [Tags] Redfish_Upload_Validated_Partition_File_From_Path_To_BMC |
| 276 | |
| 277 | Log To Console ${EMPTY} |
| 278 | FOR ${count} IN RANGE 1 ${LOOP_COUNT} + 1 |
| 279 | Log To Console ************************************** |
| 280 | Log To Console * The Current Loop Count is ${count} of ${LOOP_COUNT} * |
| 281 | Log To Console ************************************** |
| 282 | |
| 283 | Redfish Upload Partition File From Path ${PARTITION_FILE_PATH} |
| 284 | END |
| 285 | |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 286 | *** Keywords *** |
| 287 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 288 | Suite Setup Execution |
| 289 | [Documentation] Suite setup execution. |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 290 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 291 | Redfish.Login |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 292 | |
| 293 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 294 | Test Teardown Execution |
| 295 | [Documentation] Test teardown execution. |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 296 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 297 | Delete All BMC Partition File ${HTTP_OK} |
| 298 | FFDC On Test Case Fail |
| 299 | |
| 300 | |
| 301 | Suite Teardown Execution |
| 302 | [Documentation] Suite teardown execution. |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 303 | |
| 304 | Delete All Sessions |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 305 | |
| 306 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 307 | Delete Local Partition File |
| 308 | [Documentation] Delete local partition file. |
| 309 | [Arguments] ${file_name} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 310 | |
| 311 | # Description of argument(s): |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 312 | # file_name Partition file name. |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 313 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 314 | FOR ${conf_file} IN @{file_name} |
| 315 | ${file_exist}= Run Keyword And Return Status OperatingSystem.File Should Exist ${conf_file} |
| 316 | Run Keyword If 'True' == '${file_exist}' Remove File ${conf_file} |
| 317 | END |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 318 | |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 319 | |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 320 | Delete Local Server Partition File |
| 321 | [Documentation] Local partition files which is getting uploaded to BMC, |
| 322 | ... will get deleted after the uploads. If partition file name consist |
| 323 | ... of “-file” then partition file gets deleted. |
| 324 | |
| 325 | @{conf_file_list} = OperatingSystem.List Files In Directory ${EXECDIR} |
| 326 | ${match_conf_file_list}= Get Matches ${conf_file_list} regexp=.*-file case_insensitive=${True} |
| 327 | |
| 328 | ${num_records}= Get Length ${match_conf_file_list} |
| 329 | Return From Keyword If ${num_records} == ${0} ${EMPTY} |
| 330 | |
| 331 | FOR ${conf_file} IN @{match_conf_file_list} |
| 332 | ${file_exist}= Run Keyword And Return Status OperatingSystem.File Should Exist ${conf_file} |
| 333 | Run Keyword If 'True' == '${file_exist}' Remove File ${conf_file} |
| 334 | END |
| 335 | |
| 336 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 337 | Create Partition File |
| 338 | [Documentation] Create Partition file. |
| 339 | [Arguments] ${file_name} |
| 340 | |
| 341 | # Description of argument(s): |
| 342 | # file_name Partition file name. |
| 343 | |
| 344 | Delete Local Partition File ${file_name} |
| 345 | |
| 346 | FOR ${conf_file} IN @{file_name} |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 347 | @{words}= Split String ${conf_file} - |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 348 | Run dd if=/dev/zero of=${conf_file} bs=${words}[-0] count=1 |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 349 | OperatingSystem.File Should Exist ${conf_file} |
| 350 | END |
| 351 | |
| 352 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 353 | Delete BMC Partition File |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 354 | [Documentation] Delete single partition file on BMC via Redfish. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 355 | [Arguments] ${file_name} ${status_code} ${expected_message} |
| 356 | |
| 357 | # Description of argument(s): |
| 358 | # file_name Partition file name. |
| 359 | # status_code HTTPS status code. |
| 360 | # expected_message Expected message of URI. |
| 361 | |
| 362 | FOR ${conf_file} IN @{file_name} |
| 363 | ${data}= Create Dictionary |
| 364 | ${headers}= Create Dictionary X-Auth-Token=${XAUTH_TOKEN} |
| 365 | Set To Dictionary ${data} headers ${headers} |
| 366 | |
| 367 | ${resp}= Delete Request openbmc /ibm/v1/Host/ConfigFiles/${conf_file} &{data} |
| 368 | Should Be Equal As Strings ${resp.status_code} ${status_code} |
| 369 | |
Sushil Singh | 7aa3cc4 | 2021-08-19 07:42:29 -0500 | [diff] [blame] | 370 | ${description}= Return Description Of Response ${resp.text} |
| 371 | Should Be Equal As Strings ${description} ${expected_message} |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 372 | END |
| 373 | |
| 374 | |
| 375 | Delete All BMC Partition File |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 376 | [Documentation] Delete multiple partition file on BMC via Redfish. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 377 | [Arguments] ${status_code} |
| 378 | |
| 379 | # Description of argument(s): |
| 380 | # status_code HTTPS status code. |
| 381 | |
| 382 | Initialize OpenBMC |
| 383 | ${data}= Create Dictionary |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 384 | ${headers}= Create Dictionary X-Auth-Token=${XAUTH_TOKEN} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 385 | Set To Dictionary ${data} headers ${headers} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 386 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 387 | ${resp}= Post Request openbmc /ibm/v1/Host/ConfigFiles/Actions/IBMConfigFiles.DeleteAll &{data} |
| 388 | Should Be Equal As Strings ${resp.status_code} ${status_code} |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 389 | |
| 390 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 391 | Return Description Of Response |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 392 | [Documentation] Return description of REST response. |
| 393 | [Arguments] ${resp_text} |
| 394 | |
| 395 | # Description of argument(s): |
| 396 | # resp_text REST response body. |
| 397 | |
| 398 | # resp_text after successful partition file upload looks like: |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 399 | # { |
| 400 | # "Description": "File Created" |
| 401 | # } |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 402 | |
Sushil Singh | 7aa3cc4 | 2021-08-19 07:42:29 -0500 | [diff] [blame] | 403 | ${status}= Run Keyword And Return Status Evaluate isinstance(${resp_text}, dict) |
| 404 | Return From Keyword If '${status}' == 'False' ${resp_text} |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 405 | ${message}= Evaluate json.loads('''${resp_text}''') json |
| 406 | |
| 407 | [Return] ${message["Description"]} |
| 408 | |
| 409 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 410 | Upload Partition File To BMC |
| 411 | [Documentation] Upload partition file to BMC. |
Sushil Singh | 44b8cf3 | 2021-11-17 06:57:09 -0600 | [diff] [blame^] | 412 | [Arguments] ${file_name} ${status_code} ${expected_message} ${flag}=${True} ${path}=${EMPTY} |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 413 | |
| 414 | # Description of argument(s): |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 415 | # file_name Partition file name. |
| 416 | # status_code HTTPS status code. |
| 417 | # expected_message Expected message of URI. |
| 418 | # flag If True run part of program, else skip. |
Sushil Singh | 44b8cf3 | 2021-11-17 06:57:09 -0600 | [diff] [blame^] | 419 | # path Partition file path. |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 420 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 421 | Run Keyword If '${flag}' == '${True}' Initialize OpenBMC |
| 422 | FOR ${conf_file} IN @{file_name} |
| 423 | # Get the content of the file and upload to BMC. |
Sushil Singh | 44b8cf3 | 2021-11-17 06:57:09 -0600 | [diff] [blame^] | 424 | ${image_data}= OperatingSystem.Get Binary File ${path}${conf_file} |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 425 | ${headers}= Create Dictionary X-Auth-Token=${XAUTH_TOKEN} Content-Type=application/octet-stream |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 426 | |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 427 | ${kwargs}= Create Dictionary data=${image_data} |
| 428 | Set To Dictionary ${kwargs} headers ${headers} |
| 429 | ${resp}= Put Request openbmc /ibm/v1/Host/ConfigFiles/${conf_file} &{kwargs} timeout=10 |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 430 | Should Be Equal As Strings ${resp.status_code} ${status_code} |
| 431 | |
Sushil Singh | 7aa3cc4 | 2021-08-19 07:42:29 -0500 | [diff] [blame] | 432 | ${description}= Return Description Of Response ${resp.text} |
| 433 | Should Be Equal As Strings ${description} ${expected_message} |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 434 | END |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 435 | |
| 436 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 437 | Verify Partition File On BMC |
| 438 | [Documentation] Verify partition file on BMC. |
| 439 | [Arguments] ${file_name} ${Partition_status} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 440 | |
| 441 | # Description of argument(s): |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 442 | # file_name Partition file name. |
| 443 | # Partition_status Partition file status on BMC. |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 444 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 445 | FOR ${conf_file} IN @{file_name} |
| 446 | ${status} ${stderr} ${rc}= BMC Execute Command |
Sushil Singh | e5f39ee | 2021-01-06 00:39:12 -0600 | [diff] [blame] | 447 | ... ls -l /var/lib/bmcweb/ibm-management-console/configfiles/${conf_file} | wc -l |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 448 | Valid Value ${status} [${Partition_status}] |
| 449 | END |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 450 | |
| 451 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 452 | Redfish Upload Partition File |
| 453 | [Documentation] Upload the partition file. |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 454 | [Arguments] ${file_name} ${file_size}=${EMPTY} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 455 | |
| 456 | # Description of argument(s): |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 457 | # file_name Partition file name. |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 458 | # file_size By Default is set to EMPTY, |
| 459 | # if user pass small_file_size the create file with small |
| 460 | # size keyword gets executed. |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 461 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 462 | @{Partition_file_list} = Split String ${file_name} , |
| 463 | ${num_records}= Get Length ${Partition_file_list} |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 464 | |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 465 | Create Partition File ${Partition_file_list} |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 466 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 467 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPLOAD_MESSAGE} |
| 468 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 469 | Run Keyword If ${num_records} == ${1} |
| 470 | ... Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE} |
| 471 | ... ELSE |
| 472 | ... Delete All BMC Partition File ${HTTP_OK} |
| 473 | Delete Local Partition File ${Partition_file_list} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 474 | |
| 475 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 476 | Redfish Fail To Upload Partition File |
George Keishing | 16b3c7b | 2021-01-28 09:23:37 -0600 | [diff] [blame] | 477 | [Documentation] Fail to upload the partition file. |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 478 | [Arguments] ${file_name} ${status_code} ${partition_status} ${response_message}=${EMPTY} |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 479 | |
| 480 | # Description of argument(s): |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 481 | # file_name Partition file name. |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 482 | # status_code HTTPS status code. |
| 483 | # partition_status Partition status. |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 484 | # response_message By default is set to EMPTY, |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 485 | # else user provide the information when user upload the partition with file size |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 486 | # below lower linit of allowed partition or more than of large allowed partition. |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 487 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 488 | @{Partition_file_list} = Split String ${file_name} , |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 489 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 490 | Create Partition File ${Partition_file_list} |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 491 | Upload Partition File To BMC ${Partition_file_list} ${status_code} ${response_message} |
| 492 | Verify Partition File On BMC ${Partition_file_list} Partition_status=${partition_status} |
Sushil Singh | 255ec63 | 2021-08-26 08:08:21 -0500 | [diff] [blame] | 493 | |
Sushil Singh | 1544c5e | 2021-11-03 07:56:37 -0500 | [diff] [blame] | 494 | Run Keyword If ${partition_status} == 0 |
| 495 | ... Run Keywords |
| 496 | ... Delete BMC Partition File |
| 497 | ... ${Partition_file_list} ${HTTP_NOT_FOUND} ${RESOURCE_NOT_FOUND_MESSAGE} AND |
| 498 | ... Delete All BMC Partition File ${HTTP_OK} AND |
| 499 | ... Delete Local Server Partition File |
| 500 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 501 | Delete Local Partition File ${Partition_file_list} |
Vijay | 09839e2 | 2020-02-05 02:54:44 -0600 | [diff] [blame] | 502 | |
| 503 | |
Sushil Singh | df6ba52 | 2020-11-24 04:17:00 -0600 | [diff] [blame] | 504 | Redfish Upload Partition File In Loop |
| 505 | [Documentation] Upload the same partition file multiple times in loop to BMC. |
| 506 | [Arguments] ${file_name} |
| 507 | |
| 508 | # Description of argument(s): |
| 509 | # file_name Partition file name. |
| 510 | |
| 511 | @{Partition_file_list} = Split String ${file_name} , |
| 512 | Create Partition File ${Partition_file_list} |
| 513 | |
| 514 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPLOAD_MESSAGE} |
| 515 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 516 | |
| 517 | FOR ${count} IN RANGE 1 11 |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 518 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPDATED_MESSAGE} |
Sushil Singh | df6ba52 | 2020-11-24 04:17:00 -0600 | [diff] [blame] | 519 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 520 | END |
| 521 | |
| 522 | Initialize OpenBMC |
| 523 | Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE} |
| 524 | Delete Local Partition File ${Partition_file_list} |
| 525 | |
| 526 | |
Sushil Singh | f39629c | 2020-12-11 07:30:21 -0600 | [diff] [blame] | 527 | Redfish Upload And Delete Partition File In Loop |
| 528 | [Documentation] Upload the same partition file multiple times in loop to BMC. |
| 529 | [Arguments] ${file_name} |
| 530 | |
| 531 | # Description of argument(s): |
| 532 | # file_name Partition file name. |
| 533 | |
| 534 | FOR ${count} IN RANGE 1 11 |
| 535 | Redfish Upload Partition File ${file_name} |
| 536 | END |
| 537 | |
| 538 | |
Sushil Singh | 5d0782f | 2020-11-23 06:35:35 -0600 | [diff] [blame] | 539 | Verify Partition File Upload Post BMC Reboot |
| 540 | [Documentation] Upload the partition file, after BMC reboot. |
| 541 | [Arguments] ${file_name} |
| 542 | |
| 543 | # Description of argument(s): |
| 544 | # file_name Partition file name. |
| 545 | |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 546 | ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN} |
| 547 | Redfish BMC Reset Operation |
| 548 | Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token} |
| 549 | |
| 550 | Is BMC Standby |
Sushil Singh | 5d0782f | 2020-11-23 06:35:35 -0600 | [diff] [blame] | 551 | |
| 552 | Redfish Upload Partition File ${file_name} |
| 553 | |
| 554 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 555 | Redfish Partition File Persistency |
| 556 | [Documentation] Upload the partition file and check for persistency after reboot. |
| 557 | [Arguments] ${file_name} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 558 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 559 | # Description of argument(s): |
| 560 | # file_name Partition file name. |
| 561 | |
| 562 | @{Partition_file_list} = Split String ${file_name} , |
| 563 | ${num_records}= Get Length ${Partition_file_list} |
| 564 | Create Partition File ${Partition_file_list} |
| 565 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPLOAD_MESSAGE} |
| 566 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 567 | |
| 568 | ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN} |
| 569 | Redfish BMC Reset Operation |
| 570 | Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token} |
| 571 | |
| 572 | Is BMC Standby |
| 573 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 574 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 575 | Initialize OpenBMC |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 576 | Run Keyword If ${num_records} == ${1} |
| 577 | ... Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE} |
| 578 | ... ELSE |
| 579 | ... Delete All BMC Partition File ${HTTP_OK} |
| 580 | Delete Local Partition File ${Partition_file_list} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 581 | |
| 582 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 583 | Verify Redfish Partition File Content |
| 584 | [Documentation] Verify partition file content. |
| 585 | [Arguments] ${file_name} ${content_dict} ${status_code} |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 586 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 587 | # Description of argument(s): |
| 588 | # file_name Partition file name. |
| 589 | # content_dict Dict contain the content. |
| 590 | # status_code HTTPS status code. |
| 591 | |
| 592 | FOR ${conf_file} IN @{file_name} |
| 593 | ${resp}= Get Request openbmc /ibm/v1/Host/ConfigFiles/${conf_file} |
| 594 | Should Be Equal As Strings ${resp.status_code} ${status_code} |
| 595 | |
| 596 | ${Partition_file_data}= Remove String ${resp.text} \\n |
| 597 | ${Partition_file_data}= Evaluate json.loads('''${Partition_file_data}''') json |
| 598 | Should Be Equal As Strings ${Partition_file_data["Data"]} ${content_dict['${conf_file}']} |
| 599 | END |
Vijay | fcdadc5 | 2020-01-21 01:48:19 -0600 | [diff] [blame] | 600 | |
Vijay | 3937315 | 2020-02-14 08:08:20 -0600 | [diff] [blame] | 601 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 602 | Add Content To Files |
| 603 | [Documentation] Add defined content in partition file. |
| 604 | [Arguments] ${file_name} ${index}=${0} |
Vijay | 3937315 | 2020-02-14 08:08:20 -0600 | [diff] [blame] | 605 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 606 | # Description of argument(s): |
| 607 | # file_name Partition file name. |
| 608 | # index Index |
| 609 | |
| 610 | ${num_records}= Get Length ${file_name} |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 611 | &{content_dict}= Create Dictionary |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 612 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 613 | FOR ${conf_file} IN @{file_name} |
| 614 | ${index}= Get Index From List ${file_name} ${conf_file} |
| 615 | ${index}= Evaluate ${index} + 1 |
| 616 | |
| 617 | Run echo "${content-${index}}" > ${conf_file} |
| 618 | OperatingSystem.File Should Exist ${conf_file} |
| 619 | |
| 620 | Set To Dictionary ${content_dict} ${conf_file} ${content-${index}} |
| 621 | END |
| 622 | |
| 623 | [Return] &{content_dict} |
| 624 | |
| 625 | |
| 626 | Redfish Read Partition File |
| 627 | [Documentation] Read partition file content. |
| 628 | [Arguments] ${file_name} ${reboot_flag}=False |
| 629 | |
| 630 | # Description of argument(s): |
| 631 | # file_name Partition file name. |
| 632 | # reboot_flag Reboot flag. |
| 633 | |
| 634 | @{Partition_file_list} = Split String ${file_name} , |
| 635 | ${content_dict}= Add Content To Files ${Partition_file_list} |
| 636 | |
| 637 | ${num_records}= Get Length ${Partition_file_list} |
| 638 | |
| 639 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPLOAD_MESSAGE} |
| 640 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 641 | Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK} |
| 642 | |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 643 | ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN} |
| 644 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 645 | Run Keyword If ${True} == ${reboot_flag} |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 646 | ... Run Keywords Redfish BMC Reset Operation AND |
| 647 | ... Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token} AND |
| 648 | ... Is BMC Standby AND |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 649 | ... Initialize OpenBMC AND |
| 650 | ... Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK} |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 651 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 652 | Run Keyword If ${num_records} == ${1} |
| 653 | ... Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE} |
| 654 | ... ELSE |
| 655 | ... Delete All BMC Partition File ${HTTP_OK} |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 656 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 657 | Delete Local Partition File ${Partition_file_list} |
| 658 | |
| 659 | |
| 660 | Redfish Update Partition File With Same Content |
| 661 | [Documentation] Update partition file with same content. |
| 662 | [Arguments] ${file_name} ${reboot_flag}=False |
| 663 | |
| 664 | # Description of argument(s): |
| 665 | # file_name Partition file name. |
| 666 | # reboot_flag Reboot flag. |
| 667 | |
| 668 | @{Partition_file_list} = Split String ${file_name} , |
| 669 | ${content_dict}= Add Content To Files ${Partition_file_list} ${0} |
| 670 | |
| 671 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPLOAD_MESSAGE} |
| 672 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 673 | Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK} |
| 674 | |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 675 | ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN} |
| 676 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 677 | Run Keyword If ${True} == ${reboot_flag} |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 678 | ... Run Keywords Redfish BMC Reset Operation AND |
| 679 | ... Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token} AND |
| 680 | ... Is BMC Standby AND |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 681 | ... Initialize OpenBMC |
| 682 | |
| 683 | ${content_dict}= Add Content To Files ${Partition_file_list} ${0} |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 684 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPDATED_MESSAGE} |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 685 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 686 | Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK} |
| 687 | |
| 688 | Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE} |
| 689 | Delete Local Partition File ${Partition_file_list} |
| 690 | |
| 691 | |
| 692 | Redfish Update Partition File With Different Content |
| 693 | [Documentation] Update partition file with different content. |
| 694 | [Arguments] ${file_name} ${reboot_flag}=False |
| 695 | |
| 696 | # Description of argument(s): |
| 697 | # file_name Partition file name. |
| 698 | # reboot_flag Reboot flag. |
| 699 | |
| 700 | @{Partition_file_list} = Split String ${file_name} , |
| 701 | ${content_dict}= Add Content To Files ${Partition_file_list} ${0} |
| 702 | |
| 703 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPLOAD_MESSAGE} |
| 704 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 705 | Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK} |
| 706 | |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 707 | ${before_reboot_xauth_token}= Set Variable ${XAUTH_TOKEN} |
| 708 | |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 709 | Run Keyword If ${True} == ${reboot_flag} |
Sushil Singh | 98ebdfa | 2021-02-10 04:24:06 -0600 | [diff] [blame] | 710 | ... Run Keywords Redfish BMC Reset Operation AND |
| 711 | ... Set Global Variable ${XAUTH_TOKEN} ${before_reboot_xauth_token} AND |
| 712 | ... Is BMC Standby AND |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 713 | ... Initialize OpenBMC |
| 714 | |
| 715 | ${content_dict}= Add Content To Files ${Partition_file_list} ${1} |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 716 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPDATED_MESSAGE} |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 717 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 718 | Verify Redfish Partition File Content ${Partition_file_list} ${content_dict} ${HTTP_OK} |
| 719 | |
| 720 | Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE} |
| 721 | Delete Local Partition File ${Partition_file_list} |
| 722 | |
| 723 | |
| 724 | Create File Names |
| 725 | [Documentation] Create partition file names. |
| 726 | [Arguments] ${range} |
| 727 | |
| 728 | # Description of argument(s): |
| 729 | # range Range in numbers. |
| 730 | |
| 731 | @{file_name_list}= Create List |
| 732 | Set Test Variable ${file_name} rangefile |
| 733 | FOR ${count} IN RANGE ${range} |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 734 | Append To List ${file_name_list} 1KB-file${count} |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 735 | END |
| 736 | [Return] ${file_name_list} |
| 737 | |
| 738 | |
| 739 | Redfish Upload Partition File With Range |
| 740 | [Documentation] Upload the partition file with the range of files. |
| 741 | [Arguments] ${range} |
| 742 | |
| 743 | # Description of argument(s): |
| 744 | # range Range in numbers. |
| 745 | |
| 746 | ${Partition_file_list}= Create File Names ${range} |
Sushil Singh | 85c381c | 2021-08-17 23:25:10 -0500 | [diff] [blame] | 747 | Delete Local Partition File ${Partition_file_list} |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 748 | Create Partition File ${Partition_file_list} |
| 749 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_OK} ${FILE_UPLOAD_MESSAGE} |
| 750 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 751 | Delete All BMC Partition File ${HTTP_OK} |
| 752 | Delete Local Partition File ${Partition_file_list} |
| 753 | |
| 754 | |
| 755 | Redfish Delete Non Existence Partition File |
| 756 | [Documentation] Delete the partition file if do not exists. |
| 757 | [Arguments] ${file_name} |
| 758 | |
| 759 | # Description of argument(s): |
| 760 | # file_name Partition file name. |
| 761 | |
| 762 | @{Partition_file_list} = Split String ${file_name} , |
Sushil Singh | 251a0bc | 2021-08-24 01:12:14 -0500 | [diff] [blame] | 763 | Delete BMC Partition File ${Partition_file_list} ${HTTP_NOT_FOUND} ${RESOURCE_NOT_FOUND_MESSAGE} |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 764 | |
| 765 | |
| 766 | Non Admin User To Upload Partition File |
George Keishing | 16b3c7b | 2021-01-28 09:23:37 -0600 | [diff] [blame] | 767 | [Documentation] Non admin user to upload the partition file. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 768 | [Arguments] ${file_name} ${username} ${password} ${role} ${enabled}=${True} |
| 769 | |
| 770 | # Description of argument(s): |
| 771 | # file_name Partition file name. |
| 772 | # username Username. |
| 773 | # password Password. |
| 774 | # role Role of user. |
| 775 | # enabled Value can be True or False. |
| 776 | |
| 777 | Redfish Create User ${username} ${password} ${role} ${enabled} |
Vijay | 3937315 | 2020-02-14 08:08:20 -0600 | [diff] [blame] | 778 | Delete All Sessions |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 779 | Initialize OpenBMC rest_username=${username} rest_password=${password} |
| 780 | @{Partition_file_list} = Split String ${file_name} , |
| 781 | Create Partition File ${Partition_file_list} |
| 782 | Upload Partition File To BMC ${Partition_file_list} ${HTTP_FORBIDDEN} ${FORBIDDEN_MESSAGE} ${False} |
| 783 | Delete Local Partition File ${Partition_file_list} |
| 784 | Redfish.Delete /redfish/v1/AccountService/Accounts/${username} |
| 785 | |
| 786 | |
| 787 | Non Admin Delete Non Existence Partition File |
George Keishing | 16b3c7b | 2021-01-28 09:23:37 -0600 | [diff] [blame] | 788 | [Documentation] Non admin user to upload the partition file. |
Sushil Singh | cbbce6a | 2020-09-07 00:57:37 -0500 | [diff] [blame] | 789 | [Arguments] ${file_name} ${username} ${password} ${role} ${enabled}=${True} |
| 790 | |
| 791 | # Description of argument(s): |
| 792 | # file_name Partition file name. |
| 793 | # username Username. |
| 794 | # password Password. |
| 795 | # role Role of user. |
| 796 | # enabled Value can be True or False. |
| 797 | |
| 798 | Redfish Create User ${username} ${password} ${role} ${enabled} |
| 799 | Delete All Sessions |
| 800 | Initialize OpenBMC rest_username=${username} rest_password=${password} |
| 801 | @{Partition_file_list} = Split String ${file_name} , |
| 802 | Delete BMC Partition File ${Partition_file_list} ${HTTP_FORBIDDEN} ${FORBIDDEN_MESSAGE} |
| 803 | |
| 804 | |
| 805 | Verify Update Wrong Partition File To BMC |
| 806 | [Documentation] Upload the wrong partition file to BMC. |
| 807 | [Arguments] ${file_name} |
| 808 | |
| 809 | # Description of argument(s): |
| 810 | # file_name Partition file name. |
| 811 | |
| 812 | Redfish.Login |
| 813 | ${resp}= Run Keyword And Return Status |
| 814 | ... Redfish.Put /ibm/v1/Host/ConfigFiles/../../../../../etc/resolv.conf body={"data": "test string"} |
| 815 | Should Be Equal As Strings ${resp} False |
Sushil Singh | 9942df5 | 2021-09-03 02:28:11 -0500 | [diff] [blame] | 816 | |
| 817 | |
| 818 | Check Redfish Upload Partition File Name With Character Limit To BMC |
| 819 | [Documentation] Upload the partition file to BMC with file name character limit. |
| 820 | [Arguments] ${file_name} ${status_code} ${message} |
| 821 | |
| 822 | # Description of argument(s): |
| 823 | # file_name Partition file name. |
| 824 | # status_code HTTPS status code. |
| 825 | # message Expected message of from upload partition file URI. |
| 826 | |
| 827 | @{Partition_file_list} = Split String ${file_name} , |
| 828 | ${num_records}= Get Length ${Partition_file_list} |
| 829 | Create Partition File ${Partition_file_list} |
| 830 | |
| 831 | ${file_name_length}= Get Length ${Partition_file_list}[0] |
| 832 | |
| 833 | Run Keyword If ${file_name_length} == 20 |
| 834 | ... Run Keywords |
| 835 | ... Upload Partition File To BMC ${Partition_file_list} ${status_code} ${message} AND |
| 836 | ... Verify Partition File On BMC ${Partition_file_list} Partition_status=1 AND |
| 837 | ... Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE} |
| 838 | ... ELSE |
| 839 | ... Upload Partition File To BMC ${Partition_file_list} ${status_code} ${message} |
| 840 | |
| 841 | Delete Local Partition File ${Partition_file_list} |
Sushil Singh | 2dbcbde | 2021-09-09 08:50:48 -0500 | [diff] [blame] | 842 | |
| 843 | |
| 844 | Check Redfish Fail To Upload Partition File Name With Special Character To BMC |
| 845 | [Documentation] Upload the partition file to BMC with special character file name. |
| 846 | [Arguments] ${file_name} ${status_code} ${message} |
| 847 | |
| 848 | # Description of argument(s): |
| 849 | # file_name Partition file name. |
| 850 | # status_code HTTPS status code. |
| 851 | # message Expected message from upload partition file URI. |
| 852 | |
| 853 | @{Partition_file_list} = Split String ${file_name} , |
| 854 | ${num_records}= Get Length ${Partition_file_list} |
| 855 | |
| 856 | Create Partition File ${Partition_file_list} |
| 857 | |
| 858 | Upload Partition File To BMC ${Partition_file_list} ${status_code} ${message} |
| 859 | |
| 860 | ${status}= Run Keyword And Return Status |
| 861 | ... Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 862 | Should Be Equal As Strings ${status} False |
| 863 | |
| 864 | Delete Local Partition File ${Partition_file_list} |
Sushil Singh | 44b8cf3 | 2021-11-17 06:57:09 -0600 | [diff] [blame^] | 865 | |
| 866 | |
| 867 | Redfish Upload Partition File From Path |
| 868 | [Documentation] Upload the partition file to BMC from file path. |
| 869 | [Arguments] ${PARTITION_FILE_PATH} |
| 870 | |
| 871 | # Description of argument(s): |
| 872 | # PARTITION_FILE_PATH Partition file path. |
| 873 | |
| 874 | ${file_list} = OperatingSystem.List Files In Directory ${PARTITION_FILE_PATH} |
| 875 | |
| 876 | ${num_records}= Get Length ${file_list} |
| 877 | Should Not Be Equal As Integers ${num_records} 0 |
| 878 | |
| 879 | FOR ${file_name} IN @{file_list} |
| 880 | @{Partition_file_list} = Split String ${file_name} , |
| 881 | ${num_records}= Get Length ${Partition_file_list} |
| 882 | Upload Partition File To BMC file_name=${Partition_file_list} status_code=${HTTP_OK} expected_message=${FILE_UPLOAD_MESSAGE} path=${PARTITION_FILE_PATH} |
| 883 | Verify Partition File On BMC ${Partition_file_list} Partition_status=1 |
| 884 | Delete BMC Partition File ${Partition_file_list} ${HTTP_OK} ${FILE_DELETED_MESSAGE} |
| 885 | END |
| 886 | |