From c90cfeaf1fb9902baa7f1d6702610c3cf4460def Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 1 Oct 2012 16:24:21 +0900 Subject: [PATCH] ofproto: Add del-flow based on table-id tests Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- tests/ofproto.at | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/ofproto.at b/tests/ofproto.at index fb82e017..455077ba 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -362,6 +362,38 @@ NXST_FLOW reply: OVS_VSWITCHD_STOP AT_CLEANUP +AT_SETUP([ofproto - del flows based on table id]) +OVS_VSWITCHD_START +AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1]) +AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,table=1,actions=1]) +AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl + cookie=0x1, in_port=1 actions=output:1 + cookie=0x2, table=1, in_port=2 actions=output:1 +NXST_FLOW reply: +]) +AT_CHECK([ovs-ofctl del-flows br0 table=0]) +AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl + cookie=0x2, table=1, in_port=2 actions=output:1 +NXST_FLOW reply: +]) +AT_CHECK([ovs-ofctl del-flows br0 table=1]) +AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl +NXST_FLOW reply: +]) +AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1]) +AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,table=1,actions=1]) +AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl + cookie=0x1, in_port=1 actions=output:1 + cookie=0x2, table=1, in_port=2 actions=output:1 +NXST_FLOW reply: +]) +AT_CHECK([ovs-ofctl del-flows br0]) +AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl +NXST_FLOW reply: +]) +OVS_VSWITCHD_STOP +AT_CLEANUP + AT_SETUP([ofproto - flow table configuration]) OVS_VSWITCHD_START # Check the default configuration. -- 2.30.2