2 Documentation controller1 fails
5 Library RequestsLibrary
6 Library ../../libraries/Common.py
7 Variables ../../variables/Variables.py
10 ${node1} "00:00:00:00:00:00:00:01"
11 ${node2} "00:00:00:00:00:00:00:02"
12 ${node3} "00:00:00:00:00:00:00:03"
13 ${REST_CONTEXT} /controller/nb/v2/topology
14 ${REST_CONTEXT_ST} /controller/nb/v2/statistics
15 ${CONTROLLER1} 10.125.136.38:6633
16 ${CONTROLLER2} 10.125.136.43:6633
17 ${Controller1_IP} 10.125.136.38
18 ${Controller2_IP} 10.125.136.43
24 [Documentation] C1 fails suddenly
25 Open Connection ${Controller1_IP} prompt=$
26 Login With Public Key odluser ${USER_HOME}/.ssh/id_rsa any
27 Write cd controller-base/opendaylight
32 C2 takes over and verifying the bridges
33 [Documentation] C2 is taking over from c1 failure
35 ${stdout}= Execute Command sudo ovs-vsctl show
37 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER2}" 3
39 Should Contain X Times ${stdout} is_connected: true 3
41 Verifying the topology in C2
42 [Documentation] Get Topology for C2 and validate the result.
44 Create Session session http://${Controller2_IP}:8080 headers=${HEADERS} auth=${auth}
45 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
46 Should Be Equal As Strings ${resp.status_code} 200
48 Should Contain X Times ${resp.content} ${node1} 4
49 Should Contain X Times ${resp.content} ${node2} 2
50 Should Contain X Times ${resp.content} ${node3} 2
52 Check flow in flow stats in C2
53 [Documentation] Checking the flow stats and validating the result in C2
56 Create Session session http://${Controller2_IP}:8080 headers=${HEADERS} auth=${auth}
57 ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
58 Should Be Equal As Strings ${resp.status_code} 200
60 Should Contain ${resp.content} ${FLOW}