basic eBGP peers functional suite:
[integration/test.git] / csit / suites / bgpcep / bgpuser / ebgp_peers_basic.robot
1 *** Settings ***
2 Documentation     Basic tests for eBGP application peers.
3 ...
4 ...               Copyright (c) 2015-2016 Cisco Systems, Inc. and others. All rights reserved.
5 ...
6 ...               This program and the accompanying materials are made available under the
7 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
9 ...
10 ...               Test suite performs basic eBGP functional tests:
11 ...               Two eBGP peers advertise the same group of prefixes (aka BGP HA)
12 ...               https://wiki.opendaylight.org/view/BGP_LS_PCEP:BGP
13 ...               Reported bugs:
14 ...               Bug 4834 - ODL controller announces the same route twice (two eBGP scenario aka HA)
15 ...               Bug 4835 - Routes not withdrawn when eBGP peers are disconnected (the same prefixes announced)
16 ...
17 ...               TODO: Extend testsuite by tests dedicated to path selection algorithm
18 ...               TODO: Choose keywords used by more than one test suite to be placed in a common place.
19 Suite Setup       Setup_Everything
20 Suite Teardown    Teardown_Everything
21 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
22 Test Teardown     FailFast.Start_Failing_Fast_If_This_Failed
23 Library           OperatingSystem
24 Library           RequestsLibrary
25 Library           ${CURDIR}/../../../libraries/HsfJson/hsf_json.py
26 Variables         ${CURDIR}/../../../variables/Variables.py
27 Variables         ${CURDIR}/../../../variables/bgpuser/variables.py    ${ODL_SYSTEM_PROMPT}
28 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
29 Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
30 Resource          ${CURDIR}/../../../libraries/FailFast.robot
31 Resource          ${CURDIR}/../../../libraries/KarafKeywords.robot
32 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
33 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
34 Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
35 Resource          ${CURDIR}/../../../libraries/Utils.robot
36 Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
37
38 *** Variables ***
39 ${BGP_VARIABLES_FOLDER}    ${CURDIR}/../../../variables/bgpuser/
40 ${HOLDTIME}       180
41 ${BGP_PEER_LOG_LEVEL}    debug
42 ${CONTROLLER_LOG_LEVEL}    INFO
43 ${CONTROLLER_BGP_LOG_LEVEL}    DEFAULT
44 ${iBGP_PEER1_IP}    127.0.0.1
45 ${eBGP_PEER1_IP}    127.0.0.3
46 ${eBGP_PEER2_IP}    127.0.0.4
47 ${iBGP_PEER1_FIRST_PREFIX_IP}    8.1.0.0
48 ${eBGP_PEERS_FIRST_PREFIX_IP}    8.0.0.0
49 ${eBGP_PEER1_FIRST_PREFIX_IP}    ${eBGP_PEERS_FIRST_PREFIX_IP}
50 ${eBGP_PEER2_FIRST_PREFIX_IP}    ${eBGP_PEERS_FIRST_PREFIX_IP}
51 ${eBGP_PEER1_NEXT_HOP}    1.1.1.1
52 ${eBGP_PEER2_NEXT_HOP}    2.2.2.2
53 ${PREFIX_LEN}     28
54 ${iBGP_PEER1_PREFIX_LEN}    ${PREFIX_LEN}
55 ${eBGP_PEER1_PREFIX_LEN}    ${PREFIX_LEN}
56 ${eBGP_PEER2_PREFIX_LEN}    ${PREFIX_LEN}
57 ${PREFIX_COUNT}    2
58 ${iBGP_PEER1_PREFIX_COUNT}    0
59 ${eBGP_PEER1_PREFIX_COUNT}    ${PREFIX_COUNT}
60 ${eBGP_PEER2_PREFIX_COUNT}    ${PREFIX_COUNT}
61 ${eBGP_PEERS_AS}    32768
62 ${eBGP_PEER1_AS}    ${eBGP_PEERS_AS}
63 ${eBGP_PEER2_AS}    ${eBGP_PEERS_AS}
64 ${iBGP_PEER1_LOG_FILE}    bgp_peer1.log
65 ${eBGP_PEER1_LOG_FILE}    ebgp_peer1.log
66 ${eBGP_PEER2_LOG_FILE}    ebgp_peer2.log
67 ${iBGP_PEER1_COMMAND}    python play.py --firstprefix ${iBGP_PEER1_FIRST_PREFIX_IP} --prefixlen ${iBGP_PEER1_PREFIX_LEN} --amount ${iBGP_PEER1_PREFIX_COUNT} --myip=${iBGP_PEER1_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} --logfile ${iBGP_PEER1_LOG_FILE}
68 ${eBGP_PEER1_COMMAND}    python play.py --firstprefix ${eBGP_PEER1_FIRST_PREFIX_IP} --prefixlen ${eBGP_PEER1_PREFIX_LEN} --amount ${eBGP_PEER1_PREFIX_COUNT} --myip=${eBGP_PEER1_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --nexthop ${eBGP_PEER1_NEXT_HOP} --asnumber ${eBGP_PEER1_AS} --${BGP_PEER_LOG_LEVEL} --logfile ${eBGP_PEER1_LOG_FILE}
69 ${eBGP_PEER2_COMMAND}    python play.py --firstprefix ${eBGP_PEER2_FIRST_PREFIX_IP} --prefixlen ${eBGP_PEER2_PREFIX_LEN} --amount ${eBGP_PEER2_PREFIX_COUNT} --myip=${eBGP_PEER2_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --nexthop ${eBGP_PEER2_NEXT_HOP} --asnumber ${eBGP_PEER2_AS} --${BGP_PEER_LOG_LEVEL} --logfile ${eBGP_PEER2_LOG_FILE}
70 ${iBGP_PEER1_OPTIONS}    &>${iBGP_PEER1_LOG_FILE}
71 ${eBGP_PEER1_OPTIONS}    &>${eBGP_PEER1_LOG_FILE}
72 ${eBGP_PEER2_OPTIONS}    &>${eBGP_PEER2_LOG_FILE}
73 ${DEFAULT_LOG_CHECK_TIMEOUT}    20s
74 ${DEFAULT_LOG_CHECK_PERIOD}    1s
75 ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    10s
76 ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    1s
77
78 *** Test Cases ***
79 Configure_BGP_Peers
80     [Documentation]    Configure an iBGP and two eBGP peers
81     [Tags]    critical
82     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ibgp-peer1', 'IP': '${iBGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ibgp', 'INITIATE': 'false'}
83     ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    ${template_as_string}
84     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ebgp-peer1', 'IP': '${eBGP_PEER1_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'PEER_ROLE': 'ebgp', 'AS_NUMBER': '${eBGP_PEER1_AS}', 'INITIATE': 'false'}
85     ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    ${template_as_string}
86     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ebgp-peer2', 'IP': '${eBGP_PEER2_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}','PEER_ROLE': 'ebgp', 'AS_NUMBER': '${eBGP_PEER2_AS}', 'INITIATE': 'false'}
87     ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    ${template_as_string}
88     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ibgp-peer1'}
89     ${result}=    ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    ${template_as_string}
90     BuiltIn.Log    ${result}
91     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ebgp-peer1'}
92     ${result}=    ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    ${template_as_string}
93     BuiltIn.Log    ${result}
94     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ebgp-peer2'}
95     ${result}=    ConfigViaRestconf.Get_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    ${template_as_string}
96     BuiltIn.Log    ${result}
97
98 Connect_iBGP_Peer1
99     [Documentation]    Connect BGP peer
100     [Tags]    critical
101     SSHLibrary.Switch Connection    ibgp_peer1_console
102     Start_Console_Tool    ${iBGP_PEER1_COMMAND}    ${iBGP_PEER1_OPTIONS}
103     Read_And_Fail_If_Prompt_Is_Seen
104     Check_Example_IPv4_Topology_Does_Not_Contain    prefix
105
106 Connect_eBGP_Peer1
107     [Documentation]    Connect BGP peer
108     [Tags]    critical
109     SSHLibrary.Switch Connection    ebgp_peer1_console
110     Start_Console_Tool    ${eBGP_PEER1_COMMAND}    ${eBGP_PEER1_OPTIONS}
111     Read_And_Fail_If_Prompt_Is_Seen
112
113 Check_IPv4_Topology_For_First_Path
114     [Documentation]    The IPv4 topology shall contain the route announced by the first eBGP
115     BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    "node-id":"${eBGP_PEER1_NEXT_HOP}"
116     Check_Example_IPv4_Topology_Content    "prefix":"${eBGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"
117
118 iBGP_Check_Log_For_Introduced_Prefixes
119     [Documentation]    Check incomming updates for introduced routes
120     [Tags]    critical
121     SSHLibrary.Switch Connection    ibgp_peer1_console
122     ${total_prefix_count}=    BuiltIn.Evaluate    ${eBGP_PEER1_PREFIX_COUNT}
123     BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_LOG_CHECK_TIMEOUT}    ${DEFAULT_LOG_CHECK_PERIOD}    Check_File_For_Word_Count    ${iBGP_PEER1_LOG_FILE}    nlri_prefix_received:    ${total_prefix_count}
124     ${count}=    Count_Key_Value_Pairs    ${iBGP_PEER1_LOG_FILE}    Network Address of Next Hop    ${eBGP_PEER1_NEXT_HOP}
125     BuiltIn.Should_Be_Equal_As_Integers    ${count}    ${eBGP_PEER1_PREFIX_COUNT}
126     ${count}=    Count_Key_Value_Pairs    ${iBGP_PEER1_LOG_FILE}    Network Address of Next Hop    ${eBGP_PEER2_NEXT_HOP}
127     BuiltIn.Should_Be_Equal_As_Integers    ${count}    0
128
129 Connect_eBGP_Peer2
130     [Documentation]    Connect BGP peer and check empty topology
131     [Tags]    critical
132     SSHLibrary.Switch Connection    ebgp_peer2_console
133     Start_Console_Tool    ${eBGP_PEER2_COMMAND}    ${eBGP_PEER2_OPTIONS}
134     Read_And_Fail_If_Prompt_Is_Seen
135
136 Disconnect_eBGP_Peer1
137     [Documentation]    Stop BGP peer, log topology and store logs
138     [Tags]    critical
139     SSHLibrary.Switch Connection    ebgp_peer1_console
140     Stop_Console_Tool
141     Store_File_To_Workspace    ${eBGP_PEER1_LOG_FILE}    ${eBGP_PEER1_LOG_FILE}
142
143 Check_IPv4_Topology_For_Second_Path
144     [Documentation]    The IPv4 topology shall contain the route announced by the second eBGP now
145     BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    "node-id":"${eBGP_PEER2_NEXT_HOP}"
146     Check_Example_IPv4_Topology_Content    "prefix":"${eBGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"
147
148 iBGP_Check_Log_For_Updated_Prefixes
149     [Documentation]    Check incomming updates for updated routes
150     [Tags]    critical
151     SSHLibrary.Switch Connection    ibgp_peer1_console
152     ${total_prefix_count}=    BuiltIn.Evaluate    ${eBGP_PEER1_PREFIX_COUNT} + ${eBGP_PEER2_PREFIX_COUNT}
153     BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_LOG_CHECK_TIMEOUT}    ${DEFAULT_LOG_CHECK_PERIOD}    Check_File_For_Word_Count    ${iBGP_PEER1_LOG_FILE}    nlri_prefix_received:    ${total_prefix_count}
154     ${count}=    Count_Key_Value_Pairs    ${iBGP_PEER1_LOG_FILE}    Network Address of Next Hop    ${eBGP_PEER1_NEXT_HOP}
155     BuiltIn.Should_Be_Equal_As_Integers    ${count}    ${eBGP_PEER1_PREFIX_COUNT}
156     ${count}=    Count_Key_Value_Pairs    ${iBGP_PEER1_LOG_FILE}    Network Address of Next Hop    ${eBGP_PEER2_NEXT_HOP}
157     BuiltIn.Should_Be_Equal_As_Integers    ${count}    ${eBGP_PEER2_PREFIX_COUNT}
158     [Teardown]    Report_Failure_Due_To_Bug    4834
159
160 Disconnect_eBGP_Peer2
161     [Documentation]    Stop BGP peer, store logs and wait for empty topology
162     [Tags]    critical
163     SSHLibrary.Switch Connection    ebgp_peer2_console
164     Stop_Console_Tool
165     Store_File_To_Workspace    ${eBGP_PEER2_LOG_FILE}    ${eBGP_PEER2_LOG_FILE}
166
167 Check_For_Empty_IPv4_Topology
168     [Documentation]    The IPv4 topology shall be empty
169     BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Does_Not_Contain    prefix
170     [Teardown]    Report_Failure_Due_To_Bug    4835
171
172 iBGP_Check_Log_For_Withdrawn_Prefixes
173     [Documentation]    Check incomming updates for withdrawn routes
174     [Tags]    critical
175     SSHLibrary.Switch Connection    ibgp_peer1_console
176     ${prefixes_to_be_removed}=    BuiltIn.Evaluate    max(${eBGP_PEER1_PREFIX_COUNT}, ${eBGP_PEER2_PREFIX_COUNT})
177     BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_LOG_CHECK_TIMEOUT}    ${DEFAULT_LOG_CHECK_PERIOD}    Check_File_For_Word_Count    ${iBGP_PEER1_LOG_FILE}    withdrawn_prefix_received:    ${prefixes_to_be_removed}
178     [Teardown]    Report_Failure_Due_To_Bug    4835
179
180 Disconnect_iBGP_Peer1
181     [Documentation]    Stop BGP peer, log topology and store logs
182     [Tags]    critical
183     SSHLibrary.Switch Connection    ibgp_peer1_console
184     Stop_Console_Tool
185     Store_File_To_Workspace    ${iBGP_PEER1_LOG_FILE}    ${iBGP_PEER1_LOG_FILE}
186
187 Delete_BGP_Peers_Configuration
188     [Documentation]    Delete all previously configured BGP peers.
189     [Tags]    critical
190     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ibgp-peer1'}
191     ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    ${template_as_string}
192     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ebgp-peer1'}
193     ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    ${template_as_string}
194     ${template_as_string}=    BuiltIn.Set_Variable    {'NAME': 'example-ebgp-peer2'}
195     ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    ${template_as_string}
196
197 *** Keywords ***
198 Setup_Everything
199     [Documentation]    SSH-login to mininet machine, create HTTP session,
200     ...    prepare directories for responses, put Python tool to mininet machine, setup imported resources.
201     SetupUtils.Setup_Utils_For_Setup_And_Teardown
202     SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
203     SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}    alias=ibgp_peer1_console
204     Utils.Flexible_Controller_Login
205     SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}    alias=ebgp_peer1_console
206     Utils.Flexible_Controller_Login
207     SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}    alias=ebgp_peer2_console
208     Utils.Flexible_Controller_Login
209     SSHKeywords.Require_Python
210     SSHKeywords.Assure_Library_Ipaddr    target_dir=.
211     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
212     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API}    auth=${AUTH}
213     ConfigViaRestconf.Setup_Config_Via_Restconf
214     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_LOG_LEVEL}
215     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep
216     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol
217
218 Teardown_Everything
219     [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
220     ...    Tear down imported Resources.
221     KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
222     ConfigViaRestconf.Teardown_Config_Via_Restconf
223     RequestsLibrary.Delete_All_Sessions
224     SSHLibrary.Close_All_Connections
225
226 Start_Console_Tool
227     [Arguments]    ${command}    ${tool_opt}
228     [Documentation]    Start the tool ${command} ${tool_opt}
229     BuiltIn.Log    ${command}
230     ${output}=    SSHLibrary.Write    ${command} ${tool_opt}
231     BuiltIn.Log    ${output}
232
233 Wait_Until_Console_Tool_Finish
234     [Arguments]    ${timeout}
235     [Documentation]    Wait ${timeout} for the tool exit.
236     BuiltIn.Wait Until Keyword Succeeds    ${timeout}    1s    SSHLibrary.Read Until Prompt
237
238 Stop_Console_Tool
239     [Documentation]    Stop the tool if still running.
240     Utils.Write_Bare_Ctrl_C
241     BuiltIn.Wait Until Keyword Succeeds    10s    1s    SSHLibrary.Read Until Prompt
242
243 Read_And_Fail_If_Prompt_Is_Seen
244     [Documentation]    Try to read SSH to see prompt, but expect to see no prompt within SSHLibrary's timeout.
245     ${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
246     BuiltIn.Return_From_Keyword_If    ${passed}
247     BGPSpeaker.Dump_BGP_Speaker_Logs
248     Builtin.Fail    The prompt was seen but it was not expected yet
249
250 Read_Text_Before_Prompt
251     [Documentation]    Log text gathered by SSHLibrary.Read_Until_Prompt.
252     ...    This needs to be a separate keyword just because how Read_And_Fail_If_Prompt_Is_Seen is implemented.
253     ${text}=    SSHLibrary.Read_Until_Prompt
254     BuiltIn.Log    ${text}
255
256 Check_Example_IPv4_Topology_Content
257     [Arguments]    ${string_to_check}=${EMPTY}
258     [Documentation]    Check the example-ipv4-topology content for string
259     ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
260     BuiltIn.Log    ${response.status_code}
261     BuiltIn.Log    ${response.text}
262     BuiltIn.Should_Contain    ${response.text}    ${string_to_check}
263
264 Check_Example_IPv4_Topology_Does_Not_Contain
265     [Arguments]    ${string_to_check}
266     [Documentation]    Check the example-ipv4-topology does not contain the string
267     ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
268     BuiltIn.Log    ${response.status_code}
269     BuiltIn.Log    ${response.text}
270     BuiltIn.Should_Not_Contain    ${response.text}    ${string_to_check}
271
272 Store_File_To_Workspace
273     [Arguments]    ${source_file_name}    ${target_file_name}
274     [Documentation]    Store the ${source_file_name} to the workspace as ${target_file_name}.
275     ${output_log}=    SSHLibrary.Execute_Command    cat ${source_file_name}
276     BuiltIn.Log    ${output_log}
277     Create File    ${target_file_name}    ${output_log}
278
279 Check_File_For_Word_Count
280     [Arguments]    ${file_name}    ${word}    ${expected_count}
281     [Documentation]    Count ${word} in ${file_name}. Expect ${expected_count} occurence(s)
282     ${output_log}=    SSHLibrary.Execute_Command    grep -o '${word}' ${file_name} | wc -l
283     BuiltIn.Log    ${output_log}
284     BuiltIn.Should_Be_Equal_As_Strings    ${output_log}    ${expected_count}
285
286 Count_Key_Value_Pairs
287     [Arguments]    ${file_name}    ${keyword}    ${value}=''
288     [Documentation]    Check file for ${keyword} or ${keyword} ${value} pair and returns number of occurences
289     ${output_log}=    SSHLibrary.Execute_Command    grep '${keyword}' ${file_name} | grep -c ${value}
290     ${count}=    Convert To Integer    ${output_log}
291     [Return]    ${count}