-
Notifications
You must be signed in to change notification settings - Fork 13
/
openapi.yml
127 lines (120 loc) · 3.87 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
openapi: 3.0.0
info:
version: '0.1.2'
title: of_lldp
description: Discover network-to-network interfaces (NNIs) using the LLDP protocol.
servers:
- url: http://localhost:8181/api/kytos/of_lldp
description: Local server.
paths:
/v1/interfaces/:
get:
summary: List interfaces available to receive the LLDP packet.
description: List interfaces available to receive the LLDP packet.
operationId: list_interfaces
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Lista'
example: # Child of media type because we use $ref above
# Properties of a referenced object
interfaces: ["00:00:00:00:00:00:00:04:65534","00:00:00:00:00:00:00:03:65534"]
/v1/interfaces/enable/:
post:
summary: Enable interfaces to receive lldp packet.
description: Enable interfaces to receive lldp packet.
operationId: enable_lldp
requestBody:
description: Enable interfaces
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Lista'
example: # Child of media type because we use $ref above
# Properties of a referenced object
interfaces: ["00:00:00:00:00:00:00:04:65534","00:00:00:00:00:00:00:03:65534"]
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Lista'
'400':
description: No interfaces were found.
/v1/interfaces/disable/:
post:
summary: Disable Interfaces
description: Disable interfaces
operationId: disable_lldp
requestBody:
description: Disable interfaces
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Lista'
example: # Child of media type because we use $ref above
# Properties of a referenced object
interfaces: ["00:00:00:00:00:00:00:04:65534","00:00:00:00:00:00:00:03:65534"]
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Lista'
'400':
description: Some interfaces have not been disabled.
/v1/polling_time:
get:
summary: Get LLDP Polling time.
description: Get LLDP polling time in seconds.
operationId: time_lldp
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Lista'
example: {"polling_time": 3}
post:
summary: Update the LLDP polling time at runtime.
description: Update LLDP polling time at runtime, this change is not persistent.
operationId: update_polling_time
requestBody:
description: The new LLDP polling time in seconds.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Lista'
example:
# Properties of a referenced object
{"polling_time":4}
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Lista'
example: 'Polling time has been updated.'
'400':
description: Bad format.
components:
schemas:
Lista:
type: object
properties:
interface:
type: array
items:
$ref: '#/components/schemas/Lista'