VNFLifecycleOperationGranting.yaml 12.2 KB
Newer Older
1
openapi: 3.0.2
2
3

info:
4
  title: SOL003 - VNF Lifecycle Operation Granting interface
5
  description: |
6
7
    SOL003 - VNF Lifecycle Operation Granting interface

8
    IMPORTANT: Please note that this file might be not aligned to the current
9
10
11
    version of the ETSI Group Specification it refers to. In case of
    discrepancies the published ETSI Group Specification takes precedence.

12
    Please report bugs to https://forge.etsi.org/rep/nfv/SOL002-SOL003/issues
13

14
15
  contact:
    name: NFV-SOL WG
16
  license:
17
    name: ETSI Forge copyright notice
18
    url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
19
  version: "1.5.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
20

21
externalDocs:
22
23
  description: ETSI GS NFV-SOL 003 V3.5.1
  url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.05.01_60/gs_NFV-SOL003v030501p.pdf
24

25
26
27
servers:
  - url: http://127.0.0.1/grant/v1
  - url: https://127.0.0.1/grant/v1
28
29

paths:
30
31
32
  ###############################################################################
  # API Versions                                                                #
  ###############################################################################
33
  /api_versions:
34
    $ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
35

36
37
38
  ###############################################################################
  # Resource: Grants                                                            #
  ###############################################################################
39
  /grants:
40
    #SOL003 location: 9.4.2
41
    post:
42
      description: |
43
        The POST method requests a grant for a particular VNF lifecycle operation. See clause 9.4.2.3.1.
44
      parameters:
45
46
47
48
49
        - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Accept
        - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
        - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
      requestBody:
        $ref: '#/components/requestBodies/GrantRequest'
50
51
      responses:
        201:
52
          $ref: '#/components/responses/Grants.Post.201'
53
        202:
54
          $ref: '#/components/responses/Grants.Post.202'
55
        400:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
56
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/400"
57
        401:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
58
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/401"
59
        403:
60
          $ref: '#/components/responses/Grants.Post.403'
61
        404:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
62
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/404"
63
        405:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
64
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/405"
65
        406:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
66
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/406"
67
        422:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
68
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/422"
69
        500:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
70
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/500"
71
        503:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
72
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/503"
73
        504:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
74
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/504"
75

76
77
78
  ###############################################################################
  # Resource: Individual grant                                                  #
  ###############################################################################
79
  /grants/{grantId}:
80
    #SOL003 location: 9.4.3
81
    parameters:
82
      - $ref: '#/components/parameters/GrantId'
83
    get:
84
      description: |
85
        The GET method reads a grant. See clause 9.4.3.3.2.
Gergely Csatari's avatar
Gergely Csatari committed
86
      parameters:
87
88
89
        - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Accept
        - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
        - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
90
91
      responses:
        200:
92
          $ref: '#/components/responses/IndividualGrant.Get.200'
93
        202:
94
          $ref: '#/components/responses/IndividualGrant.Get.202'
95
        400:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
96
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/400"
97
        401:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
98
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/401"
99
        403:
100
          $ref: '#/components/responses/IndividualGrant.Get.403'
101
        404:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
102
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/404"
103
        405:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
104
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/405"
105
        406:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
106
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/406"
107
        422:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
108
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/422"
109
        500:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
110
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/500"
111
        503:
Francesca Moscatelli's avatar
Francesca Moscatelli committed
112
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/503"
113
        504:
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
          $ref: "../../responses/SOL002SOL003_resp.yaml#/components/responses/504"


components:
  parameters:
    GrantId:
      name: grantId
      in: path
      description: |
        Identifier of the grant.
        This identifier can be retrieved from the resource referenced by the
        "Location" HTTP header in the response to a POST request granting a
        new VNF lifecycle operation. It can also be retrieved from the "id"
        attribute in the payload body of that response.
      required: true
      style: simple
      explode: false
      schema:
        type: string
  
  requestBodies:
    GrantRequest:
      content:
        application/json:
          schema:
139
            $ref: "definitions/SOL003VNFLifecycleOperationGranting_def.yaml#/definitions/GrantRequest"
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
      required: true

  responses:
    Grants.Post.201:
      description: |
        201 CREATED

        Shall be returned when the grant has been created successfully (synchronous mode).
        A representation of the created "Individual grant" resource shall be returned in the response body.
        The HTTP response shall include a "Location" HTTP header that indicates the URI of the "Individual grant"
        resource just created.
      headers:
        Location:
          description: |
            The resource URI of the created subscription resource.
          style: simple
          explode: false
          schema:
            type: string
            format: url
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
177
            $ref: "definitions/SOL003VNFLifecycleOperationGranting_def.yaml#/definitions/Grant"
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

    Grants.Post.202:
      description: |
        202 ACCEPTED

        Shall be returned when the request has been accepted for processing
        and it is expected to take some time to create the grant (asynchronous mode).
        The response body shall be empty.
        The HTTP response shall include a "Location" HTTP header that indicates the URI
        of the "Individual grant" resource that will be created once the granting decision has been made.
      headers:
        Location:
          description: |
            The resource URI of the created subscription resource.
          style: simple
          explode: false
          schema:
            type: string
            format: url
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string

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
    Grants.Post.403:
      description: |
        403 FORBIDDEN

        Shall be returned upon the following error: The grant
        has been rejected.
        A ProblemDetails structure shall be included in the
        response to provide more details about the rejection
        in the "details" attribute.
      headers:
        Location:
          description: |
            The resource URI of the created subscription resource.
          style: simple
          explode: false
          schema:
            type: string
            format: url
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        Content-Type:
          description: |
            The MIME type of the body of the response. Reference: IETF RFC 7231
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"

256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
    IndividualGrant.Get.200:
      description: |
        200 OK

        Shall be returned when the grant has been read successfully.
        A representation of the "Individual grant" resource shall be returned in the response body.
      headers:
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
280
            $ref: "definitions/SOL003VNFLifecycleOperationGranting_def.yaml#/definitions/Grant"
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301

    IndividualGrant.Get.202:
      description: |
        202 ACCEPTED

        Shall be returned when the process of creating the grant is ongoing, no grant is available yet.
        The response body shall be empty.
      headers:
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
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
            type: string

    IndividualGrant.Get.403:
      description: |
        403 FORBIDDEN

        Shall be returned upon the following error: The grant
        has been rejected.
        A ProblemDetails structure shall be included in the
        response to provide more details about the rejection in
        the "details" attribute.
      headers:
        WWW-Authenticate:
          description: |
            Challenge if the corresponding HTTP request has not provided authorization, or error details if the
            corresponding HTTP request has provided an invalid authorization token.
          style: simple
          explode: false
          schema:
            type: string
        Version:
          description: The used API version.
          style: simple
          explode: false
          schema:
            type: string
        Content-Type:
          description: |
            The MIME type of the body of the response. Reference: IETF RFC 7231
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"