admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 1 | |
| 2 | class MininetTest : |
| 3 | |
| 4 | def __init__(self) : |
| 5 | self.default = '' |
| 6 | |
| 7 | def CASE1(self,main) : |
| 8 | |
| 9 | main.case("Testing the configuration of the host") |
| 10 | main.step("Host IP Checking using checkIP") |
admin | 530b4c9 | 2013-08-14 16:54:35 -0700 | [diff] [blame^] | 11 | main.ONOS1.start() |
admin | bae64d8 | 2013-08-01 10:50:15 -0700 | [diff] [blame] | 12 | result = main.Mininet1.checkIP(main.params['CASE1']['destination']) |
| 13 | main.step("Verifying the result") |
| 14 | utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Host h2 IP address configured",onfail="Host h2 IP address didn't configured") |
| 15 | |
| 16 | def CASE2(self,main) : |
| 17 | |
| 18 | main.case("Testing Reachabilty of all the hosts") |
| 19 | main.step("Checking Hosts reachability by using pingall") |
| 20 | result = main.Mininet1.pingall() |
| 21 | main.step("Verifying the result") |
| 22 | for source in main.params['SET1']['begin']: |
| 23 | main.log.info(str(main.params['SET1']['begin'][source])) |
| 24 | utilities.assert_equals(expect=main.TRUE,actual=result,onpass="All hosts are reacchable",onfail="Hosts are not reachable") |