blob: 908d82928797b5750b4651d0a60be410af4e7dff [file] [log] [blame]
Matteo Scandoloa229eca2017-08-08 13:05:28 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Rich Lane1568b652013-01-04 16:53:13 -080017"""
18These tests require a switch that drops packet-ins.
19"""
20
21import logging
22
23from oftest import config
24import oftest.controller as controller
Rich Laned7b0ffa2013-03-08 15:53:42 -080025import ofp
Rich Lane1568b652013-01-04 16:53:13 -080026import oftest.dataplane as dataplane
Rich Lane1568b652013-01-04 16:53:13 -080027import oftest.base_tests as base_tests
28
29from oftest.testutils import *
30
31@nonstandard
32class PacketInDefaultDrop(base_tests.SimpleDataPlane):
33 """
34 Verify that packet-ins are not received.
35 """
36
37 def runTest(self):
38 delete_all_flows(self.controller)
39 do_barrier(self.controller)
40
41 for of_port in config["port_map"].keys():
Rich Lane4c504f32013-06-07 17:24:14 -070042 pkt = str(simple_tcp_packet())
43 self.dataplane.send(of_port, pkt)
44 verify_no_packet_in(self, pkt, of_port)