Retry Text Input ${keep_records_input} ${keep_records}
Retry Double Keywords When Error Retry Element Click ${keep_records_unit_select} Retry Element Click ${keep_records_unit_select}//option[contains(.,'${keep_records_unit}')]
${len}= Get Length ${exclude_operations}
Run Keyword If ${len} > 0 Click Exclude Operation @{exclude_operations}
Retry Text Input ${keep_records_input} ${keep_records}
Retry Double Keywords When Error Retry Element Click ${keep_records_unit_select} Retry Element Click ${keep_records_unit_select}//option[contains(.,'${keep_records_unit}')]
Retry Double Keywords When Error Retry Element Click ${log_rotation_schedule_select} Retry Element Click ${log_rotation_schedule_select}//option[contains(.,'${type}')]
Run Keyword If '${type}' == 'Custom' Retry Text Input ${log_rotation_schedule_cron_input} ${cron}
${len}= Get Length ${exclude_operations}
Run Keyword If ${len} > 0 Click Exclude Operation @{exclude_operations}
Retry Double Keywords When Error Retry Button Click ${log_rotation_schedule_save_btn} Retry Wait Until Page Contains Purge schedule has been reset
Get Purge Job Results
${cmd}= Set Variable curl -u ${HARBOR_ADMIN}:${HARBOR_PASSWORD} -s --insecure -H "Content-Type: application/json" -X GET "https://${ip}/api/v2.0/system/purgeaudit?sort=-creation_time&page=1&page_size=100"
${rc} ${output}= Run And Return Rc And Output ${cmd}