test_parser: Add expected json for OFP13/15 Messages

Add expected json for the following messages.

 - OFP13/15 Symmetric Messages
 - OFP13/15 Asynchronous Messages
 - OFP15 Multipart Messages
 - OFP13/15 TableMod Message
 - OFP13 PortMod Message
 - OFP13/15 MeterMod Message

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Minoru TAKAHASHI 2015-10-09 13:13:54 +09:00 committed by FUJITA Tomonori
parent 44e7069704
commit e43796062a
18 changed files with 232 additions and 146 deletions

View File

@ -0,0 +1,5 @@
{
"OFPEchoReply": {
"data": ""
}
}

View File

@ -0,0 +1,5 @@
{
"OFPEchoRequest": {
"data": ""
}
}

View File

@ -0,0 +1,7 @@
{
"OFPErrorMsg": {
"code": 6,
"data": "BA4ACAAAAAA=",
"type": 4
}
}

View File

@ -0,0 +1,78 @@
{
"OFPFlowRemoved": {
"byte_count": 100,
"cookie": 1311768467463790320,
"duration_nsec": 500,
"duration_sec": 600,
"hard_timeout": 300,
"idle_timeout": 400,
"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
}
},
"packet_count": 200,
"priority": 100,
"reason": 0,
"table_id": 1
}
}

View File

@ -0,0 +1,15 @@
{
"OFPHello": {
"elements": [
{
"OFPHelloElemVersionBitmap": {
"length": 8,
"type": 1,
"versions": [
4
]
}
}
]
}
}

View File

@ -0,0 +1,26 @@
{
"OFPMeterMod": {
"bands": [
{
"OFPMeterBandDrop": {
"burst_size": 10,
"len": 16,
"rate": 1000,
"type": 1
}
},
{
"OFPMeterBandDscpRemark": {
"burst_size": 10,
"len": 16,
"prec_level": 1,
"rate": 1000,
"type": 2
}
}
],
"command": 0,
"flags": 14,
"meter_id": 100
}
}

View File

@ -0,0 +1,9 @@
{
"OFPPortMod": {
"advertise": 10248,
"config": 1,
"hw_addr": "aa:bb:cc:99:88:77",
"mask": 1,
"port_no": 1
}
}

View File

@ -0,0 +1,20 @@
{
"OFPPortStatus": {
"desc": {
"OFPPort": {
"advertised": 10248,
"config": 0,
"curr": 10248,
"curr_speed": 50000,
"hw_addr": "ff:ff:ff:ff:ff:ff",
"max_speed": 100000,
"name": "eth0",
"peer": 10248,
"port_no": 1,
"state": 4,
"supported": 10248
}
},
"reason": 2
}
}

View File

@ -0,0 +1,6 @@
{
"OFPTableMod": {
"config": 0,
"table_id": 255
}
}

View File

@ -1,5 +1,5 @@
{
"OFPEchoReply": {
"data": "aG9nZQ=="
"data": ""
}
}

View File

@ -1,5 +1,5 @@
{
"OFPEchoRequest": {
"data": "aG9nZQ=="
"data": ""
}
}

View File

@ -1,7 +1,7 @@
{
"OFPErrorMsg": {
"code": 11,
"data": "ZnVnYWZ1Z2E=",
"type": 2
"code": 6,
"data": "Bg4ACAAAAAA=",
"type": 4
}
}

View File

@ -6,12 +6,7 @@
"length": 8,
"type": 1,
"versions": [
1,
2,
3,
9,
10,
30
6
]
}
}

View File

@ -17,15 +17,6 @@
"rate": 1000,
"type": 2
}
},
{
"OFPMeterBandExperimenter": {
"burst_size": 10,
"experimenter": 999,
"len": 16,
"rate": 1000,
"type": 65535
}
}
],
"command": 0,

View File

@ -1,8 +1,8 @@
{
"OFPQueueStatsRequest": {
"flags": 0,
"port_no": 4294967295,
"queue_id": 4294967295,
"flags": 0,
"port_no": 43981,
"queue_id": 4294967295,
"type": 5
}
}

View File

@ -2,60 +2,63 @@
"OFPRequestForward": {
"request": {
"OFPGroupMod": {
"bucket_array_len": 56,
"buckets": [
{
"OFPBucket": {
"action_array_len": 24,
"actions": [
"OFPBucket": {
"action_array_len": 24,
"actions": [
{
"OFPActionPopVlan": {
"len": 8,
"type": 18
}
},
"OFPActionPopVlan": {
"len": 8,
"type": 18
}
},
{
"OFPActionSetField": {
"field": {
"OXMTlv": {
"field": "ipv4_dst",
"mask": null,
"value": "192.168.2.9"
}
}
}
"OFPActionSetField": {
"field": {
"OXMTlv": {
"field": "ipv4_dst",
"mask": null,
"value": "192.168.2.9"
}
}
}
}
],
"bucket_id": 305419896,
"len": 56,
"properties": [
],
"bucket_id": 305419896,
"len": 56,
"properties": [
{
"OFPGroupBucketPropWeight": {
"length": 8,
"type": 0,
"weight": 52428
}
},
"OFPGroupBucketPropWeight": {
"length": 8,
"type": 0,
"weight": 52428
}
},
{
"OFPGroupBucketPropWatch": {
"length": 8,
"type": 1,
"watch": 56797
}
},
"OFPGroupBucketPropWatch": {
"length": 8,
"type": 1,
"watch": 56797
}
},
{
"OFPGroupBucketPropWatch": {
"length": 8,
"type": 2,
"watch": 4008636142
}
"OFPGroupBucketPropWatch": {
"length": 8,
"type": 2,
"watch": 4008636142
}
}
]
}
]
}
}
],
"command": 0,
"group_id": 1,
"type": 0
],
"command": 3,
"command_bucket_id": 3149642683,
"group_id": 2863311530,
"properties": [],
"type": 1
}
}
}

View File

@ -1,41 +1,8 @@
{
"OFPRoleStatus": {
"generation_id": 7,
"properties": [
{
"OFPRolePropExperimenter": {
"data": [],
"exp_type": 0,
"experimenter": 101,
"length": 12,
"type": 65535
}
},
{
"OFPRolePropExperimenter": {
"data": [
1
],
"exp_type": 1,
"experimenter": 101,
"length": 16,
"type": 65535
}
},
{
"OFPRolePropExperimenter": {
"data": [
1,
2
],
"exp_type": 2,
"experimenter": 101,
"length": 20,
"type": 65535
}
}
],
"generation_id": 17356517385562371090,
"properties": [],
"reason": 0,
"role": 2
"role": 3
}
}

View File

@ -1,54 +1,13 @@
{
"OFPTableMod": {
"config": 0,
"config": 4,
"properties": [
{
"OFPTableModPropEviction": {
"flags": 0,
"flags": 2,
"length": 8,
"type": 2
}
},
{
"OFPTableModPropVacancy": {
"length": 8,
"type": 3,
"vacancy": 0,
"vacancy_down": 0,
"vacancy_up": 0
}
},
{
"OFPTableModPropExperimenter": {
"data": [],
"exp_type": 0,
"experimenter": 101,
"length": 12,
"type": 65535
}
},
{
"OFPTableModPropExperimenter": {
"data": [
1
],
"exp_type": 1,
"experimenter": 101,
"length": 16,
"type": 65535
}
},
{
"OFPTableModPropExperimenter": {
"data": [
1,
2
],
"exp_type": 2,
"experimenter": 101,
"length": 20,
"type": 65535
}
}
],
"table_id": 255