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