1
2 '''
3 Created on 28-Nov-2012
4
5 @author: Anil Kumar (anilkumar.s@paxterrasolutions.com)
6
7
8 TestON is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12
13 TestON is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with TestON. If not, see <http://www.gnu.org/licenses/>.
20 '''
22 '''
23
24 This example shows, how we can use the topology file:
25
26 In topo file we can specify the component like below:
27 [TOPOLOGY]
28
29 [[COMPONENT]]
30 [[["Mininet1"]]]
31
32 The usage of this component in the test script like below:
33
34 main.Mininet1.checkIP(main.params['CASE1']['destination'])
35
36 Here we are using the Mininet1 which of type Mininet
37
38
39
40 ofautomation>run Topology example 1
41 will execute this example.
42 '''
45
47 '''
48 This will showcase the usage of Topology
49 '''
50 main.case("Usage of Topology")
51 main.step("Mininet1 specified in Topology , using the Mininet1 to check host ip")
52 result = main.Mininet1.checkIP(main.params['CASE1']['destination'])
53 main.step("Verifying the result")
54 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
55