backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of13 / action / 17_PUSH_VLAN.json
1 [
2     "action: 17_PUSH_VLAN",
3     {
4         "description": "ethernet/ipv4/tcp-->'eth_type=0x0800,actions=push_vlan:0x8100,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":2048
16                                     }
17                                 }
18                             ]
19                         }
20                     },
21                     "instructions":[
22                         {
23                             "OFPInstructionActions":{
24                                 "actions":[
25                                     {
26                                         "OFPActionPushVlan":{
27                                             "ethertype":33024
28                                         }
29                                     },
30                                     {
31                                         "OFPActionOutput":{
32                                             "port":2
33                                         }
34                                     }
35                                 ],
36                                 "type":4
37                             }
38                         }
39                     ]
40                 }
41             }
42         ],
43         "tests":[
44             {
45                 "ingress":[
46                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
47                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
48                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
49                     "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'"
50                 ],
51                 "egress":[
52                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
53                     "vlan(ethertype=2048)",
54                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
55                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
56                     "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'"
57                 ]
58             }
59         ]
60     },
61     {
62         "description": "ethernet/ipv6/tcp-->'eth_type=0x86dd,actions=push_vlan:0x8100,output:2'",
63         "prerequisite":[
64             {
65                 "OFPFlowMod":{
66                     "table_id":0,
67                     "match":{
68                         "OFPMatch":{
69                             "oxm_fields":[
70                                 {
71                                     "OXMTlv":{
72                                         "field":"eth_type",
73                                         "value":34525
74                                     }
75                                 }
76                             ]
77                         }
78                     },
79                     "instructions":[
80                         {
81                             "OFPInstructionActions":{
82                                 "actions":[
83                                     {
84                                         "OFPActionPushVlan":{
85                                             "ethertype":33024
86                                         }
87                                     },
88                                     {
89                                         "OFPActionOutput":{
90                                             "port":2
91                                         }
92                                     }
93                                 ],
94                                 "type":4
95                             }
96                         }
97                     ]
98                 }
99             }
100         ],
101         "tests":[
102             {
103                 "ingress":[
104                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
105                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
106                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
107                     "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'"
108                 ],
109                 "egress":[
110                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
111                     "vlan(ethertype=34525)",
112                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
113                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
114                     "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'"
115                 ]
116             }
117         ]
118     },
119     {
120         "description": "ethernet/arp-->'eth_type=0x0806,actions=push_vlan:0x8100,output:2'",
121         "prerequisite":[
122             {
123                 "OFPFlowMod":{
124                     "table_id":0,
125                     "match":{
126                         "OFPMatch":{
127                             "oxm_fields":[
128                                 {
129                                     "OXMTlv":{
130                                         "field":"eth_type",
131                                         "value":2054
132                                     }
133                                 }
134                             ]
135                         }
136                     },
137                     "instructions":[
138                         {
139                             "OFPInstructionActions":{
140                                 "actions":[
141                                     {
142                                         "OFPActionPushVlan":{
143                                             "ethertype":33024
144                                         }
145                                     },
146                                     {
147                                         "OFPActionOutput":{
148                                             "port":2
149                                         }
150                                     }
151                                 ],
152                                 "type":4
153                             }
154                         }
155                     ]
156                 }
157             }
158         ],
159         "tests":[
160             {
161                 "ingress":[
162                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
163                     "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')",
164                     "bytes(b'\\x00' * (60 - 42))"
165                 ],
166                 "egress":[
167                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
168                     "vlan(ethertype=2054)",
169                     "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')",
170                     "bytes(b'\\x00' * (60 - 42))"
171                 ]
172             }
173         ]
174     }
175 ]