backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / action / 25_SET_FIELD / 35_MPLS_TC.json
1 [
2     "action: set_field: 35_MPLS_TC",
3     {
4         "description": "ethernet/mpls(exp=3)/ipv4/tcp-->'mpls_tc=3,actions=set_field:5->mpls_tc,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":34887
16                                     }
17                                 },
18                                 {
19                                     "OXMTlv":{
20                                         "field":"mpls_tc",
21                                         "value":3
22                                     }
23                                 }
24                             ]
25                         }
26                     },
27                     "instructions":[
28                         {
29                             "OFPInstructionActions":{
30                                 "actions":[
31                                     {
32                                         "OFPActionSetField":{
33                                             "field":{
34                                                 "OXMTlv":{
35                                                     "field":"mpls_tc",
36                                                     "value":5
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=34887)",
58                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
59                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
60                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
61                     "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'"
62                 ],
63                 "egress":[
64                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
65                     "mpls(bsb=1, label=100, exp=5, ttl=64)",
66                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
67                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
68                     "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'"
69                 ]
70             }
71         ]
72     },
73     {
74         "description": "ethernet/mpls(exp=3)/ipv6/tcp-->'mpls_tc=3,actions=set_field:5->mpls_tc,output:2'",
75         "prerequisite":[
76             {
77                 "OFPFlowMod":{
78                     "table_id":0,
79                     "match":{
80                         "OFPMatch":{
81                             "oxm_fields":[
82                                 {
83                                     "OXMTlv":{
84                                         "field":"eth_type",
85                                         "value":34887
86                                     }
87                                 },
88                                 {
89                                     "OXMTlv":{
90                                         "field":"mpls_tc",
91                                         "value":3
92                                     }
93                                 }
94                             ]
95                         }
96                     },
97                     "instructions":[
98                         {
99                             "OFPInstructionActions":{
100                                 "actions":[
101                                     {
102                                         "OFPActionSetField":{
103                                             "field":{
104                                                 "OXMTlv":{
105                                                     "field":"mpls_tc",
106                                                     "value":5
107                                                 }
108                                             }
109                                         }
110                                     },
111                                     {
112                                         "OFPActionOutput":{
113                                             "port":2
114                                         }
115                                     }
116                                 ],
117                                 "type":4
118                             }
119                         }
120                     ]
121                 }
122             }
123         ],
124         "tests":[
125             {
126                 "ingress":[
127                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
128                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
129                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
130                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
131                     "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'"
132                 ],
133                 "egress":[
134                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
135                     "mpls(bsb=1, label=100, exp=5, ttl=64)",
136                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
137                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
138                     "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'"
139                 ]
140             }
141         ]
142     },
143     {
144         "description": "ethernet/mpls(exp=3)/arp-->'mpls_tc=3,actions=set_field:5->mpls_tc,output:2'",
145         "prerequisite":[
146             {
147                 "OFPFlowMod":{
148                     "table_id":0,
149                     "match":{
150                         "OFPMatch":{
151                             "oxm_fields":[
152                                 {
153                                     "OXMTlv":{
154                                         "field":"eth_type",
155                                         "value":34887
156                                     }
157                                 },
158                                 {
159                                     "OXMTlv":{
160                                         "field":"mpls_tc",
161                                         "value":3
162                                     }
163                                 }
164                             ]
165                         }
166                     },
167                     "instructions":[
168                         {
169                             "OFPInstructionActions":{
170                                 "actions":[
171                                     {
172                                         "OFPActionSetField":{
173                                             "field":{
174                                                 "OXMTlv":{
175                                                     "field":"mpls_tc",
176                                                     "value":5
177                                                 }
178                                             }
179                                         }
180                                     },
181                                     {
182                                         "OFPActionOutput":{
183                                             "port":2
184                                         }
185                                     }
186                                 ],
187                                 "type":4
188                             }
189                         }
190                     ]
191                 }
192             }
193         ],
194         "tests":[
195             {
196                 "ingress":[
197                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
198                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
199                     "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')",
200                     "bytes(b'\\x00' * 30)"
201                 ],
202                 "egress":[
203                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
204                     "mpls(bsb=1, label=100, exp=5, ttl=64)",
205                     "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')",
206                     "bytes(b'\\x00' * 30)"
207                 ]
208             }
209         ]
210     }
211 ]