mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-01-23 01:21:31 +01:00
test_ofctl: Add test cases for OpenFlow 1.5
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:
parent
255fd1564e
commit
4bec6aca3d
@ -0,0 +1,10 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"length": 16,
|
||||
"stats": {
|
||||
"flow_count": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
{
|
||||
"flow": {
|
||||
"cookie": 0,
|
||||
"cookie_mask": 0,
|
||||
"flags": 0,
|
||||
"match": {},
|
||||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"table_id": 255
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
{
|
||||
"1": {
|
||||
"dp_desc": "dp",
|
||||
"hw_desc": "hw",
|
||||
"mfr_desc": "mfr",
|
||||
"serial_num": "serial",
|
||||
"sw_desc": "sw"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"exp": {
|
||||
"data": "bmF6bw==",
|
||||
"data_type": "base64",
|
||||
"exp_type": 123456789,
|
||||
"experimenter": 98765432
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"cookie": 1234605616436508552,
|
||||
"flags": 1,
|
||||
"hard_timeout": 255,
|
||||
"idle_timeout": 255,
|
||||
"importance": 43690,
|
||||
"instructions": [
|
||||
{
|
||||
"table_id": 2,
|
||||
"type": "GOTO_TABLE"
|
||||
}
|
||||
],
|
||||
"length": 64,
|
||||
"match": {
|
||||
"in_port": 1
|
||||
},
|
||||
"priority": 5,
|
||||
"stats": {
|
||||
"flow_count": 1
|
||||
},
|
||||
"table_id": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
{
|
||||
"flow": {
|
||||
"cookie": 1234605616436508552,
|
||||
"cookie_mask": 18446744073709551615,
|
||||
"flags": 0,
|
||||
"match": {
|
||||
"in_port": 1
|
||||
},
|
||||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"table_id": 1
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
{
|
||||
"cmd": 0,
|
||||
"flow": {
|
||||
"instructions": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"field": "vlan_vid",
|
||||
"type": "SET_FIELD",
|
||||
"value": 258
|
||||
},
|
||||
{
|
||||
"type": "COPY_TTL_OUT"
|
||||
},
|
||||
{
|
||||
"type": "COPY_TTL_IN"
|
||||
},
|
||||
{
|
||||
"type": "COPY_TTL_IN"
|
||||
},
|
||||
{
|
||||
"type": "POP_PBB"
|
||||
},
|
||||
{
|
||||
"ethertype": 4660,
|
||||
"type": "PUSH_PBB"
|
||||
},
|
||||
{
|
||||
"ethertype": 39030,
|
||||
"type": "POP_MPLS"
|
||||
},
|
||||
{
|
||||
"ethertype": 34887,
|
||||
"type": "PUSH_MPLS"
|
||||
},
|
||||
{
|
||||
"type": "POP_VLAN"
|
||||
},
|
||||
{
|
||||
"ethertype": 33024,
|
||||
"type": "PUSH_VLAN"
|
||||
},
|
||||
{
|
||||
"type": "DEC_MPLS_TTL"
|
||||
},
|
||||
{
|
||||
"mpls_ttl": 10,
|
||||
"type": "SET_MPLS_TTL"
|
||||
},
|
||||
{
|
||||
"type": "DEC_NW_TTL"
|
||||
},
|
||||
{
|
||||
"nw_ttl": 10,
|
||||
"type": "SET_NW_TTL"
|
||||
},
|
||||
{
|
||||
"data": "AAECAwQFBgc=",
|
||||
"data_type": "base64",
|
||||
"experimenter": 101,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"queue_id": 3,
|
||||
"type": "SET_QUEUE"
|
||||
},
|
||||
{
|
||||
"group_id": 99,
|
||||
"type": "GROUP"
|
||||
},
|
||||
{
|
||||
"max_len": 65535,
|
||||
"port": 6,
|
||||
"type": "OUTPUT"
|
||||
}
|
||||
],
|
||||
"type": "WRITE_ACTIONS"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"field": "eth_src",
|
||||
"type": "SET_FIELD",
|
||||
"value": "01:02:03:04:05:06"
|
||||
},
|
||||
{
|
||||
"field": "pbb_uca",
|
||||
"type": "SET_FIELD",
|
||||
"value": 1
|
||||
}
|
||||
],
|
||||
"type": "APPLY_ACTIONS"
|
||||
}
|
||||
],
|
||||
"buffer_id": 65535,
|
||||
"importance": 0,
|
||||
"match": {
|
||||
"eth_dst": "f2:0b:a4:7d:f8:ea"
|
||||
},
|
||||
"priority": 123,
|
||||
"table_id": 1
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"length": 40,
|
||||
"match": {
|
||||
"in_port": 1
|
||||
},
|
||||
"priority": 1,
|
||||
"reason": 0,
|
||||
"stats": {
|
||||
"flow_count": 1
|
||||
},
|
||||
"table_id": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
{
|
||||
"flow": {
|
||||
"cookie": 0,
|
||||
"cookie_mask": 0,
|
||||
"flags": 0,
|
||||
"match": {},
|
||||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"table_id": 0
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"buckets": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"max_len": 65509,
|
||||
"port": 1,
|
||||
"type": "OUTPUT"
|
||||
}
|
||||
],
|
||||
"bucket_id": 65535,
|
||||
"properties": [
|
||||
{
|
||||
"type": "WEIGHT",
|
||||
"weight": 65535
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"group_id": 1,
|
||||
"properties": [],
|
||||
"type": "SELECT"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"group_id": 52651
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"ALL": [
|
||||
"OUTPUT",
|
||||
"COPY_TTL_OUT",
|
||||
"COPY_TTL_IN",
|
||||
"SET_MPLS_TTL",
|
||||
"DEC_MPLS_TTL",
|
||||
"PUSH_VLAN",
|
||||
"POP_VLAN",
|
||||
"PUSH_MPLS",
|
||||
"POP_MPLS",
|
||||
"SET_QUEUE",
|
||||
"GROUP",
|
||||
"SET_NW_TTL",
|
||||
"DEC_NW_TTL",
|
||||
"SET_FIELD"
|
||||
]
|
||||
},
|
||||
{
|
||||
"SELECT": [
|
||||
"OUTPUT",
|
||||
"COPY_TTL_OUT",
|
||||
"COPY_TTL_IN",
|
||||
"SET_MPLS_TTL",
|
||||
"DEC_MPLS_TTL",
|
||||
"PUSH_VLAN",
|
||||
"POP_VLAN",
|
||||
"PUSH_MPLS",
|
||||
"POP_MPLS",
|
||||
"SET_QUEUE",
|
||||
"GROUP",
|
||||
"SET_NW_TTL",
|
||||
"DEC_NW_TTL",
|
||||
"SET_FIELD"
|
||||
]
|
||||
},
|
||||
{
|
||||
"INDIRECT": [
|
||||
"OUTPUT",
|
||||
"COPY_TTL_OUT",
|
||||
"COPY_TTL_IN",
|
||||
"SET_MPLS_TTL",
|
||||
"DEC_MPLS_TTL",
|
||||
"PUSH_VLAN",
|
||||
"POP_VLAN",
|
||||
"PUSH_MPLS",
|
||||
"POP_MPLS",
|
||||
"SET_QUEUE",
|
||||
"GROUP",
|
||||
"SET_NW_TTL",
|
||||
"DEC_NW_TTL",
|
||||
"SET_FIELD"
|
||||
]
|
||||
},
|
||||
{
|
||||
"FF": [
|
||||
"OUTPUT",
|
||||
"COPY_TTL_OUT",
|
||||
"COPY_TTL_IN",
|
||||
"SET_MPLS_TTL",
|
||||
"DEC_MPLS_TTL",
|
||||
"PUSH_VLAN",
|
||||
"POP_VLAN",
|
||||
"PUSH_MPLS",
|
||||
"POP_MPLS",
|
||||
"SET_QUEUE",
|
||||
"GROUP",
|
||||
"SET_NW_TTL",
|
||||
"DEC_NW_TTL",
|
||||
"SET_FIELD"
|
||||
]
|
||||
}
|
||||
],
|
||||
"capabilities": [
|
||||
"SELECT_WEIGHT",
|
||||
"CHAINING"
|
||||
],
|
||||
"max_groups": [
|
||||
{
|
||||
"ALL": 16777216
|
||||
},
|
||||
{
|
||||
"SELECT": 16777216
|
||||
},
|
||||
{
|
||||
"INDIRECT": 16777216
|
||||
},
|
||||
{
|
||||
"FF": 16777216
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
"ALL",
|
||||
"SELECT",
|
||||
"INDIRECT",
|
||||
"FF"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
{
|
||||
"cmd": 3,
|
||||
"group": {
|
||||
"buckets": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"len": 8,
|
||||
"type": "POP_VLAN"
|
||||
},
|
||||
{
|
||||
"field": "ipv4_dst",
|
||||
"type": "SET_FIELD",
|
||||
"value": "192.168.2.9"
|
||||
}
|
||||
],
|
||||
"bucket_id": 305419896,
|
||||
"properties": [
|
||||
{
|
||||
"length": 8,
|
||||
"type": "WEIGHT",
|
||||
"weight": 52428
|
||||
},
|
||||
{
|
||||
"length": 8,
|
||||
"type": "WATCH_PORT",
|
||||
"watch": 56797
|
||||
},
|
||||
{
|
||||
"length": 8,
|
||||
"type": "WATCH_GROUP",
|
||||
"watch": 4008636142
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"command_bucket_id": 3149642683,
|
||||
"group_id": 2863311530,
|
||||
"properties": [],
|
||||
"type": "SELECT"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"bucket_stats": [
|
||||
{
|
||||
"byte_count": 2345,
|
||||
"packet_count": 234
|
||||
}
|
||||
],
|
||||
"byte_count": 12345,
|
||||
"duration_nsec": 609036000,
|
||||
"duration_sec": 9,
|
||||
"group_id": 1,
|
||||
"length": 56,
|
||||
"packet_count": 123,
|
||||
"ref_count": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"bands": [
|
||||
{
|
||||
"burst_size": 10,
|
||||
"rate": 1000,
|
||||
"type": "DROP"
|
||||
}
|
||||
],
|
||||
"flags": [
|
||||
"PKTPS",
|
||||
"BURST",
|
||||
"STATS"
|
||||
],
|
||||
"meter_id": 100
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"band_types": [
|
||||
"DROP",
|
||||
"DSCP_REMARK"
|
||||
],
|
||||
"capabilities": [
|
||||
"KBPS",
|
||||
"PKTPS",
|
||||
"BURST",
|
||||
"STATS"
|
||||
],
|
||||
"max_bands": 255,
|
||||
"max_color": 0,
|
||||
"max_meter": 16777216
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
{
|
||||
"cmd": 0,
|
||||
"meter": {
|
||||
"bands": [
|
||||
{
|
||||
"burst_size": 10,
|
||||
"rate": 1000,
|
||||
"type": "DROP"
|
||||
},
|
||||
{
|
||||
"burst_size": 10,
|
||||
"prec_level": 1,
|
||||
"rate": 1000,
|
||||
"type": "DSCP_REMARK"
|
||||
}
|
||||
],
|
||||
"flags": [
|
||||
"PKTPS",
|
||||
"BURST",
|
||||
"STATS"
|
||||
],
|
||||
"meter_id": 100
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"band_stats": [
|
||||
{
|
||||
"byte_band_count": 0,
|
||||
"packet_band_count": 0
|
||||
}
|
||||
],
|
||||
"byte_in_count": 0,
|
||||
"duration_nsec": 480000,
|
||||
"duration_sec": 0,
|
||||
"len": 56,
|
||||
"meter_id": 100,
|
||||
"packet_in_count": 0,
|
||||
"ref_count": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"config": 0,
|
||||
"hw_addr": "f2:0b:a4:d0:3f:70",
|
||||
"length": 168,
|
||||
"name": "Port7",
|
||||
"port_no": 7,
|
||||
"properties": [
|
||||
{
|
||||
"advertised": 10240,
|
||||
"curr": 10248,
|
||||
"curr_speed": 5000,
|
||||
"length": 32,
|
||||
"max_speed": 5000,
|
||||
"peer": 10248,
|
||||
"supported": 10248,
|
||||
"type": "ETHERNET"
|
||||
},
|
||||
{
|
||||
"length": 40,
|
||||
"rx_grid_freq_lmda": 1500,
|
||||
"rx_max_freq_lmda": 2000,
|
||||
"rx_min_freq_lmda": 1000,
|
||||
"supported": 1,
|
||||
"tx_grid_freq_lmda": 1500,
|
||||
"tx_max_freq_lmda": 2000,
|
||||
"tx_min_freq_lmda": 1000,
|
||||
"tx_pwr_max": 2000,
|
||||
"tx_pwr_min": 1000,
|
||||
"type": "OPTICAL"
|
||||
},
|
||||
{
|
||||
"data": [],
|
||||
"exp_type": 0,
|
||||
"experimenter": 101,
|
||||
"length": 12,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1
|
||||
],
|
||||
"exp_type": 1,
|
||||
"experimenter": 101,
|
||||
"length": 16,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"exp_type": 2,
|
||||
"experimenter": 101,
|
||||
"length": 20,
|
||||
"type": "EXPERIMENTER"
|
||||
}
|
||||
],
|
||||
"state": 4
|
||||
},
|
||||
{
|
||||
"config": 0,
|
||||
"hw_addr": "f2:0b:a4:7d:f8:ea",
|
||||
"length": 72,
|
||||
"name": "Port6",
|
||||
"port_no": 6,
|
||||
"properties": [
|
||||
{
|
||||
"advertised": 10240,
|
||||
"curr": 10248,
|
||||
"curr_speed": 5000,
|
||||
"length": 32,
|
||||
"max_speed": 5000,
|
||||
"peer": 10248,
|
||||
"supported": 10248,
|
||||
"type": "ETHERNET"
|
||||
}
|
||||
],
|
||||
"state": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"port_no": 48346
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
{
|
||||
"port_config": {
|
||||
"config": 0,
|
||||
"hw_addr": "00:11:00:00:11:11",
|
||||
"mask": 0,
|
||||
"port_no": 1,
|
||||
"properties": [
|
||||
{
|
||||
"advertise": 4096,
|
||||
"length": 8,
|
||||
"type": "ETHERNET"
|
||||
},
|
||||
{
|
||||
"configure": 3,
|
||||
"fl_offset": 2000,
|
||||
"freq_lmda": 1500,
|
||||
"grid_span": 3000,
|
||||
"length": 24,
|
||||
"tx_pwr": 300,
|
||||
"type": "OPTICAL"
|
||||
},
|
||||
{
|
||||
"data": [],
|
||||
"exp_type": 0,
|
||||
"experimenter": 101,
|
||||
"length": 12,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1
|
||||
],
|
||||
"exp_type": 1,
|
||||
"experimenter": 101,
|
||||
"length": 16,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"exp_type": 2,
|
||||
"experimenter": 101,
|
||||
"length": 20,
|
||||
"type": "EXPERIMENTER"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"duration_nsec": 0,
|
||||
"duration_sec": 0,
|
||||
"length": 224,
|
||||
"port_no": 7,
|
||||
"properties": [
|
||||
{
|
||||
"collisions": 0,
|
||||
"length": 40,
|
||||
"rx_crc_err": 0,
|
||||
"rx_frame_err": 0,
|
||||
"rx_over_err": 0,
|
||||
"type": "ETHERNET"
|
||||
},
|
||||
{
|
||||
"bias_current": 300,
|
||||
"flags": 3,
|
||||
"length": 44,
|
||||
"rx_freq_lmda": 1500,
|
||||
"rx_grid_span": 500,
|
||||
"rx_offset": 700,
|
||||
"rx_pwr": 2000,
|
||||
"temperature": 273,
|
||||
"tx_freq_lmda": 1500,
|
||||
"tx_grid_span": 500,
|
||||
"tx_offset": 700,
|
||||
"tx_pwr": 2000,
|
||||
"type": "OPTICAL"
|
||||
},
|
||||
{
|
||||
"data": [],
|
||||
"exp_type": 0,
|
||||
"experimenter": 101,
|
||||
"length": 12,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1
|
||||
],
|
||||
"exp_type": 1,
|
||||
"experimenter": 101,
|
||||
"length": 16,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"exp_type": 2,
|
||||
"experimenter": 101,
|
||||
"length": 20,
|
||||
"type": "EXPERIMENTER"
|
||||
}
|
||||
],
|
||||
"rx_bytes": 0,
|
||||
"rx_dropped": 0,
|
||||
"rx_errors": 0,
|
||||
"rx_packets": 0,
|
||||
"tx_bytes": 336,
|
||||
"tx_dropped": 0,
|
||||
"tx_errors": 0,
|
||||
"tx_packets": 4
|
||||
},
|
||||
{
|
||||
"duration_nsec": 0,
|
||||
"duration_sec": 0,
|
||||
"length": 120,
|
||||
"port_no": 6,
|
||||
"properties": [
|
||||
{
|
||||
"collisions": 0,
|
||||
"length": 40,
|
||||
"rx_crc_err": 0,
|
||||
"rx_frame_err": 0,
|
||||
"rx_over_err": 0,
|
||||
"type": "ETHERNET"
|
||||
}
|
||||
],
|
||||
"rx_bytes": 336,
|
||||
"rx_dropped": 0,
|
||||
"rx_errors": 0,
|
||||
"rx_packets": 4,
|
||||
"tx_bytes": 336,
|
||||
"tx_dropped": 0,
|
||||
"tx_errors": 0,
|
||||
"tx_packets": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"len": 32,
|
||||
"port_no": 7,
|
||||
"properties": [
|
||||
{
|
||||
"data": [],
|
||||
"exp_type": 0,
|
||||
"experimenter": 101,
|
||||
"length": 12,
|
||||
"type": "EXPERIMENTER"
|
||||
}
|
||||
],
|
||||
"queue_id": 0
|
||||
},
|
||||
{
|
||||
"len": 88,
|
||||
"port_no": 8,
|
||||
"properties": [
|
||||
{
|
||||
"length": 8,
|
||||
"rate": 300,
|
||||
"type": "MIN_RATE"
|
||||
},
|
||||
{
|
||||
"length": 8,
|
||||
"rate": 900,
|
||||
"type": "MAX_RATE"
|
||||
},
|
||||
{
|
||||
"data": [],
|
||||
"exp_type": 0,
|
||||
"experimenter": 101,
|
||||
"length": 12,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1
|
||||
],
|
||||
"exp_type": 1,
|
||||
"experimenter": 101,
|
||||
"length": 16,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"exp_type": 2,
|
||||
"experimenter": 101,
|
||||
"length": 20,
|
||||
"type": "EXPERIMENTER"
|
||||
}
|
||||
],
|
||||
"queue_id": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"port_no": 52651,
|
||||
"queue_id": 57020
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"duration_nsec": 0,
|
||||
"duration_sec": 0,
|
||||
"length": 104,
|
||||
"port_no": 7,
|
||||
"properties": [
|
||||
{
|
||||
"data": [],
|
||||
"exp_type": 0,
|
||||
"experimenter": 101,
|
||||
"length": 12,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1
|
||||
],
|
||||
"exp_type": 1,
|
||||
"experimenter": 101,
|
||||
"length": 16,
|
||||
"type": "EXPERIMENTER"
|
||||
},
|
||||
{
|
||||
"data": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"exp_type": 2,
|
||||
"experimenter": 101,
|
||||
"length": 20,
|
||||
"type": "EXPERIMENTER"
|
||||
}
|
||||
],
|
||||
"queue_id": 1,
|
||||
"tx_bytes": 0,
|
||||
"tx_errors": 0,
|
||||
"tx_packets": 0
|
||||
},
|
||||
{
|
||||
"duration_nsec": 0,
|
||||
"duration_sec": 0,
|
||||
"length": 48,
|
||||
"port_no": 6,
|
||||
"properties": [],
|
||||
"queue_id": 1,
|
||||
"tx_bytes": 0,
|
||||
"tx_errors": 0,
|
||||
"tx_packets": 0
|
||||
},
|
||||
{
|
||||
"duration_nsec": 0,
|
||||
"duration_sec": 0,
|
||||
"length": 48,
|
||||
"port_no": 7,
|
||||
"properties": [],
|
||||
"queue_id": 2,
|
||||
"tx_bytes": 0,
|
||||
"tx_errors": 0,
|
||||
"tx_packets": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"capabilities": 4,
|
||||
"command": 1,
|
||||
"features": 1,
|
||||
"length": 80,
|
||||
"max_entries": 255,
|
||||
"metadata_match": 18446744073709551615,
|
||||
"metadata_write": 18446744073709551615,
|
||||
"name": "table1",
|
||||
"properties": [
|
||||
{
|
||||
"oxm_values": [
|
||||
{
|
||||
"eth_src": "aa:bb:cc:dd:ee:ff"
|
||||
}
|
||||
],
|
||||
"type": "PACKET_TYPES"
|
||||
}
|
||||
],
|
||||
"table_id": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
{
|
||||
"1": [
|
||||
{
|
||||
"active_count": 4,
|
||||
"lookup_count": 4,
|
||||
"matched_count": 4,
|
||||
"table_id": 0
|
||||
},
|
||||
{
|
||||
"active_count": 4,
|
||||
"lookup_count": 4,
|
||||
"matched_count": 4,
|
||||
"table_id": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -25,6 +25,7 @@ from ryu.lib import ofctl_v1_0
|
||||
from ryu.lib import ofctl_v1_2
|
||||
from ryu.lib import ofctl_v1_3
|
||||
from ryu.lib import ofctl_v1_4
|
||||
from ryu.lib import ofctl_v1_5
|
||||
from ryu.ofproto import ofproto_parser
|
||||
from ryu.ofproto.ofproto_protocol import ProtocolDesc
|
||||
from ryu.tests import test_lib
|
||||
@ -33,6 +34,7 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DummyDatapath(ProtocolDesc):
|
||||
|
||||
def __init__(self, version):
|
||||
super(DummyDatapath, self).__init__(version)
|
||||
self.id = 1 # XXX
|
||||
@ -117,6 +119,7 @@ def _add_tests():
|
||||
'of12': 0x03,
|
||||
'of13': 0x04,
|
||||
'of14': 0x05,
|
||||
'of15': 0x06,
|
||||
}
|
||||
|
||||
_test_cases = {
|
||||
@ -461,7 +464,7 @@ def _add_tests():
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_4.mod_meter_entry,
|
||||
'request': '5-43-ofp_meter_mod.packet.json', # flow --> meter
|
||||
'request': '5-43-ofp_meter_mod.packet.json',
|
||||
'reply': None
|
||||
},
|
||||
{
|
||||
@ -480,6 +483,113 @@ def _add_tests():
|
||||
'reply': None
|
||||
},
|
||||
],
|
||||
'of15': [
|
||||
{
|
||||
'method': ofctl_v1_5.get_desc_stats,
|
||||
'request': 'libofproto-OFP15-desc_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-desc_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_queue_stats,
|
||||
'request': 'lib-ofctl-ofp_queue_stats_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-queue_stats_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_queue_desc,
|
||||
'request': 'libofproto-OFP15-queue_desc_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-queue_desc_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_flow_stats,
|
||||
'request': 'libofproto-OFP15-flow_stats_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-flow_stats_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_flow_desc_stats,
|
||||
'request': 'libofproto-OFP15-flow_desc_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-flow_desc_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_aggregate_flow_stats,
|
||||
'request': 'libofproto-OFP15-aggregate_stats_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-aggregate_stats_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_table_stats,
|
||||
'request': 'libofproto-OFP15-table_stats_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-table_stats_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_table_features,
|
||||
'request': 'lib-ofctl-ofp_table_features_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-table_features_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_port_stats,
|
||||
'request': 'libofproto-OFP15-port_stats_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-port_stats_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_meter_stats,
|
||||
'request': 'libofproto-OFP15-meter_stats_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-meter_stats_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_meter_features,
|
||||
'request': 'libofproto-OFP15-meter_features_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-meter_features_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_meter_desc,
|
||||
'request': 'libofproto-OFP15-meter_desc_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-meter_desc_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_group_stats,
|
||||
'request': 'libofproto-OFP15-group_stats_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-group_stats_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_group_features,
|
||||
'request': 'libofproto-OFP15-group_features_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-group_features_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_group_desc,
|
||||
'request': 'libofproto-OFP15-group_desc_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-group_desc_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.get_port_desc,
|
||||
'request': 'libofproto-OFP15-port_desc_request.packet.json',
|
||||
'reply': 'libofproto-OFP15-port_desc_reply.packet.json'
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.mod_flow_entry,
|
||||
'request': 'libofproto-OFP15-flow_mod_no_nx.packet.json',
|
||||
'reply': None
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.mod_meter_entry,
|
||||
'request': 'libofproto-OFP15-meter_mod.packet.json',
|
||||
'reply': None
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.mod_group_entry,
|
||||
'request': 'libofproto-OFP15-group_mod.packet.json',
|
||||
'reply': None
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.mod_port_behavior,
|
||||
'request': 'libofproto-OFP15-port_mod.packet.json',
|
||||
'reply': None
|
||||
},
|
||||
{
|
||||
'method': ofctl_v1_5.send_experimenter,
|
||||
'request': 'libofproto-OFP15-experimenter.packet.json',
|
||||
'reply': None
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
def _jsonfile_to_msg(datapath, jsonfile):
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"OFPQueueStatsRequest": {
|
||||
"flags": 0,
|
||||
"port_no": 4294967295,
|
||||
"queue_id": 4294967295,
|
||||
"type": 5
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
{
|
||||
"OFPTableFeaturesStatsRequest": {
|
||||
"body": [],
|
||||
"flags": 0,
|
||||
"type": 12
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,202 @@
|
||||
{
|
||||
"OFPFlowMod": {
|
||||
"buffer_id": 65535,
|
||||
"command": 0,
|
||||
"cookie": 0,
|
||||
"cookie_mask": 0,
|
||||
"flags": 0,
|
||||
"hard_timeout": 0,
|
||||
"idle_timeout": 0,
|
||||
"importance": 0,
|
||||
"instructions": [
|
||||
{
|
||||
"OFPInstructionActions": {
|
||||
"actions": [
|
||||
{
|
||||
"OFPActionSetField": {
|
||||
"field": {
|
||||
"OXMTlv": {
|
||||
"field": "vlan_vid",
|
||||
"mask": null,
|
||||
"value": 258
|
||||
}
|
||||
},
|
||||
"len": 16,
|
||||
"type": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionCopyTtlOut": {
|
||||
"len": 8,
|
||||
"type": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionCopyTtlIn": {
|
||||
"len": 8,
|
||||
"type": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionCopyTtlIn": {
|
||||
"len": 8,
|
||||
"type": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionPopPbb": {
|
||||
"len": 8,
|
||||
"type": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionPushPbb": {
|
||||
"ethertype": 4660,
|
||||
"len": 8,
|
||||
"type": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionPopMpls": {
|
||||
"ethertype": 39030,
|
||||
"len": 8,
|
||||
"type": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionPushMpls": {
|
||||
"ethertype": 34887,
|
||||
"len": 8,
|
||||
"type": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionPopVlan": {
|
||||
"len": 8,
|
||||
"type": 18
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionPushVlan": {
|
||||
"ethertype": 33024,
|
||||
"len": 8,
|
||||
"type": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionDecMplsTtl": {
|
||||
"len": 8,
|
||||
"type": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionSetMplsTtl": {
|
||||
"len": 8,
|
||||
"mpls_ttl": 10,
|
||||
"type": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionDecNwTtl": {
|
||||
"len": 8,
|
||||
"type": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionSetNwTtl": {
|
||||
"len": 8,
|
||||
"nw_ttl": 10,
|
||||
"type": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionExperimenterUnknown": {
|
||||
"data": "AAECAwQFBgc=",
|
||||
"experimenter": 101,
|
||||
"len": 16,
|
||||
"type": 65535
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionSetQueue": {
|
||||
"len": 8,
|
||||
"queue_id": 3,
|
||||
"type": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionGroup": {
|
||||
"group_id": 99,
|
||||
"len": 8,
|
||||
"type": 22
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionOutput": {
|
||||
"len": 16,
|
||||
"max_len": 65535,
|
||||
"port": 6,
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"len": 176,
|
||||
"type": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPInstructionActions": {
|
||||
"actions": [
|
||||
{
|
||||
"OFPActionSetField": {
|
||||
"field": {
|
||||
"OXMTlv": {
|
||||
"field": "eth_src",
|
||||
"mask": null,
|
||||
"value": "01:02:03:04:05:06"
|
||||
}
|
||||
},
|
||||
"len": 16,
|
||||
"type": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"OFPActionSetField": {
|
||||
"field": {
|
||||
"OXMTlv": {
|
||||
"field": "pbb_uca",
|
||||
"mask": null,
|
||||
"value": 1
|
||||
}
|
||||
},
|
||||
"len": 16,
|
||||
"type": 25
|
||||
}
|
||||
}
|
||||
],
|
||||
"len": 40,
|
||||
"type": 4
|
||||
}
|
||||
}
|
||||
],
|
||||
"match": {
|
||||
"OFPMatch": {
|
||||
"length": 14,
|
||||
"oxm_fields": [
|
||||
{
|
||||
"OXMTlv": {
|
||||
"field": "eth_dst",
|
||||
"mask": null,
|
||||
"value": "f2:0b:a4:7d:f8:ea"
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
},
|
||||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 123,
|
||||
"table_id": 1
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user