-
-Read_And_Fail_If_Prompt_Is_Seen
- [Documentation] Try to read SSH to see prompt, but expect to see no prompt within SSHLibrary's timeout.
- ${passed}= BuiltIn.Run_Keyword_And_Return_Status BuiltIn.Run_Keyword_And_Expect_Error No match found for '${ODL_SYSTEM_PROMPT}' in *. Read_Text_Before_Prompt
- BuiltIn.Return_From_Keyword_If ${passed}
- BGPSpeaker.Dump_BGP_Speaker_Logs
- Builtin.Fail The prompt was seen but it was not expected yet
-
-Read_Text_Before_Prompt
- [Documentation] Log text gathered by SSHLibrary.Read_Until_Prompt.
- ... This needs to be a separate keyword just because how Read_And_Fail_If_Prompt_Is_Seen is implemented.
- ${text}= SSHLibrary.Read_Until_Prompt
- BuiltIn.Log ${text}
-
-Store_File_To_Workspace
- [Arguments] ${source_file_name} ${target_file_name}
- [Documentation] Store the ${source_file_name} to the workspace as ${target_file_name}.
- ${output_log}= SSHLibrary.Execute_Command cat ${source_file_name}
- BuiltIn.Log ${output_log}
- Create File ${target_file_name} ${output_log}
-
-Check_File_For_Word_Count
- [Arguments] ${file_name} ${word} ${expected_count}
- [Documentation] Count ${word} in ${file_name}. Expect ${expected_count} occurence(s)
- ${output_log}= SSHLibrary.Execute_Command grep -o '${word}' ${file_name} | wc -l
- BuiltIn.Log ${output_log}
- BuiltIn.Should_Be_Equal_As_Strings ${output_log} ${expected_count}
-
-Check_File_For_Occurence
- [Arguments] ${file_name} ${keyword} ${value}=''
- [Documentation] Check file for ${keyword} or ${keyword} ${value} pair and returns number of occurences
- ${output_log}= SSHLibrary.Execute_Command grep '${keyword}' ${file_name} | grep -c ${value}
- ${count}= Convert To Integer ${output_log}
- [Return] ${count}