diff options
author | IWAMOTO Toshihiro <iwamoto@valinux.co.jp> | 2015-05-29 12:16:04 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-06-02 09:14:19 +0900 |
commit | d573cb9bd854cccc7cb56b5ffa5a316f633bc3ff (patch) | |
tree | 1856ab64c95e37fa7a4e581e2fe22e036075c372 | |
parent | 74c04e96599e9e9a93d2c2cee3398e849a3b51d4 (diff) |
test_parser: Add some expected json representations
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
4 files changed, 330 insertions, 0 deletions
diff --git a/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod_conjunction.packet.json b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod_conjunction.packet.json new file mode 100644 index 00000000..209067e8 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod_conjunction.packet.json @@ -0,0 +1,100 @@ +{ + "OFPFlowMod": { + "buffer_id": 0, + "command": 0, + "cookie": 1311768467463790320, + "cookie_mask": 18446744073709551615, + "flags": 0, + "hard_timeout": 0, + "idle_timeout": 0, + "instructions": [ + { + "OFPInstructionActions": { + "actions": [ + { + "NXActionConjunction": { + "clause": 1, + "experimenter": 8992, + "id": 11259375, + "len": 16, + "n_clauses": 2, + "subtype": 34, + "type": 65535 + } + } + ], + "len": 24, + "type": 4 + } + } + ], + "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": 4 + } +} diff --git a/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod_match_conj.packet.json b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod_match_conj.packet.json new file mode 100644 index 00000000..89c3a222 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of13/libofproto-OFP13-flow_mod_match_conj.packet.json @@ -0,0 +1,64 @@ +{ + "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": 12, + "oxm_fields": [ + { + "OXMTlv": { + "field": "conj_id", + "mask": null, + "value": 11259375 + } + } + ], + "type": 1 + } + }, + "out_group": 0, + "out_port": 0, + "priority": 0, + "table_id": 3 + } +} diff --git a/ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod_conjunction.packet.json b/ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod_conjunction.packet.json new file mode 100644 index 00000000..6ca74d51 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod_conjunction.packet.json @@ -0,0 +1,101 @@ +{ + "OFPFlowMod": { + "buffer_id": 0, + "command": 0, + "cookie": 1311768467463790320, + "cookie_mask": 18446744073709551615, + "flags": 0, + "hard_timeout": 0, + "idle_timeout": 0, + "importance": 39032, + "instructions": [ + { + "OFPInstructionActions": { + "actions": [ + { + "NXActionConjunction": { + "clause": 1, + "experimenter": 8992, + "id": 11259375, + "len": 16, + "n_clauses": 2, + "subtype": 34, + "type": 65535 + } + } + ], + "len": 24, + "type": 4 + } + } + ], + "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": 4 + } +} diff --git a/ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod_match_conj.packet.json b/ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod_match_conj.packet.json new file mode 100644 index 00000000..2355577a --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod_match_conj.packet.json @@ -0,0 +1,65 @@ +{ + "OFPFlowMod": { + "buffer_id": 0, + "command": 0, + "cookie": 1311768467463790320, + "cookie_mask": 18446744073709551615, + "flags": 0, + "hard_timeout": 0, + "idle_timeout": 0, + "importance": 39032, + "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": 12, + "oxm_fields": [ + { + "OXMTlv": { + "field": "conj_id", + "mask": null, + "value": 11259375 + } + } + ], + "type": 1 + } + }, + "out_group": 0, + "out_port": 0, + "priority": 0, + "table_id": 3 + } +} |