Complete complex scenario 1
Change-Id: I1c14fd5ffe017523bf32f12efc150711880ed71d
diff --git a/olt.py b/olt.py
index 13c997a..42ee55d 100644
--- a/olt.py
+++ b/olt.py
@@ -57,15 +57,10 @@
match.oxm_list.append(ofp.oxm.eth_type(0x800))
match.oxm_list.append(ofp.oxm.ip_proto(2))
- igmp = IGMPv3(type=IGMP_TYPE_V3_MEMBERSHIP_REPORT, max_resp_code=30, gaddr="224.0.0.1")
- igmp.grps = [IGMPv3gr(rtype=IGMP_V3_GR_TYPE_INCLUDE, mcaddr="229.10.20.30")]
- pkt = IGMPv3.fixup( scapy.Ether(src='00:00:00:00:be:ef', dst='01:00:5e:00:00:01') \
- / scapy.IP(src='192.168.0.123', dst='224.0.0.22') / igmp )
- if len(pkt) < 60:
- pad_len = 60 - len(pkt)
- pad = scapy.PAD()
- pad.load = '\x00' * pad_len
- pkt = pkt/pad
+ mcast_group = "229.10.20.30"
+ ip_src = '192.168.0.123'
+ ip_dst = '224.0.0.22'
+ pkt = self.buildIgmpReport(ip_src, ip_dst, '00:00:00:00:be:ef', join=[mcast_group], pad_to=60)
self.testPacketIn(match, pkt)
@@ -77,7 +72,7 @@
logging.info("Running IGMP query packet out")
igmp = IGMPv3() # by default this is a query
- pkt = buildIgmp(igmp)
+ pkt = self.buildIgmp(igmp)
msg = ofp.message.packet_out(
in_port=ofp.OFPP_CONTROLLER,
@@ -278,9 +273,6 @@
verify_packets(self, outPkt, [])
-
-
-
class TestGroupAdd(OltBaseTest):
def runTest(self):
@@ -743,7 +735,7 @@
self.assertTrue(len(stats) == 5, \
"Wrong number of rules reports; reported %s, expected 5\n\n %s" % (len(stats), stats))
- self.processEapolRule(onu_port, install = False)
+ self.processEapolRule(onu_port, install=False)
time.sleep(3)
stats = get_flow_stats(self, ofp.match())
@@ -770,11 +762,11 @@
time.sleep(1)
- self.installDoubleTaggingRules(10, 5, cookie=42, onu = onu_port)
+ self.installDoubleTaggingRules(10, 5, cookie=42, onu=onu_port)
time.sleep(1)
- self.installDoubleTaggingRules(10, 30, cookie=50, onu = onu_port2)
+ self.installDoubleTaggingRules(10, 30, cookie=50, onu=onu_port2)
time.sleep(1)
@@ -820,13 +812,3 @@
self.installDoubleTaggingRules(stag, ctag)
time.sleep(5)
self.testPacketFlow(stag, ctag)
-
-
-
-
-
-
-
-
-
-