backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / action / 25_SET_FIELD / 04_ETH_SRC.json
1 [
2     "action: set_field: 04_ETH_SRC",
3     {
4         "description": "ethernet(src='12:11:11:11:11:11')/ipv4/tcp-->'eth_src=12:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->eth_src,output:2'",
5         "prerequisite":[
6             {
7                 "OFPFlowMod":{
8                     "table_id":0,
9                     "match":{
10                         "OFPMatch":{
11                             "oxm_fields":[
12                                 {
13                                     "OXMTlv":{
14                                         "field":"eth_src",
15                                         "value":"12:11:11:11:11:11"
16                                     }
17                                 }
18                             ]
19                         }
20                     },
21                     "instructions":[
22                         {
23                             "OFPInstructionActions":{
24                                 "actions":[
25                                     {
26                                         "OFPActionSetField":{
27                                             "field":{
28                                                 "OXMTlv":{
29                                                     "field":"eth_src",
30                                                     "value":"aa:aa:aa:aa:aa:aa"
31                                                 }
32                                             }
33                                         }
34                                     },
35                                     {
36                                         "OFPActionOutput":{
37                                             "port":2
38                                         }
39                                     }
40                                 ],
41                                 "type":4
42                             }
43                         }
44                     ]
45                 }
46             }
47         ],
48         "tests":[
49             {
50                 "ingress":[
51                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
52                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
53                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
54                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
55                 ],
56                 "egress":[
57                     "ethernet(dst='22:22:22:22:22:22', src='aa:aa:aa:aa:aa:aa', ethertype=2048)",
58                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
59                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
60                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
61                 ]
62             }
63         ]
64     },
65     {
66         "description": "ethernet(src='12:11:11:11:11:11')/ipv6/tcp-->'eth_src=12:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->eth_src,output:2'",
67         "prerequisite":[
68             {
69                 "OFPFlowMod":{
70                     "table_id":0,
71                     "match":{
72                         "OFPMatch":{
73                             "oxm_fields":[
74                                 {
75                                     "OXMTlv":{
76                                         "field":"eth_src",
77                                         "value":"12:11:11:11:11:11"
78                                     }
79                                 }
80                             ]
81                         }
82                     },
83                     "instructions":[
84                         {
85                             "OFPInstructionActions":{
86                                 "actions":[
87                                     {
88                                         "OFPActionSetField":{
89                                             "field":{
90                                                 "OXMTlv":{
91                                                     "field":"eth_src",
92                                                     "value":"aa:aa:aa:aa:aa:aa"
93                                                 }
94                                             }
95                                         }
96                                     },
97                                     {
98                                         "OFPActionOutput":{
99                                             "port":2
100                                         }
101                                     }
102                                 ],
103                                 "type":4
104                             }
105                         }
106                     ]
107                 }
108             }
109         ],
110         "tests":[
111             {
112                 "ingress":[
113                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
114                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
115                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
116                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
117                 ],
118                 "egress":[
119                     "ethernet(dst='22:22:22:22:22:22', src='aa:aa:aa:aa:aa:aa', ethertype=34525)",
120                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
121                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
122                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
123                 ]
124             }
125         ]
126     },
127     {
128         "description": "ethernet(src='12:11:11:11:11:11')/arp-->'eth_src=12:11:11:11:11:11,actions=set_field:aa:aa:aa:aa:aa:aa->eth_src,output:2'",
129         "prerequisite":[
130             {
131                 "OFPFlowMod":{
132                     "table_id":0,
133                     "match":{
134                         "OFPMatch":{
135                             "oxm_fields":[
136                                 {
137                                     "OXMTlv":{
138                                         "field":"eth_src",
139                                         "value":"12:11:11:11:11:11"
140                                     }
141                                 }
142                             ]
143                         }
144                     },
145                     "instructions":[
146                         {
147                             "OFPInstructionActions":{
148                                 "actions":[
149                                     {
150                                         "OFPActionSetField":{
151                                             "field":{
152                                                 "OXMTlv":{
153                                                     "field":"eth_src",
154                                                     "value":"aa:aa:aa:aa:aa:aa"
155                                                 }
156                                             }
157                                         }
158                                     },
159                                     {
160                                         "OFPActionOutput":{
161                                             "port":2
162                                         }
163                                     }
164                                 ],
165                                 "type":4
166                             }
167                         }
168                     ]
169                 }
170             }
171         ],
172         "tests":[
173             {
174                 "ingress":[
175                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
176                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
177                     "bytes(b'\\x00' * (60 - 42))"
178                 ],
179                 "egress":[
180                     "ethernet(dst='22:22:22:22:22:22', src='aa:aa:aa:aa:aa:aa', ethertype=2054)",
181                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
182                     "bytes(b'\\x00' * (60 - 42))"
183                 ]
184             }
185         ]
186     }
187 ]