-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathaether-top-level-openapi3.yaml
539 lines (536 loc) · 16.1 KB
/
aether-top-level-openapi3.yaml
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
components:
schemas:
PatchBody:
properties:
Updates:
title: Updated elements
description: Elements to be updated or replaced
$ref: '#/components/schemas/Elements'
Deletes:
title: Deleted elements
description: Elements to be deleted
$ref: '#/components/schemas/Elements'
Extensions:
title: gnmi extensions
description: Model type and version of 'target' on first creation [link](https://docs.onosproject.org/onos-config/docs/gnmi_extensions/#use-of-extension-101-device-version-in-setrequest)
properties:
change-name-100:
type: string
title: change-name-100
deprecated: true
model-version-101:
type: string
title: model-version-101
deprecated: true
model-type-102:
type: string
title: model-type-102
deprecated: true
transaction-info-110:
type: object
properties:
ID:
type: string
index:
type: integer
title: transaction-info-110
description: Used in the responses, carries inforamtion about the transaction.
transaction-strategy-111:
type: integer
title: transaction-strategy-111
description: "Identifies whether a request needs to be handles Asynchronously (val: 0) or Synchronously (val: 1)"
type: object
default-target:
description: Target (device name) to use by default if not specified on indivdual updates/deletes as an additional property
type: string
pattern: '[0-9a-z\-\._]+'
required:
- default-target
Elements:
properties:
connectivity-services-2.0.0:
title: Connectivity-service 2.0.0 updates
$ref: './aether-2.0.0-openapi3.yaml#/components/schemas/Connectivity-services'
enterprises-2.0.0:
title: Enterprise 2.0.0 updates
$ref: './aether-2.0.0-openapi3.yaml#/components/schemas/Enterprises'
application-2.1.0:
title: Application 2.1.0 updates
$ref: './aether-2.1.0-openapi3.yaml#/components/schemas/Application_List'
site-2.1.0:
title: Site 2.1.0 updates
$ref: './aether-2.1.0-openapi3.yaml#/components/schemas/Site_List'
template-2.1.0:
title: Template 2.1.0 updates
$ref: './aether-2.1.0-openapi3.yaml#/components/schemas/Template_List'
traffic-class-2.1.0:
title: Traffic Class 2.1.0 updates
$ref: './aether-2.1.0-openapi3.yaml#/components/schemas/Traffic-class_List'
TargetName:
properties:
name:
type: string
TargetsNames:
items:
$ref: '#/components/schemas/TargetName'
type: array
ChangeValue:
description: an individual Path/Value and removed flag combination in a Change
properties:
path:
description: the path to change
type: string
value:
description: the change value
type: string
removed:
description: indicates whether this is a delete
type: boolean
required:
- path
type: object
Change:
description: represents a configuration change to a single target
properties:
target_id:
description: the identifier of the target to which this change applies
type: string
target_version:
description: an optional target version to which to apply this change
type: string
target_type:
description: an optional target type to which to apply this change
type: string
values:
description: a set of change values to apply
items:
$ref: '#/components/schemas/ChangeValue'
type: array
required:
- target_id
type: object
Failure:
properties:
type:
description: transaction failure type
type: string
enum:
- UNKNOWN
- CANCELED
- NOT_FOUND
- ALREADY_EXISTS
- UNAUTHORIZED
- FORBIDDEN
- CONFLICT
- INVALID
- UNAVAILABLE
- NOT_SUPPORTED
- TIMEOUT
- INTERNAL
description:
type: string
Revision:
type: integer
format: int64
Synchronicity:
type: string
enum:
- ASYNCHRONOUS
- SYNCHRONOUS
Isolation:
type: string
enum:
- DEFAULT
- SERIALIZABLE
Strategy:
properties:
synchronicity:
description: indicates the transaction synchronicity level
$ref: '#/components/schemas/Synchronicity'
isolation:
description: indicates the transaction isolation level
$ref: '#/components/schemas/Isolation'
Index:
type: integer
format: int64
RollbackTransaction:
properties:
rollback_index:
description: the index of the transaction to roll back
$ref: '#/components/schemas/Index'
Deleted:
type: boolean
Path:
type: string
TypeOpts:
type: integer
format: int32
Bytes:
type: string
format: byte
ValueType:
description: the type for a value
type: string
enum:
- EMPTY
- STRING
- INT
- UINT
- BOOL
- DECIMAL
- FLOAT
- BYTES
- LEAFLIST_STRING
- LEAFLIST_INT
- LEAFLIST_UINT
- LEAFLIST_BOOL
- LEAFLIST_DECIMAL
- LEAFLIST_FLOAT
- LEAFLIST_BYTES
TypedValue:
description: value represented as a byte array
properties:
value:
description: the bytes array
type: string
type:
description: the value type
$ref: '#/components/schemas/ValueType'
type_opts:
description: a set of type options
type: array
items:
$ref: '#/components/schemas/TypeOpts'
PathValue:
description: the state of a path/value in the configuration tree
properties:
path:
description: the path to change
$ref: '#/components/schemas/Path'
value:
description: the change value
$ref: '#/components/schemas/TypedValue'
deleted:
description: indicates whether this is a delete
$ref: '#/components/schemas/Deleted'
PathTarget:
type: object
properties:
path:
type: string
path-value:
$ref: '#/components/schemas/PathValue'
PathValues:
type: array
items:
$ref: '#/components/schemas/PathTarget'
type: object
ChangeTarget:
type: object
properties:
target-name:
type: string
path-values:
$ref: '#/components/schemas/PathValues'
ChangeTransaction:
type: array
items:
$ref: '#/components/schemas/ChangeTarget'
type: object
Details:
properties:
change:
description: the changes to apply to targets
$ref: '#/components/schemas/ChangeTransaction'
rollback:
description: the rollback of transaction
$ref: '#/components/schemas/RollbackTransaction'
Start:
type: string
format: date-time
End:
type: string
format: date-time
TransactionPhaseStatus:
properties:
start:
$ref: '#/components/schemas/Start'
end:
$ref: '#/components/schemas/End'
InitializePhaseState:
type: string
enum:
- INITIALIZING
- INITIALIZED
- FAILED
TransactionInitializePhase:
properties:
status:
$ref: '#/components/schemas/TransactionPhaseStatus'
state:
$ref: '#/components/schemas/InitializePhaseState'
failure:
$ref: '#/components/schemas/Failure'
ValidatePhaseState:
type: string
enum:
- VALIDATING
- VALIDATED
- FAILED
TransactionValidatePhase:
properties:
status:
$ref: '#/components/schemas/TransactionPhaseStatus'
state:
$ref: '#/components/schemas/ValidatePhaseState'
failure:
$ref: '#/components/schemas/Failure'
CommitPhaseState:
type: string
enum:
- COMMITTING
- COMMITTED
TransactionCommitPhase:
properties:
status:
$ref: '#/components/schemas/TransactionPhaseStatus'
state:
$ref: '#/components/schemas/CommitPhaseState'
ApplyPhaseState:
type: string
enum:
- APPLYING
- APPLIED
- FAILED
TransactionApplyPhase:
properties:
status:
$ref: '#/components/schemas/TransactionPhaseStatus'
state:
$ref: '#/components/schemas/ApplyPhaseState'
failure:
$ref: '#/components/schemas/Failure'
AbortPhaseState:
type: string
enum:
- ABORTING
- ABORTED
TransactionAbortPhase:
properties:
status:
$ref: '#/components/schemas/TransactionPhaseStatus'
state:
$ref: '#/components/schemas/AbortPhaseState'
TransactionPhases:
properties:
initialize:
description: the transaction initialization phase status
$ref: '#/components/schemas/TransactionInitializePhase'
validate:
description: the transaction validation phase status
$ref: '#/components/schemas/TransactionValidatePhase'
commit:
description: the transaction commit phase status
$ref: '#/components/schemas/TransactionCommitPhase'
apply:
description: the transaction apply phase status
$ref: '#/components/schemas/TransactionApplyPhase'
abort:
description: the transaction abort phase status
$ref: '#/components/schemas/TransactionAbortPhase'
ProposalID:
type: string
State:
type: string
enum:
- PENDING
- VALIDATED
- APPLIED
- FAILED
Status:
properties:
phases:
description: the transaction phases
$ref: '#/components/schemas/TransactionPhases'
proposals:
description: the set of proposals managed by the transaction
type: array
items:
$ref: '#/components/schemas/ProposalID'
state:
description: the overall transaction state
$ref: '#/components/schemas/State'
failure:
$ref: '#/components/schemas/Failure'
Transaction:
description: Transaction refers to a multi-target transactional change. Taken from https://github.com/onosproject/onos-api/tree/master/proto/onos/config/v2
properties:
meta:
description: the meta of the Transaction
properties:
key:
description: the key of the Transaction
type: string
version:
description: the version of the Transaction
type: integer
format: int64
revision:
description: the change revision number
$ref: '#/components/schemas/Revision'
created:
description: the time at which the transaction was created
type: string
format: date-time
updated:
description: the time at which the transaction was last updated
type: string
format: date-time
deleted:
description: the time at which the transcation was deleted
type: string
format: date-time
id:
description: the unique identifier of the transaction
type: string
index:
description: a monotonically increasing, globally unique index of the change
type: integer
format: int64
username:
description: the name of the user that made the transaction
type: string
strategy:
description: the transaction strategy
$ref: '#/components/schemas/Strategy'
details:
description: the transaction details
$ref: '#/components/schemas/Details'
status:
description: the current lifecycle status of the transaction
$ref: '#/components/schemas/Status'
required:
- id
- index
- meta
TransactionList:
items:
$ref: '#/components/schemas/Transaction'
type: array
info:
contact:
email: [email protected]
name: Open Networking Foundation
url: https://opennetworking.org
license:
name: Apache-2.0
url: http://www.apache.org/licenses/LICENSE-2.0
title: Aether Top Level
description: |-
The "Aether Top Level" can be used for the PATCH command.
It allows several of the Resources of the model specific resources to be committed in one command.
GETs should continue to be done through the individual REST resources.
> This interface is intended to be used only by expert users. It is used by the GUI to make multiple
commits in 1 transaction. e.g. deleting many resources at once.
version: 2.0.0
openapi: 3.0.0
paths:
/aether-roc-api:
patch:
operationId: patch-top-level
responses:
"200":
description: patched
summary: PATCH at the top level of aether-roc-api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchBody'
/targets:
get:
operationId: targets-top-level
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/TargetsNames'
description: GET OK 200
summary: GET /targets A list of just target names
/sdcore/synchronize/{service}:
post:
operationId: sdcore-push-config-top-level
responses:
"200":
description: synchronized
summary: POST /sdcore/synchronize/{service}
parameters:
- content:
text/plain; charset=utf-8:
schema:
type: string
description: sdcore service name e.g. sdcore-adapter-v4
in: path
name: service
required: true
/transactions:
get:
operationId: get-transactions
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionList'
description: GET OK 200
summary: GET /transactions
tags:
- TransactionList
/spec:
get:
operationId: spec-top-level
responses:
"200":
content:
application/yaml:
schema:
type: string
description: GET OK 200
summary: GET /spec The Top Level Spec in YAML format. Same as aether-top-level-openapi3.yaml
/spec/aether-2.0.0-openapi3.yaml:
get:
operationId: spec-aether-200
responses:
"200":
content:
application/yaml:
schema:
type: string
description: GET OK 200
summary: GET /spec/aether-2.0.0-openapi3.yaml The Aether 2.0.0 spec
/spec/aether-2.1.0-openapi3.yaml:
get:
operationId: spec-aether-210
responses:
"200":
content:
application/yaml:
schema:
type: string
description: GET OK 200
summary: GET /spec/aether-2.1.0-openapi3.yaml The Aether 2.1.0 spec
/spec/aether-app-gtwy-openapi3.yaml:
get:
operationId: spec-aether-app-gtwy
responses:
"200":
content:
application/yaml:
schema:
type: string
description: GET OK 200
summary: GET /spec/aether-app-gtwy-openapi3.yaml The Aether Application Gateway spec