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"
14 ${REST_CONTEXT} /controller/nb/v2/topology
15 ${REST_CONTEXT_ST} /controller/nb/v2/statistics
16 ${CONTROLLER1} 10.125.136.38:6633
17 ${CONTROLLER2} 10.125.136.43:6633
18 ${Controller1_IP} 10.125.136.38
19 ${Controller2_IP} 10.125.136.43
24 Switches are introduced to both the controllers C1 & C2
25 [Documentation] Switches are introduced to both the controllers C1 & C2
28 ${stdout1}= Execute Command sudo ovs-vsctl set-controller s1 tcp:${CONTROLLER1} tcp:${CONTROLLER2}
29 ${stdout2}= Execute Command sudo ovs-vsctl set-controller s2 tcp:${CONTROLLER1} tcp:${CONTROLLER2}
30 ${stdout2}= Execute Command sudo ovs-vsctl set-controller s3 tcp:${CONTROLLER1} tcp:${CONTROLLER2}
31 ${stdout}= Execute Command sudo ovs-vsctl show
32 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER1}" 3
33 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER2}" 3
34 ${stdout}= Execute Command sudo ovs-vsctl get-controller "s1"
35 Should Contain ${stdout} ${CONTROLLER1}
36 Should Contain ${stdout} ${CONTROLLER2}
37 ${stdout}= Execute Command sudo ovs-vsctl get-controller "s2"
38 Should Contain ${stdout} ${CONTROLLER1}
39 Should Contain ${stdout} ${CONTROLLER2}
40 ${stdout}= Execute Command sudo ovs-vsctl get-controller "s3"
41 Should Contain ${stdout} ${CONTROLLER1}
42 Should Contain ${stdout} ${CONTROLLER2}
45 Verifying the topology in C1
46 [Documentation] Get Topology for C1 and validate the result.
48 Create Session session http://${Controller1_IP}:8080 headers=${HEADERS} auth=${auth}
49 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
51 Should Be Equal As Strings ${resp.status_code} 200
53 Should Contain X Times ${resp.content} ${node1} 4
54 Should Contain X Times ${resp.content} ${node2} 2
55 Should Contain X Times ${resp.content} ${node3} 2
57 Verifying the topology in C2
58 [Documentation] Get Topology for C2 and validate the result.
60 Create Session session http://${Controller2_IP}:8080 headers=${HEADERS} auth=${auth}
61 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
63 Should Be Equal As Strings ${resp.status_code} 200
65 Should Contain X Times ${resp.content} ${node1} 4
66 Should Contain X Times ${resp.content} ${node2} 2
67 Should Contain X Times ${resp.content} ${node3} 2