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
23 C1 recovers from failure
24 [Documentation] C1 recovers from failure
26 Write cd controller-base/opendaylight
32 [Documentation] C2 fails suddenly
33 Open Connection ${Controller2_IP} prompt=$
34 Login With Public Key odluser ${USER_HOME}/.ssh/id_rsa any
35 Write cd controller-base/opendaylight
40 C1 takes over and verifying the bridges
41 [Documentation] C1 is taking over from C2
43 ${stdout}= Execute Command sudo ovs-vsctl show
45 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER1}" 3
46 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER2}" 3
48 Verifying the topology in C1
49 [Documentation] Get Topology for C1 and validate the result.
51 Create Session session http://${Controller1_IP}:8080 headers=${HEADERS} auth=${auth}
52 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
53 Should Be Equal As Strings ${resp.status_code} 200
55 Should Contain X Times ${resp.content} ${node1} 4
56 Should Contain X Times ${resp.content} ${node2} 2
57 Should Contain X Times ${resp.content} ${node3} 2
59 Check flow in flow stats in C1
60 [Documentation] Checking the flow stats and validating the result in C1
63 ${resp} Get session ${REST_CONTEXT_ST}/${CONTAINER}/flow
64 Should Be Equal As Strings ${resp.status_code} 200
66 Should Contain ${resp.content} ${FLOW}