2 Documentation ODL controller clustering test case using the gherkin syntax.
4 ... This test has a workflow similar to the keyword-driven
5 ... examples. The difference is that the keywords use higher
6 ... abstraction level and their arguments are embedded into
9 ... This kind of _gherkin_ syntax has been made popular by
10 ... [http://cukes.info|Cucumber]. It works well especially when
11 ... tests act as examples that need to be easily understood also
12 ... by the business people.
14 Library Selenium2Library
17 Library RequestsLibrary
18 Library ../../libraries/Common.py
19 Variables ../../variables/Variables.py
23 Controller1 and Controller2 fail
24 Given C1 a controller in cluster of two controllers
25 And C2 a controllers in cluster of two controllers
26 And all switches are introduced to both controllers
29 Then the system does not work any more
34 Open Connection ${Controller1_IP} prompt=>
35 Login ${VM USERNAME} ${VM PASSWORD}
36 Write cd controller-base/opendaylight
37 Write sudo ./run.sh -stop
38 Set Selenium Speed ${DELAY2}
39 Open Browser ${LOGIN URL1} ${BROWSER}
40 Maximize Browser Window
41 Set Selenium Speed ${DELAY}
42 Location Should Be ${ERROR URL1}
43 Title Should Be Problem loading page
44 [Teardown] Close Browser
47 Open Connection ${Controller2_IP} prompt=>
48 Login ${VM USERNAME} ${VM PASSWORD}
49 Write cd controller-base/opendaylight
50 Write sudo ./run.sh -stop
51 Set Selenium Speed ${DELAY2}
52 Open Browser ${LOGIN URL2} ${BROWSER}
53 Maximize Browser Window
54 Set Selenium Speed ${DELAY}
55 Location Should Be ${ERROR URL2}
56 Title Should Be Problem loading page
57 [Teardown] Close Browser
60 C1 a controller in cluster of two controllers
61 # Open Connection ${Controller1_IP} prompt=>
62 # Login ${VM USERNAME} ${VM PASSWORD}
63 # Write cd controller-base/opendaylight
64 # Write sudo ./run.sh -Dsupernodes=${Controller1_IP}:${Controller2_IP} -start
65 Open Connection ${HOST}
66 Login ${VM USERNAME} ${VM PASSWORD}
67 ${stdout}= Execute Command sudo ovs-vsctl show
68 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER1}" 3
72 C2 a controller in cluster of two controllers
73 # Open Connection ${Controller2_IP} prompt=>
74 # Login ${VM USERNAME} ${VM PASSWORD}
75 # Write cd controller-base/opendaylight
76 # Write sudo ./run.sh -Dsupernodes=${Controller1_IP}:${Controller2_IP} -start
77 Open Connection ${HOST}
78 Login ${VM USERNAME} ${VM PASSWORD}
79 ${stdout}= Execute Command sudo ovs-vsctl show
80 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER2}" 3
83 all switches are introduced to both controllers
84 Open Connection ${HOST}
85 Login ${VM USERNAME} ${VM PASSWORD}
86 # ${stdout1}= Execute Command sudo ovs-vsctl set-controller s1 tcp:${CONTROLLER1} tcp:${CONTROLLER2}
87 # ${stdout2}= Execute Command sudo ovs-vsctl set-controller s2 tcp:${CONTROLLER1} tcp:${CONTROLLER2}
88 # ${stdout2}= Execute Command sudo ovs-vsctl set-controller s3 tcp:${CONTROLLER1} tcp:${CONTROLLER2}
89 ${stdout}= Execute Command sudo ovs-vsctl show
90 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER1}" 3
91 Should Contain X Times ${stdout} Controller "tcp:${CONTROLLER2}" 3
92 Should Contain ${stdout} Bridge "s1"
93 Should Contain ${stdout} Bridge "s2"
94 Should Contain ${stdout} Bridge "s3"
95 Should Contain X Times ${stdout} is_connected: true 6
96 ${stdout}= Execute Command sudo ovs-vsctl get-controller "s1"
97 Should Contain ${stdout} ${CONTROLLER1}
98 Should Contain ${stdout} ${CONTROLLER2}
99 ${stdout}= Execute Command sudo ovs-vsctl get-controller "s2"
100 Should Contain ${stdout} ${CONTROLLER1}
101 Should Contain ${stdout} ${CONTROLLER2}
102 ${stdout}= Execute Command sudo ovs-vsctl get-controller "s3"
103 Should Contain ${stdout} ${CONTROLLER1}
104 Should Contain ${stdout} ${CONTROLLER2}
107 the system does not work any more
108 Open Connection ${HOST}
109 Login ${VM USERNAME} ${VM PASSWORD}
110 ${stdout}= Execute Command sudo ovs-vsctl show
111 Should Not Contain ${stdout} is_connected: true