blob: 678cdaa7406d10c9e479d25c2be3e43c7cbce4c1 [file] [log] [blame]
adminbae64d82013-08-01 10:50:15 -07001'''
2
3 * TestON is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7
8 * TestON is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12
13
14'''
15class FvtTest :
16
17 def __init__(self) :
18 self.default = ''
19
20 def CASE1(self,main) :
21
22
23 main.case("Checking FVT")
24 main.step("Checking the FVT")
25 pkt = main.FVT.simplePacket("SRC_MAC_FOR_CTL0_0")
26 in_port = 3
27 msg = main.FVT.genPacketIn(in_port=in_port, pkt=pkt)
28 snd_list = ["switch", 0, msg]
29 exp_list = [["controller", 0, msg]]
30 res = main.FVT.ofmsgSndCmp(snd_list , exp_list , xid_ignore=True, hdr_only=True)
31 utilities.assert_equals(expect=True,actual=res,onpass="Received expected message",onfail="Received unexpected message")
32
33 #Packet_in for controller1
34 pkt = main.FVT.simplePacket("SRC_MAC_FOR_CTL1_0")
35 in_port = 3
36 msg = main.FVT.genPacketIn(in_port=in_port, pkt=pkt)
37 snd_list = ["switch", 0, msg]
38 exp_list = [["controller", 1, msg]]
39 res = main.FVT.ofmsgSndCmp(snd_list , exp_list , xid_ignore=True)
40 utilities.assert_equals(expect=True,actual=res,onpass="Received expected message",onfail="Received unexpected message")