X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fovs-ofctl.at;h=4550a8df6a6f0b44631f02477257f7f009098eda;hb=ff14eb7ac9569ae09f7dc6672667cff907b35fc6;hp=cbd6aeca1eb4e9ec521631d92da87a36fa3cf0b7;hpb=04f01c24b522f893b663a34126beb6775176e536;p=sliver-openvswitch.git diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at index cbd6aeca1..4550a8df6 100644 --- a/tests/ovs-ofctl.at +++ b/tests/ovs-ofctl.at @@ -139,6 +139,43 @@ OFPT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_d ]]) AT_CLEANUP +AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.1)]) +AT_DATA([flows.txt], [[ +# comment +tcp,tp_src=123,out_port=5,actions=flood +in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop +udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0 +tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1 +udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1 +cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller +actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note +ip,actions=set_field:10.4.3.77->ip_src +sctp actions=drop +sctp actions=drop +in_port=0 actions=resubmit:0 +actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678) +]]) + +AT_CHECK([ovs-ofctl --protocols OpenFlow11 parse-flows flows.txt +], [0], [stdout]) +AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], +[[usable protocols: any +chosen protocol: OpenFlow11 +OFPT_FLOW_MOD (OF1.1): ADD table:255 tcp,tp_src=123 out_port:5 actions=FLOOD +OFPT_FLOW_MOD (OF1.1): ADD table:255 in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop +OFPT_FLOW_MOD (OF1.1): ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0 +OFPT_FLOW_MOD (OF1.1): ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1 +OFPT_FLOW_MOD (OF1.1): ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1 +OFPT_FLOW_MOD (OF1.1): ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535 +OFPT_FLOW_MOD (OF1.1): ADD table:255 actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00 +OFPT_FLOW_MOD (OF1.1): ADD table:255 ip actions=load:0xa04034d->NXM_OF_IP_SRC[] +OFPT_FLOW_MOD (OF1.1): ADD table:255 sctp actions=drop +OFPT_FLOW_MOD (OF1.1): ADD table:255 sctp actions=drop +OFPT_FLOW_MOD (OF1.1): ADD table:255 in_port=0 actions=resubmit:0 +OFPT_FLOW_MOD (OF1.1): ADD table:255 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678) +]]) +AT_CLEANUP + AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.2)]) AT_DATA([flows.txt], [[ # comment