2 Documentation Introducing switches to both the controllers C1 and C2
3 Suite Teardown Delete All Sessions
6 Library RequestsLibrary
7 Library ../../libraries/Common.py
8 Variables ../../variables/Variables.py
11 ${node1} "00:00:00:00:00:00:00:01"
12 ${node2} "00:00:00:00:00:00:00:02"
13 ${node3} "00:00:00:00:00:00:00:03"
16 ${REST_CONTEXT_P} /controller/nb/v2/flowprogrammer
17 ${REST_CONTEXT_ST} /controller/nb/v2/statistics
18 ${CONTROLLER1} 10.125.136.38:6633
19 ${CONTROLLER2} 10.125.136.43:6633
20 ${Controller1_IP} 10.125.136.38
21 ${Controller2_IP} 10.125.136.43
22 ${node_id} 00:00:00:00:00:00:00:02
28 [Documentation] Adding a flow, list to validate the result in C1
30 ${node} Create Dictionary type OF id ${node_id}
31 ${actions} Create List OUTPUT=1
32 ${body} Create Dictionary name ${name} installInHw true node
33 ... ${node} priority 1 etherType 0x800 nwDst
34 ... 10.0.0.1/32 actions ${actions}
35 Create Session session http://${Controller1_IP}:8080 auth=${AUTH} headers=${HEADERS}
36 ${resp} Put session ${REST_CONTEXT_P}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
37 Should Be Equal As Strings ${resp.status_code} 201
40 Check flow stats in C1
41 [Documentation] Checking the flow stats and validating the result in C1
44 Create Session session http://${Controller1_IP}:8080 auth=${AUTH} headers=${HEADERS}
45 ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
46 Should Be Equal As Strings ${resp.status_code} 200
48 Should Contain ${resp.content} ${FLOW}
51 Check flow stats in C2
52 [Documentation] Checking the flow stats and validating the result in C2
55 Create Session session http://${Controller2_IP}:8080 auth=${AUTH} headers=${HEADERS}
56 ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
57 Should Be Equal As Strings ${resp.status_code} 200
59 Should Contain ${resp.content} ${FLOW}