-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathopenapi.yml
249 lines (246 loc) · 6.32 KB
/
openapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
openapi: '3.0.0'
info:
title: kytos/flow_manager
version: 1.1.0
description: >-
**Warning**: *This documentation is experimental and may change soon.*
Manages flows for OpenFlow switches, for versions 1.0 and 1.3. Can add, list
and remove flows from datapaths. Currently supports a subset of available
matches and actions from the OpenFlow specification.
tags:
- name: List
- name: Add
- name: Delete
paths:
/api/kytos/flow_manager/v2/flows:
get:
tags:
- List
summary: Retrieve a list of all flows from all known datapaths.
responses:
'200':
description: Operation Successful.
content:
application/json:
schema:
$ref: '#/components/schemas/Flows'
post:
tags:
- Add
summary: Insert flows in all known datapaths.
parameters:
- in: body
name: body
description: List of flows to be inserted.
required: true
schema:
type: object
properties:
flows:
type: array
items:
$ref: '#/components/schemas/Flow'
consumes:
- application/json
responses:
'202':
description: FlowMod messages sent.
'400':
description: Invalid JSON flow.
'/api/kytos/flow_manager/v2/flows/{dpid}':
get:
tags:
- List
summary: Retrieve a list of all flows from a single datapath.
parameters:
- name: dpid
in: path
required: true
type: string
description: DPID of the target datapath.
responses:
'200':
description: Operation Successful.
content:
application/json:
schema:
$ref: '#/components/schemas/Flows'
'404':
description: Datapath not found.
post:
tags:
- Add
summary: Insert flows in a single datapath.
parameters:
- in: body
name: body
description: List of flows to be inserted.
required: true
schema:
type: object
properties:
flows:
type: array
items:
$ref: '#/components/schemas/Flow'
- name: dpid
in: path
required: true
type: string
description: DPID of the target datapath.
consumes:
- application/json
responses:
'202':
description: FlowMod messages sent.
'400':
description: Invalid JSON flow.
'404':
description: Datapath not found.
/api/kytos/flow_manager/v2/delete:
post:
tags:
- Delete
summary: Remove matching flows from all known datapaths.
parameters:
- in: body
name: body
description: Parameters of flows to be removed. The NApp will send a FlowMod message requesting the removal of flows with those parameters.
required: true
schema:
type: object
properties:
flows:
type: array
items:
$ref: '#/components/schemas/Flow'
consumes:
- application/json
responses:
'202':
description: FlowMod messages sent.
'400':
description: Invalid JSON flow.
'/api/kytos/flow_manager/v2/delete/{dpid}':
post:
tags:
- Delete
summary: Remove matching flows from a single datapath.
parameters:
- in: body
name: body
description: Parameters of flows to be removed. The NApp will send a FlowMod message requesting the removal of flows with those parameters.
required: true
schema:
type: object
properties:
flows:
type: array
items:
$ref: '#/components/schemas/Flow'
- name: dpid
in: path
required: true
type: string
description: DPID of the target datapath.
consumes:
- application/json
responses:
'202':
description: FlowMod messages sent.
'400':
description: Invalid JSON flow.
'404':
description: Datapath not found.
components:
schemas:
Match:
type: object
properties:
in_port:
type: integer
format: int16
example: 2
dl_src:
type: string
example: '00:1f:3a:3e:9a:cf'
dl_dst:
type: string
example: '00:15:af:d5:38:98'
dl_type:
type: integer
format: int16
example: 2048
dl_vlan:
type: integer
format: int16
example: 300
dl_vlan_pcp:
type: integer
format: int8
example: 0
nw_src:
type: string
example: '192.168.0.1'
nw_dst:
type: string
example: '192.168.0.2'
nw_proto:
type: integer
format: int8
example: 17
Actions:
type: array
items:
type: object
properties:
action_type:
type: string
enum: [set_vlan, output]
example: 'output'
value:
type: int
format: int16
example: 7
example:
- {
"action_type": "output",
"port": 42
}
- {
"action_type": "set_vlan",
"vlan_id": 42
}
Flow:
type: object
properties:
priority:
type: integer
format: int16
example: 10
idle_timeout:
type: integer
format: int16
example: 360
hard_timeout:
type: integer
format: int16
example: 1200
cookie:
type: integer
format: int64
example: 84114904
match:
$ref: '#/components/schemas/Match'
actions:
$ref: '#/components/schemas/Actions'
Flows:
type: object
properties:
'00:00:00:00:00:00:00:01':
type: object
properties:
flows:
type: array
items:
$ref: '#/components/schemas/Flow'