From 368d7a732cea973b949e44eea624e81a42610ce6 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 27 Apr 2015 14:35:55 +0900 Subject: [PATCH] test_parser: Add expected json representations Signed-off-by: YAMAMOTO Takashi Signed-off-by: FUJITA Tomonori --- .../libofproto-OFP13-flow_mod.packet.json | 113 ++++++++++++++++++ .../libofproto-OFP13-packet_in.packet.json | 46 +++++++ 2 files changed, 159 insertions(+) create mode 100644 ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod.packet.json create mode 100644 ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-packet_in.packet.json diff --git a/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod.packet.json b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod.packet.json new file mode 100644 index 00000000..1428c5d0 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod.packet.json @@ -0,0 +1,113 @@ +{ + "OFPFlowMod": { + "buffer_id": 0, + "command": 0, + "cookie": 1311768467463790320, + "cookie_mask": 18446744073709551615, + "flags": 0, + "hard_timeout": 0, + "idle_timeout": 0, + "instructions": [ + { + "OFPInstructionActions": { + "actions": [ + { + "OFPActionPopVlan": { + "len": 8, + "type": 18 + } + }, + { + "OFPActionSetField": { + "field": { + "OXMTlv": { + "field": "ipv4_dst", + "mask": null, + "value": "192.168.2.9" + } + } + } + } + ], + "len": 32, + "type": 4 + } + }, + { + "OFPInstructionGotoTable": { + "len": 8, + "table_id": 100, + "type": 1 + } + } + ], + "match": { + "OFPMatch": { + "length": 70, + "oxm_fields": [ + { + "OXMTlv": { + "field": "in_port", + "mask": null, + "value": 43981 + } + }, + { + "OXMTlv": { + "field": "eth_dst", + "mask": null, + "value": "aa:bb:cc:99:88:77" + } + }, + { + "OXMTlv": { + "field": "eth_type", + "mask": null, + "value": 2048 + } + }, + { + "OXMTlv": { + "field": "vlan_vid", + "mask": null, + "value": 5095 + } + }, + { + "OXMTlv": { + "field": "ipv4_dst", + "mask": null, + "value": "192.168.2.1" + } + }, + { + "OXMTlv": { + "field": "tunnel_id", + "mask": null, + "value": 50000 + } + }, + { + "OXMTlv": { + "field": "tun_ipv4_src", + "mask": null, + "value": "192.168.2.3" + } + }, + { + "OXMTlv": { + "field": "tun_ipv4_dst", + "mask": null, + "value": "192.168.2.4" + } + } + ], + "type": 1 + } + }, + "out_group": 0, + "out_port": 0, + "priority": 0, + "table_id": 2 + } +} diff --git a/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-packet_in.packet.json b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-packet_in.packet.json new file mode 100644 index 00000000..e5fd0bd9 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-packet_in.packet.json @@ -0,0 +1,46 @@ +{ + "OFPPacketIn": { + "buffer_id": 200, + "cookie": 0, + "data": "aG9nZQ==", + "match": { + "OFPMatch": { + "length": 40, + "oxm_fields": [ + { + "OXMTlv": { + "field": "in_port", + "mask": null, + "value": 43981 + } + }, + { + "OXMTlv": { + "field": "tunnel_id", + "mask": null, + "value": 50000 + } + }, + { + "OXMTlv": { + "field": "tun_ipv4_src", + "mask": null, + "value": "192.168.2.3" + } + }, + { + "OXMTlv": { + "field": "tun_ipv4_dst", + "mask": null, + "value": "192.168.2.4" + } + } + ], + "type": 1 + } + }, + "reason": 0, + "table_id": 100, + "total_len": 1000 + } +}