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=${node}
33 ... priority=1 etherType=0x800 nwDst=10.0.0.1/32 actions=${actions}
34 Create Session session http://${Controller1_IP}:8080 auth=${AUTH} headers=${HEADERS}
35 ${resp} Put session ${REST_CONTEXT_P}/${CONTAINER}/node/OF/${node_id}/staticFlow/${name} data=${body}
36 Should Be Equal As Strings ${resp.status_code} 201
39 Check flow stats in C1
40 [Documentation] Checking the flow stats and validating the result in C1
43 Create Session session http://${Controller1_IP}:8080 auth=${AUTH} headers=${HEADERS}
44 ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
45 Should Be Equal As Strings ${resp.status_code} 200
47 Should Contain ${resp.content} ${FLOW}
50 Check flow stats in C2
51 [Documentation] Checking the flow stats and validating the result in C2
54 Create Session session http://${Controller2_IP}:8080 auth=${AUTH} headers=${HEADERS}
55 ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
56 Should Be Equal As Strings ${resp.status_code} 200
58 Should Contain ${resp.content} ${FLOW}