Signed-off-by: Shinpei Muraoka <[email protected]>
---
 .../of13/ovs-ofctl-of13-action_output_trunc.packet | Bin 0 -> 80 bytes
 .../of13/ovs-ofctl-of13-action_sample2.packet      | Bin 0 -> 96 bytes
 ryu/tests/packet_data_generator3/gen.py            |  12 ++++++
 .../ovs-ofctl-of13-action_output_trunc.packet.json |  42 +++++++++++++++++++
 .../of13/ovs-ofctl-of13-action_sample2.packet.json |  45 +++++++++++++++++++++
 5 files changed, 99 insertions(+)
 create mode 100644 
ryu/tests/packet_data/of13/ovs-ofctl-of13-action_output_trunc.packet
 create mode 100644 
ryu/tests/packet_data/of13/ovs-ofctl-of13-action_sample2.packet
 create mode 100644 
ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_output_trunc.packet.json
 create mode 100644 
ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_sample2.packet.json

diff --git 
a/ryu/tests/packet_data/of13/ovs-ofctl-of13-action_output_trunc.packet 
b/ryu/tests/packet_data/of13/ovs-ofctl-of13-action_output_trunc.packet
new file mode 100644
index 
0000000000000000000000000000000000000000..491cf4c3adcd8aeedc4ed849ad64dc7a038a8f91
GIT binary patch
literal 80
scmZSKV+dft4O0Fi0kASg1{N^Q!XN>n|NmzYU|>*IU{IHzzyOp209Nl12LJ#7

literal 0
HcmV?d00001

diff --git a/ryu/tests/packet_data/of13/ovs-ofctl-of13-action_sample2.packet 
b/ryu/tests/packet_data/of13/ovs-ofctl-of13-action_sample2.packet
new file mode 100644
index 
0000000000000000000000000000000000000000..444f094b6dd0410357a2a84ffd2227cad3840237
GIT binary patch
literal 96
zcmZSKV@P1Y4O0Fi0kASg1{N^Q!k_`7|Nm!DU|>*IU{GUV267pJm<foP<tG41AOHYY
C@(?=!

literal 0
HcmV?d00001

diff --git a/ryu/tests/packet_data_generator3/gen.py 
b/ryu/tests/packet_data_generator3/gen.py
index 5bd96df..65f91a7 100644
--- a/ryu/tests/packet_data_generator3/gen.py
+++ b/ryu/tests/packet_data_generator3/gen.py
@@ -201,12 +201,24 @@ MESSAGES = [
      'args': (['priority=100'] +
               ['actions=sample(probability=3,collector_set_id=1,' +
                'obs_domain_id=2,obs_point_id=3)'])},
+    {'name': 'action_sample2',
+     'versions': [4],
+     'cmd': 'add-flow',
+     'args': (['priority=100'] +
+              ['actions=sample(probability=3,collector_set_id=1,' +
+               'obs_domain_id=2,obs_point_id=3,sampling_port=8080)'])},
     {'name': 'action_controller2',
      'versions': [4],
      'cmd': 'add-flow',
      'args': (['priority=100'] +
               ['actions=controller(reason=packet_out,max_len=1024,' +
                'id=10,userdata=01.02.03.04.05,pause)'])},
+    {'name': 'action_output_trunc',
+     'versions': [4],
+     'cmd': 'add-flow',
+     'args': (['priority=100'] +
+              ['actions=output(port=8080,max_len=1024)'])},
+
 
     # ToDo: The following actions are not eligible
     # {'name': 'action_regload2'},
diff --git 
a/ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_output_trunc.packet.json
 
b/ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_output_trunc.packet.json
new file mode 100644
index 0000000..8465733
--- /dev/null
+++ 
b/ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_output_trunc.packet.json
@@ -0,0 +1,42 @@
+{
+    "OFPFlowMod": {
+        "buffer_id": 4294967295, 
+        "command": 0, 
+        "cookie": 0, 
+        "cookie_mask": 0, 
+        "flags": 0, 
+        "hard_timeout": 0, 
+        "idle_timeout": 0, 
+        "instructions": [
+            {
+                "OFPInstructionActions": {
+                    "actions": [
+                        {
+                            "NXActionOutputTrunc": {
+                                "experimenter": 8992, 
+                                "len": 16, 
+                                "max_len": 1024, 
+                                "port": 8080,
+                                "subtype": 39,
+                                "type": 65535
+                            }
+                        }
+                    ],
+                    "len": 24,
+                    "type": 4
+                }
+            }
+        ],
+        "match": {
+            "OFPMatch": {
+                "length": 4,
+                "oxm_fields": [],
+                "type": 1
+            }
+        },
+        "out_group": 4294967295,
+        "out_port": 4294967295,
+        "priority": 100,
+        "table_id": 0
+    }
+}
\ No newline at end of file
diff --git 
a/ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_sample2.packet.json 
b/ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_sample2.packet.json
new file mode 100644
index 0000000..c767bff
--- /dev/null
+++ b/ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_sample2.packet.json
@@ -0,0 +1,45 @@
+{
+    "OFPFlowMod": {
+        "buffer_id": 4294967295, 
+        "command": 0, 
+        "cookie": 0, 
+        "cookie_mask": 0, 
+        "flags": 0, 
+        "hard_timeout": 0, 
+        "idle_timeout": 0, 
+        "instructions": [
+            {
+                "OFPInstructionActions": {
+                    "actions": [
+                        {
+                            "NXActionSample2": {
+                                "collector_set_id": 1, 
+                                "experimenter": 8992, 
+                                "len": 32, 
+                                "obs_domain_id": 2, 
+                                "obs_point_id": 3, 
+                                "probability": 3, 
+                                "sampling_port": 8080, 
+                                "subtype": 38, 
+                                "type": 65535
+                            }
+                        }
+                    ], 
+                    "len": 40, 
+                    "type": 4
+                }
+            }
+        ], 
+        "match": {
+            "OFPMatch": {
+                "length": 4, 
+                "oxm_fields": [], 
+                "type": 1
+            }
+        }, 
+        "out_group": 4294967295,
+        "out_port": 4294967295,
+        "priority": 100,
+        "table_id": 0
+    }
+}
\ No newline at end of file
-- 
1.9.1


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to