backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of13 / action / 25_SET_FIELD / 21_ARP_OP.json
1 [
2     "action: set_field: 21_ARP_OP",
3     {
4         "description": "ethernet/arp(opcode=1)-->'arp_op=1,actions=set_field:2->arp_op,output:2'",
5         "prerequisite":[
6             {
7                 "OFPFlowMod":{
8                     "table_id":0,
9                     "match":{
10                         "OFPMatch":{
11                             "oxm_fields":[
12                                 {
13                                     "OXMTlv":{
14                                         "field":"eth_type",
15                                         "value":2054
16                                     }
17                                 },
18                                 {
19                                     "OXMTlv":{
20                                         "field":"arp_op",
21                                         "value":1
22                                     }
23                                 }
24                             ]
25                         }
26                     },
27                     "instructions":[
28                         {
29                             "OFPInstructionActions":{
30                                 "actions":[
31                                     {
32                                         "OFPActionSetField":{
33                                             "field":{
34                                                 "OXMTlv":{
35                                                     "field":"arp_op",
36                                                     "value":2
37                                                 }
38                                             }
39                                         }
40                                     },
41                                     {
42                                         "OFPActionOutput":{
43                                             "port":2
44                                         }
45                                     }
46                                 ],
47                                 "type":4
48                             }
49                         }
50                     ]
51                 }
52             }
53         ],
54         "tests":[
55             {
56                 "ingress":[
57                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
58                     "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')",
59                     "bytes(b'\\x00' * (60 - 42))"
60                 ],
61                 "egress":[
62                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
63                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=2, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
64                     "bytes(b'\\x00' * (60 - 42))"
65                 ]
66             }
67         ]
68     },
69     {
70         "description": "ethernet/vlan/arp(opcode=1)-->'arp_op=1,actions=set_field:2->arp_op,output:2'",
71         "prerequisite":[
72             {
73                 "OFPFlowMod":{
74                     "table_id":0,
75                     "match":{
76                         "OFPMatch":{
77                             "oxm_fields":[
78                                 {
79                                     "OXMTlv":{
80                                         "field":"eth_type",
81                                         "value":2054
82                                     }
83                                 },
84                                 {
85                                     "OXMTlv":{
86                                         "field":"arp_op",
87                                         "value":1
88                                     }
89                                 }
90                             ]
91                         }
92                     },
93                     "instructions":[
94                         {
95                             "OFPInstructionActions":{
96                                 "actions":[
97                                     {
98                                         "OFPActionSetField":{
99                                             "field":{
100                                                 "OXMTlv":{
101                                                     "field":"arp_op",
102                                                     "value":2
103                                                 }
104                                             }
105                                         }
106                                     },
107                                     {
108                                         "OFPActionOutput":{
109                                             "port":2
110                                         }
111                                     }
112                                 ],
113                                 "type":4
114                             }
115                         }
116                     ]
117                 }
118             }
119         ],
120         "tests":[
121             {
122                 "ingress":[
123                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
124                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
125                     "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')",
126                     "bytes(b'\\x00' * 30)"
127                 ],
128                 "egress":[
129                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
130                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
131                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=2, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
132                     "bytes(b'\\x00' * 30)"
133                 ]
134             }
135         ]
136     },
137     {
138         "description": "ethernet/mpls/arp(opcode=1)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,arp_op=1,actions=set_field:2->arp_op,output:2'",
139         "prerequisite":[
140             {
141                 "OFPFlowMod":{
142                     "table_id":0,
143                     "match":{
144                         "OFPMatch":{
145                             "oxm_fields":[
146                                 {
147                                     "OXMTlv":{
148                                         "field":"eth_type",
149                                         "value":34887
150                                     }
151                                 }
152                             ]
153                         }
154                     },
155                     "instructions":[
156                         {
157                             "OFPInstructionActions":{
158                                 "actions":[
159                                     {
160                                         "OFPActionPopMpls":{
161                                             "ethertype":2054
162                                         }
163                                     }
164                                 ],
165                                 "type":4
166                             }
167                         },
168                         {
169                             "OFPInstructionGotoTable":{
170                                 "table_id":1
171                             }
172                         }
173                     ]
174                 }
175             },
176             {
177                 "OFPFlowMod":{
178                     "table_id":1,
179                     "match":{
180                         "OFPMatch":{
181                             "oxm_fields":[
182                                 {
183                                     "OXMTlv":{
184                                         "field":"eth_type",
185                                         "value":2054
186                                     }
187                                 },
188                                 {
189                                     "OXMTlv":{
190                                         "field":"arp_op",
191                                         "value":1
192                                     }
193                                 }
194                             ]
195                         }
196                     },
197                     "instructions":[
198                         {
199                             "OFPInstructionActions":{
200                                 "actions":[
201                                     {
202                                         "OFPActionSetField":{
203                                             "field":{
204                                                 "OXMTlv":{
205                                                     "field":"arp_op",
206                                                     "value":2
207                                                 }
208                                             }
209                                         }
210                                     },
211                                     {
212                                         "OFPActionOutput":{
213                                             "port":2
214                                         }
215                                     }
216                                 ],
217                                 "type":4
218                             }
219                         }
220                     ]
221                 }
222             }
223         ],
224         "tests":[
225             {
226                 "ingress":[
227                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
228                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
229                     "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')",
230                     "bytes(b'\\x00' * (60 - 42))"
231                 ],
232                 "egress":[
233                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
234                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=2, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
235                     "bytes(b'\\x00' * (60 - 42))"
236                 ]
237             }
238         ]
239     },
240     {
241         "description": "ethernet/itag/ethernet/arp(opcode=1)-->'actions=pop_pbb,goto_table:1','table_id:1,arp_op=1,actions=set_field:2->arp_op,output:2'",
242         "prerequisite":[
243             {
244                 "OFPFlowMod":{
245                     "table_id":0,
246                     "match":{
247                         "OFPMatch":{
248                             "oxm_fields":[
249                                 {
250                                     "OXMTlv":{
251                                         "field":"eth_type",
252                                         "value":35047
253                                     }
254                                 }
255                             ]
256                         }
257                     },
258                     "instructions":[
259                         {
260                             "OFPInstructionActions":{
261                                 "actions":[
262                                     {
263                                         "OFPActionPopPbb":{}
264                                     }
265                                 ],
266                                 "type":4
267                             }
268                         },
269                         {
270                             "OFPInstructionGotoTable":{
271                                 "table_id":1
272                             }
273                         }
274                     ]
275                 }
276             },
277             {
278                 "OFPFlowMod":{
279                     "table_id":1,
280                     "match":{
281                         "OFPMatch":{
282                             "oxm_fields":[
283                                 {
284                                     "OXMTlv":{
285                                         "field":"eth_type",
286                                         "value":2054
287                                     }
288                                 },
289                                 {
290                                     "OXMTlv":{
291                                         "field":"arp_op",
292                                         "value":1
293                                     }
294                                 }
295                             ]
296                         }
297                     },
298                     "instructions":[
299                         {
300                             "OFPInstructionActions":{
301                                 "actions":[
302                                     {
303                                         "OFPActionSetField":{
304                                             "field":{
305                                                 "OXMTlv":{
306                                                     "field":"arp_op",
307                                                     "value":2
308                                                 }
309                                             }
310                                         }
311                                     },
312                                     {
313                                         "OFPActionOutput":{
314                                             "port":2
315                                         }
316                                     }
317                                 ],
318                                 "type":4
319                             }
320                         }
321                     ]
322                 }
323             }
324         ],
325         "tests":[
326             {
327                 "ingress":[
328                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)",
329                     "itag(sid=100)",
330                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
331                     "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')",
332                     "bytes(b'\\x00' * (60 - 42))"
333                 ],
334                 "egress":[
335                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
336                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=2, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
337                     "bytes(b'\\x00' * (60 - 42))"
338                 ]
339             }
340         ]
341     }
342 ]