blob: 3ab10222cc0fd7a59ef1cbeaa597f32b332d532a [file] [log] [blame]
Wailok Shumee90c132021-03-11 21:00:11 +08001{
2 "type": "object",
3 "title": "traffic-match-creation",
4 "required": [
5 "policy_id",
6 "selector"
7 ],
8 "properties": {
9 "policy_id": {
10 "type": "string",
11 "example": "DROP",
12 "description": "ID of associated policy"
13 },
14 "selector": {
15 "type": "object",
16 "title": "selector",
17 "required": [
18 "criteria"
19 ],
20 "properties": {
21 "criteria": {
22 "type": "array",
23 "xml": {
24 "name": "criteria",
25 "wrapped": true
26 },
27 "items": {
28 "type": "object",
29 "title": "criteria",
30 "properties": {
31 "type": {
32 "type": "string",
33 "description": "Ethernet field name",
34 "example": "ETH_TYPE"
35 },
36 "ethType": {
37 "type": "int64",
38 "format": "int64",
39 "example": "0x88cc",
40 "description": "Ethernet frame type"
41 },
42 "mac": {
43 "type": "string",
44 "example": "00:00:11:00:00:01"
45 },
46 "port": {
47 "type": "int64",
48 "format": "int64",
49 "example": 1,
50 "description": "Match port"
51 },
52 "metadata": {
53 "type": "Hex16",
54 "format": "Hex16",
55 "example": "0xabcdL",
56 "description": "Metadata passed between tables"
57 },
58 "vlanId": {
59 "type": "uint16",
60 "format": "uint16",
61 "example": "0x1000"
62 },
63 "priority": {
64 "type": "int64",
65 "format": "int64",
66 "example": 1,
67 "description": "VLAN priority."
68 },
69 "ipDscp": {
70 "type": "byte",
71 "format": "byte",
72 "description": "IP DSCP (6 bits in ToS field)"
73 },
74 "ipEcn": {
75 "type": "byte",
76 "format": "byte",
77 "description": "IP ECN (2 bits in ToS field)."
78 },
79 "protocol": {
80 "type": "uint16",
81 "format": "uint16",
82 "example": 1,
83 "description": "IP protocol"
84 },
85 "ip": {
86 "type": "string",
87 "example": "10.1.1.0/24",
88 "description": "IP source address"
89 },
90 "tcpPort": {
91 "type": "integer",
92 "format": "uint16",
93 "example": 1,
94 "description": "TCP source address"
95 },
96 "udpPort": {
97 "type": "uint16",
98 "format": "uint16",
99 "example": 1,
100 "description": "UDP source address"
101 },
102 "sctpPort": {
103 "type": "uint16",
104 "format": "uint16",
105 "example": 1,
106 "description": "SCTP source address"
107 },
108 "icmpType": {
109 "type": "uint16",
110 "format": "uint16",
111 "example": 1,
112 "description": "Internet Control Message Protocol for IPV4 code (RFC0792)"
113 },
114 "icmpCode": {
115 "type": "uint16",
116 "format": "uint16",
117 "example": 1,
118 "description": "Internet Control Message Protocol for IPV4 code (RFC0792)"
119 },
120 "flowLabel": {
121 "type": "Hex16",
122 "format": "Hex16",
123 "example": "0xffffe",
124 "description": "IPv6 Flow Label (RFC 6437)"
125 },
126 "icmpv6Type": {
127 "type": "uint16",
128 "format": "uint16",
129 "example": 1,
130 "description": "Internet Control Message Protocol for IPV6 type (RFC2463)"
131 },
132 "icmpv6Code": {
133 "type": "uint16",
134 "format": "uint16",
135 "example": 1,
136 "description": "Internet Control Message Protocol for IPV6 code (RFC2463)"
137 },
138 "targetAddress": {
139 "type": "String",
140 "example": "10.1.1.0/24",
141 "description": "IPv6 Neighbor discovery target address"
142 },
143 "label": {
144 "type": "int32",
145 "format": "int32",
146 "example": 1,
147 "description": "MPLS label"
148 },
149 "exthdrFlags": {
150 "type": "int64",
151 "format": "int64",
152 "example": 1,
153 "description": "IPv6 extension header pseudo-field"
154 },
155 "lambda": {
156 "type": "int64",
157 "format": "int64",
158 "example": 1,
159 "description": "wavelength abstraction"
160 },
161 "gridType": {
162 "type": "String",
163 "example": "DWDM",
164 "description": "Type of wavelength grid"
165 },
166 "channelSpacing": {
167 "type": "int64",
168 "format": "int64",
169 "example": 100,
170 "description": "Optical channel spacing"
171 },
172 "spacingMultiplier": {
173 "type": "integer",
174 "format": "int64",
175 "example": 4,
176 "description": "Optical channel spacing multiplier"
177 },
178 "slotGranularity": {
179 "type": "int64",
180 "format": "int64",
181 "example": 8
182 },
183 "ochSignalId": {
184 "type": "integer",
185 "format": "int64",
186 "example": 1,
187 "description": "Optical channel signal ID"
188 },
189 "tunnelId": {
190 "type": "int64",
191 "format": "int64",
192 "example": 5,
193 "description": "Tunnel ID"
194 },
195 "ochSignalType": {
196 "type": "int64",
197 "format": "int64",
198 "example": 1,
199 "description": "Optical channel signal type"
200 },
201 "oduSignalId": {
202 "type": "int64",
203 "format": "int64",
204 "example": 1,
205 "description": "ODU (Optical channel Data Unit) signal ID."
206 },
207 "tributaryPortNumber": {
208 "type": "int64",
209 "format": "int64",
210 "example": 11,
211 "description": "OPU (Optical channel Payload Unit) port number."
212 },
213 "tributarySlotLen": {
214 "type": "int64",
215 "format": "int64",
216 "example": 80,
217 "description": "OPU (Optical channel Payload Unit) slot length."
218 },
219 "tributarySlotBitmap": {
220 "type": "array",
221 "title": "tributarySlotBitmap",
222 "description": "OPU (Optical channel Payload Unit) slot bitmap.",
223 "required": [
224 "byte",
225 "port"
226 ],
227 "items": {
228 "type": "byte",
229 "title": "byte",
230 "example": 1
231 }
232 },
233 "oduSignalType": {
234 "type": "int64",
235 "format": "int64",
236 "example": 4,
237 "description": "ODU (Optical channel Data Unit) signal type."
238 }
239 }
240 }
241 }
242 }
243 }
244 }
245}