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