1*** Settings ***
2
3Documentation  Verify that the OS network interfaces are configured and
4...  stable.
5
6# TEST PARAMETERS:
7#   OS_HOST                     The OS host name or IP address.
8#   OS_USERNAME                 The OS user name.
9#   OS_PASSWORD                 The OS Host password.
10#   FAIL_ON_LINK_DOWN           If set to 1, the test will exit if
11#                               a link is down. Default is 1.
12
13Resource         ../syslib/utils_install.robot
14
15Force Tags       Host_Network_Interfaces
16
17*** Variables ***
18
19${FAIL_ON_LINK_DOWN}  1
20
21
22*** Test Cases ***
23Verify Network Interfaces
24    [Documentation]  Verify the states of all system interfaces.
25    [Tags]  Verify_Network_Interfaces
26
27    Printn
28    REST Power On
29    @{interface_names}=  Get OS Network Interface Names
30    FOR  ${interface_name}  IN  @{interface_names}
31       ${ethtool_dict}=  Get OS Ethtool  ${interface_name}
32       Run Keyword If  ${FAIL_ON__LINK_DOWN} == 1
33       ...  Should Be Equal  ${ethtool_dict['link_detected']}  yes
34       ...  msg=Link ${interface_name} is down.
35    END
36