summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorShinpei Muraoka <shinpei.muraoka@gmail.com>2016-07-11 10:44:22 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-12 13:21:47 +0900
commitb09b39c11dd4f2e2e0d2d0a70ede9e3cef917e93 (patch)
tree1bd0a41a20511ebdd8d317dbd1f8417de946735b
parent0288ae2cfaca32f7c69138d84baa398390615a4b (diff)
test_parser: Add test data for some NXAction
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/packet_data/of13/ovs-ofctl-of13-action_output_trunc.packetbin0 -> 80 bytes
-rw-r--r--ryu/tests/packet_data/of13/ovs-ofctl-of13-action_sample2.packetbin0 -> 96 bytes
-rw-r--r--ryu/tests/packet_data_generator3/gen.py12
-rw-r--r--ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_output_trunc.packet.json42
-rw-r--r--ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-action_sample2.packet.json45
5 files changed, 99 insertions, 0 deletions
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 00000000..491cf4c3
--- /dev/null
+++ b/ryu/tests/packet_data/of13/ovs-ofctl-of13-action_output_trunc.packet
Binary files differ
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 00000000..444f094b
--- /dev/null
+++ b/ryu/tests/packet_data/of13/ovs-ofctl-of13-action_sample2.packet
Binary files differ
diff --git a/ryu/tests/packet_data_generator3/gen.py b/ryu/tests/packet_data_generator3/gen.py
index 5bd96dff..65f91a72 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 00000000..84657335
--- /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 00000000..c767bff3
--- /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