2 Documentation Test suite for RESTCONF LACP inventory
6 Library RequestsLibrary
7 Library ../../../libraries/Common.py
8 Variables ../../../variables/Variables.py
10 Suite Setup LACP Inventory Suite Setup
11 Suite Teardown Delete All Sessions
18 ${agg1-connector-id1} 1
19 ${agg1-connector-id2} 2
20 ${agg2-connector-id1} 3
21 ${agg2-connector-id2} 4
25 Get the Specific Node Inventory and Lacp aggregator details
26 [Documentation] Get the lacp-aggregator data for specific node
27 ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}
28 Verify LACP RESTAPI Response Code for node ${resp}
29 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} ${agg-id1}
30 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} ${agg-id2}
32 Get information of each lacp-aggregator for a node
33 [Documentation] Get each lacp-aggregator data for a node
34 ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id1}
35 Verify LACP RESTAPI Response Code for node ${resp}
36 Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg1-connector-id1}
37 Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg1-connector-id2}
38 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lag-groupid
39 ${resp} Get Request session ${OPERATIONAL_NODES_API}/node/${node1}/lacp-aggregators/${agg-id2}
40 Verify LACP RESTAPI Response Code for node ${resp}
41 Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id1}
42 Verify LACP connector associated for aggregator ${resp.content} ${node1} ${agg2-connector-id2}
43 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lag-groupid
45 Get node connector data for node 1
46 [Documentation] Get the node connector inventory for node 1
49 ... ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id1}
50 Verify LACP RESTAPI Response Code for node ${resp}
51 Verify specific LACP node connector data for node ${resp.content} ${agg-id1} agg-id
54 ... ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg1-connector-id2}
55 Verify LACP RESTAPI Response Code for node ${resp}
56 Verify specific LACP node connector data for node ${resp.content} ${agg-id1} agg-id
59 ... ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id1}
60 Verify LACP RESTAPI Response Code for node ${resp}
61 Verify specific LACP node connector data for node ${resp.content} ${agg-id2} agg-id
64 ... ${OPERATIONAL_NODES_API}/node/${node1}/node-connector/${node1}:${agg2-connector-id2}
65 Verify LACP RESTAPI Response Code for node ${resp}
66 Verify specific LACP node connector data for node ${resp.content} ${agg-id2} agg-id
70 Verify LACP RESTAPI Response Code for node
71 [Documentation] Will check for the response code of the REST query
73 Should Be Equal As Strings ${resp.status_code} 200
74 Should Contain ${resp.content} ${node1}
76 Verify LACP RESTAPI Aggregator and Tag Contents
77 [Documentation] Will check for the LACP Specific tags or Aggregator ID for node
78 [Arguments] ${resp.content} ${content-lookup}
79 Should Contain ${resp.content} ${content-lookup}
81 Verify LACP connector associated for aggregator
82 [Documentation] Will check for the LACP connector info for each aggregator
83 [Arguments] ${resp.content} ${node} ${agg-connector-id}
84 Should Contain ${resp.content} ${node}:${agg-connector-id}
86 Verify specific LACP node connector data for node
87 [Documentation] Will check for node connectory info for node
88 [Arguments] ${resp.content} ${agg-id} ${connector}
89 Should Contain ${resp.content} ${connector}='${agg-id}'
91 Verify LACP Tags Are Formed
92 [Documentation] Fundamental Check That LACP is working
93 ${resp} Get Request session ${OPERATIONAL_NODES_API}
94 Verify LACP RESTAPI Response Code for node ${resp}
95 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} non-lag-groupid
96 Verify LACP RESTAPI Aggregator and Tag Contents ${resp.content} lacp-aggregators
98 LACP Inventory Suite Setup
99 [Documentation] If these basic checks fail, there is no need to continue any of the other test cases
100 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
101 Wait Until Keyword Succeeds 10s 1s Verify LACP Tags Are Formed