X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftemplate_bd.py;h=291f4684db9b332697f712ca93e8105aa49f5f79;hb=09cce66888f622af285e92ae05f76462a5a6d3b5;hp=ae17135198462cad9b627025240e4384d9557290;hpb=da505f608e0919c45089dc80f9e3e16330a6551a;p=vpp.git diff --git a/test/template_bd.py b/test/template_bd.py index ae171351984..291f4684db9 100644 --- a/test/template_bd.py +++ b/test/template_bd.py @@ -28,6 +28,11 @@ class BridgeDomain(object): UDP(sport=20000, dport=10000) / Raw('\xa5' * 100)) + @abstractmethod + def ip_range(self, start, end): + """ range of remote ip's """ + pass + @abstractmethod def encap_mcast(self, pkt, src_ip, src_mac, vni): """ Encapsulate mcast packet """ @@ -132,7 +137,8 @@ class BridgeDomain(object): # Pick first received frame and check if it's corectly encapsulated. out = self.pg0.get_capture(1) pkt = out[0] - self.check_encapsulation(pkt, self.mcast_flood_bd, True) + self.check_encapsulation(pkt, self.mcast_flood_bd, + local_only=False, mcast_pkt=True) payload = self.decapsulate(pkt) self.assert_eq_pkts(payload, self.frame_reply) @@ -147,8 +153,7 @@ class BridgeDomain(object): ip_range_end = 30 mcast_stream = [ self.encap_mcast(self.frame_request, ip, mac, self.mcast_flood_bd) - for ip in ip4_range(self.pg0.remote_ip4, - ip_range_start, ip_range_end)] + for ip in self.ip_range(ip_range_start, ip_range_end)] self.pg0.add_stream(mcast_stream) self.pg2.enable_capture() self.pg_start()