2 Documentation Test suite for LACP Link Resiliency
7 Library RequestsLibrary
8 Library ../../../libraries/Common.py
9 Resource ../../../libraries/Utils.robot
10 Variables ../../../variables/Variables.py
12 Suite Setup LACP Inventory Suite Setup
13 Suite Teardown Delete All Sessions
20 ${agg1-connector-id1} 1
21 ${agg1-connector-id2} 2
22 ${agg2-connector-id1} 3
23 ${agg2-connector-id2} 4
27 Verify the Group tables data for Switch(S1)
28 [Documentation] Functionality would check the presence of group tables entries on OVS Switch(S1) initially
29 Verify Switch S1 Group Table select 1 2 up
30 Verify Switch S1 Group Table select 3 4 up
32 Generate port down scenario of one of the LAG interface on the Host H2 side and check functionality
33 [Documentation] Generate the link failure on Host H2 LAG Membership-port and verify functionality
34 Set Host interface state h2-eth1 down
36 Verify information of lacp-aggregator associated with Host H2 after link down scenario
37 [Documentation] Get lacp-aggregator data for node associated with Host H2
38 Wait Until Keyword Succeeds 15s 1s Verify LACP aggregator data is updated post link down scenario
40 Verify the Switch(S1) Group tables data after H2 link down scenario
41 [Documentation] Functionality to check if the corresponding group entries are updated on OVS Switch(S1) after port-down scenario on the Host H2
42 Verify Switch S1 Group Table select 3 4 down
44 Generate port up scenario of the LAG interface on the Host H2 side and check functionality
45 [Documentation] Generate the link up scenario on Host H2 LAG Membership-port and verify functionality
46 Set Host interface state h2-eth1 up
48 Verify information of lacp-aggregator associated with Host H2 after link up scenario
49 [Documentation] Get lacp-aggregator data for node associated with Host H2
50 Wait Until Keyword Succeeds 15s 1s Verify LACP aggregator data is updated post link up scenario
52 Verify Switch(S1) Flow and Group tables data after H2 link up scenario
53 [Documentation] Functionality to check if the corresponding group entries are updated on OVS Switch(S1) after port-bringup scenario on the Host H2
54 Verify Switch S1 Group Table select 3 4 up
58 Verify LACP RESTAPI Response Code for node
59 [Documentation] Will check for the response code of the REST query
61 Should Be Equal As Strings ${resp.status_code} 200
62 Should Contain ${resp.content} ${node1}
64 Verify LACP RESTAPI Aggregator and Tag Contents
65 [Documentation] Will check for the LACP Specific tags or Aggregator ID for node
66 [Arguments] ${resp.content} ${content-lookup}
67 Should Contain ${resp.content} ${content-lookup}
69 Verify LACP RESTAPI connector associated for aggregator
70 [Documentation] Will check for the LACP connector info for each aggregator
71 [Arguments] ${resp.content} ${node} ${agg-connector-id}
72 Should Contain ${resp.content} ${node}:${agg-connector-id}
74 Verify LACP aggregator data is updated post link down scenario
75 [Documentation] Functionality will verify the node conenctor data on the lacp-agg api after link down scenario
76 ${resp} RequestsLibrary.Get Request
78 ... ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
79 Verify LACP RESTAPI Response Code for node ${resp}
80 Verify LACP RESTAPI connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id1}
81 Should not Contain ${resp.content} ${node1}:${agg2-connector-id2}
82 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lag-groupid
84 Verify LACP aggregator data is updated post link up scenario
85 [Documentation] Functionality will verify the node connector data on the lacp-agg api after link up scenario
86 ${resp} RequestsLibrary.Get Request
88 ... ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
89 Verify LACP RESTAPI Response Code for node ${resp}
90 Verify LACP RESTAPI connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id1}
91 Verify LACP RESTAPI connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id2}
92 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lag-groupid
94 Verify LACP Tags Are Formed
95 [Documentation] Fundamental Check That LACP is working
96 ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_NODES_API}
97 Verify LACP RESTAPI Response Code for node ${resp}
98 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} non-lag-groupid
99 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lacp-aggregators
101 LACP Inventory Suite Setup
102 [Documentation] If these basic checks fail, there is no need to continue any of the other test cases
103 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
104 Wait Until Keyword Succeeds 15s 1s Verify LACP Tags Are Formed
106 Set Host interface state
107 [Documentation] Will configure the port state of the Host to either up or down
108 [Arguments] ${port-id} ${port-state}
109 Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT}
110 Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
112 Write sudo ifconfig ${port-id}
113 Write sudo ifconfig ${port-id} ${port-state}
115 Verify Switch S1 Group Table
116 [Documentation] Functionality to verify the presence of LACP group entries on the OVS Switch(S1) Group table
117 [Arguments] ${group-type} ${port-id1} ${port-id2} ${port-id2-state}
119 ${group_output} Run Command on Remote System
120 ... ${TOOLS_SYSTEM_IP}
121 ... sudo ovs-ofctl dump-groups s1 -O OpenFlow13
122 ... ${TOOLS_SYSTEM_USER}
124 Comment ${group_output} Read Until mininet>
125 ${result} Get Lines Containing String ${group_output} output:${port-id1}
126 Should Contain ${result} type=${group-type}
127 Should Contain ${result} output:${port-id1}
128 IF "${port-id2-state}" == "up"
129 Should Contain ${result} output:${port-id2}
131 Should not Contain ${result} output:${port-id2}