Package TestON :: Package tests :: Package MininetTest :: Module MininetTest
[hide private]
[frames] | no frames]

Source Code for Module TestON.tests.MininetTest.MininetTest

 1  #!/usr/bin/env python 
 2  ''' 
 3  Created on 29-Oct-2012 
 4   
 5  @author: Anil Kumar (anilkumar.s@paxterrasolutions.com) 
 6  '''  
7 -class MininetTest:
8 ''' 9 Testing of the some basic Mininet functions included here 10 ''' 11
12 - def __init__(self):
13 self.default = ""
14
15 - def CASE1(self,main):
16 ''' 17 Testing the configuration of the host by using checkIP functionof Mininet driver 18 ''' 19 main.case("Testing the configuration of the host") 20 main.step("Host IP Checking using checkIP") 21 result = main.Mininet1.checkIP(main.params['CASE1']['destination']) 22 main.step("Verifying the result") 23 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured")
24
25 - def CASE2(self,main):
26 ''' 27 Testing of the reachability of the hosts by using pingall of Mininet driver 28 ''' 29 main.case("Testing Reachabilty of all the hosts") 30 main.step("Checking Hosts reachability by using pingall") 31 result = main.Mininet1.pingall() 32 main.step("Verifying the result") 33 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="All hosts are reacchable",onfail="Hosts are not reachable")
34