-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi-spec.yaml
236 lines (233 loc) · 6.69 KB
/
openapi-spec.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
openapi: "3.0.0"
info:
version: 0.1.0
title: Platform Discovery Service API
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
paths:
/discover:
post:
security:
- apiKey: [ ]
- oauth2: [email]
summary: Automatic discovery and modeling of infrastructural resources.
operationId: discover
requestBody:
description: Endpoint information and access credentials.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/DiscoveryInput"
responses:
200:
description: The discovery was successful.
content:
application/json:
schema:
$ref: "#/components/schemas/DiscoveryOutput"
400:
description: Malformed discovery request.
content:
application/json:
schema:
type: string
401:
description: Unauthorized request for discovery.
content:
application/json:
schema:
type: string
500:
description: There was an error during discovery.
content:
application/json:
schema:
type: string
/update:
post:
security:
- apiKey: [ ]
- oauth2: [email]
summary: Automatic discovery and update resource database.
operationId: discover_update
requestBody:
description: Endpoint information and access credentials.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateInput"
responses:
200:
description: The update was successful.
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateOutput"
400:
description: Malformed update request.
content:
application/json:
schema:
type: string
401:
description: Unauthorized request for update.
content:
application/json:
schema:
type: string
500:
description: There was an error during update.
content:
application/json:
schema:
type: string
/subscribe:
post:
security:
- apiKey: [ ]
- oauth2: [email]
summary: Subscription for receiving a notification about discovery and KB updates.
operationId: subscribe
requestBody:
description: Subscription information.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/SubscriptionInput"
responses:
200:
description: The subscription was successful.
content:
application/json:
schema:
$ref: "#/components/schemas/SubscriptionOutput"
400:
description: Malformed subscription request.
content:
application/json:
schema:
type: string
401:
description: Unauthorized request for subscription.
content:
application/json:
schema:
type: string
500:
description: There was an error during subscription.
content:
application/json:
schema:
type: string
components:
schemas:
DiscoveryInput:
description: Endpoint information and access credentials provided as inputs.
type: object
required:
- inputs
- namespace
- platform_type
properties:
inputs:
type: object
namespace:
description: The namespace name in which resource and application models will be saved.
type: string
platform_type:
$ref: "#/components/schemas/PlatformType"
DiscoveryOutput:
description: Result of discovery.
type: object
required:
- timestamp
- service_template
properties:
timestamp:
description: An ISO8601 timestamp of the discovery.
type: string
service_template:
description: The service template with discovered info.
type: object
PlatformType:
type: string
enum:
- slurm
- torque
- openstack
- aws
- kubernetes
UpdateInput:
description: Endpoint information and access credentials provided as inputs.
type: object
required:
- inputs
- namespace
- platform_type
properties:
inputs:
type: object
namespace:
description: The namespace name in which resource and application models will be saved.
type: string
aadm_uri:
description: AADM URI to update (optional).
type: string
rm_uri:
description: RM URI to update (optional).
type: string
platform_type:
$ref: "#/components/schemas/PlatformType"
UpdateOutput:
description: An invocation of the deployment.
type: object
properties:
aadm_uri:
description: AADM URI that stores updated info.
type: string
rm_uri:
description: RM URI that stores updated info.
type: string
SubscriptionInput:
description: Data to register a notification when a discovery is performed
type: object
required:
- namespace
- endpoint
properties:
namespace:
description: The namespace name to be subscribed to.
type: string
endpoint:
description: An endpoint, where a notification will be sent to
type: string
format: uri
payload:
description: A payload, a notification will be sent along with
type: object
SubscriptionOutput:
description: Result of the subscription
type: object
properties:
success:
description: Subscription success information
type: boolean
securitySchemes:
apiKey:
type: apiKey
x-apikeyInfoFunc: pds.api.service.security.check_api_key
name: X-API-Key
in: header
oauth2:
flows:
password:
tokenUrl: http://keycloak:8080/auth/realms/SODALITE/protocol/openid-connect/token
scopes:
email: Email of the user accessing the service.
type: oauth2
x-tokenInfoFunc: pds.api.service.security.token_info
x-scopeValidateFunc: pds.api.service.security.validate_scope