Package TestON :: Package examples :: Package Topology :: Module Topology
[hide private]
[frames] | no frames]

Source Code for Module TestON.examples.Topology.Topology

 1  #!/usr/bin/env python 
 2  ''' 
 3  Created on 28-Nov-2012 
 4   
 5  @author: Anil Kumar (anilkumar.s@paxterrasolutions.com) 
 6  '''   
7 -class Topology:
8 ''' 9 10 This example shows, how we can use the topology file: 11 12 In topo file we can specify the component like below: 13 [TOPOLOGY] 14 15 [[COMPONENT]] 16 [[["Mininet1"]]] 17 18 The usage of this component in the test script like below: 19 20 main.Mininet1.checkIP(main.params['CASE1']['destination']) 21 22 Here we are using the Mininet1 which of type Mininet 23 24 25 26 ofautomation>run Topology example 1 27 will execute this example. 28 '''
29 - def __init__(self):
30 self.default = ""
31
32 - def CASE1(self,main):
33 ''' 34 This will showcase the usage of Topology 35 ''' 36 main.case("Usage of Topology") 37 main.step("Mininet1 specified in Topology , using the Mininet1 to check host ip") 38 result = main.Mininet1.checkIP(main.params['CASE1']['destination']) 39 main.step("Verifying the result") 40 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
41