578708ded8810673db1140e0394e1c3a2a665ecb
[so.git] / adapters / etsi-sol003-adapter / etsi-sol003-lcm / etsi-sol003-lcm-api / src / main / resources / etsisol003adapter.yaml
1 swagger: '2.0'
2 info:
3   version: 1.0.0
4   title: ONAP SO VNFM Adapter API
5   description: >-
6     Describes the API between SO (Service Orchestrator) and the adapter for VNFM
7     (Virtual Network Function Manager)
8 basePath: /so/vnfm-adapter/v1
9 schemes:
10   - http
11   - https
12 consumes:
13   - application/json
14 produces:
15   - application/json
16 paths:
17   '/vnfs/{vnfId}':
18     post:
19       tags:
20         - SO VNFM Adapter
21       summary: VNF create
22       description: Create a VNF instance using a VNFM.
23       operationId: vnf_create
24       consumes:
25         - application/json
26       parameters:
27         - required: true
28           type: string
29           description: >-
30             The identifier of the VNF. This must be the vnf-id of an existing
31             generic-vnf in AAI.
32           name: vnfId
33           in: path
34         - in: body
35           name: body
36           description: VNF creation parameters
37           required: true
38           schema:
39             $ref: '#/definitions/CreateVnfRequest'
40         - name: X-ONAP-RequestID
41           description: >-
42             Used to track REST requests for logging purposes. Identifies a
43             single top level invocation of ONAP
44           in: header
45           required: true
46           type: string
47         - name: X-InvocationID
48           description: >-
49             Used to track REST requests for logging purposes. Identifies a
50             single invocation of a single component
51           in: header
52           required: true
53           type: string
54       responses:
55         '202':
56           description: >-
57             The request was accepted for processing, but the processing has not
58             been completed.
59           schema:
60             $ref: '#/definitions/CreateVnfResponse'
61         '400':
62           description: >-
63             An error occurred in the VNFM adapter relating to the given input,
64             for example, if the definition of the given VNF in AAI does not
65             included required information.
66         '404':
67           description: A VNF with the specified ID was not found in AAI.
68         '500':
69           description: >-
70             An error occurred in the VNFM adapter not relating to the given
71             input, or an error is received from the VNFM.
72     delete:
73       tags:
74         - SO VNFM Adapter
75       summary: VNF delete
76       description: Delete an instance of a VNF using a VNFM.
77       operationId: vnf_delete
78       consumes:
79         - application/json
80       parameters:
81         - required: true
82           type: string
83           description: >-
84             The identifier of the VNF. This must be the vnf-id of an existing
85             generic-vnf in AAI
86           name: vnfId
87           in: path
88         - name: X-ONAP-RequestID
89           description: >-
90             Used to track REST requests for logging purposes. Identifies a
91             single top level invocation of ONAP
92           in: header
93           required: true
94           type: string
95         - name: X-InvocationID
96           description: >-
97             Used to track REST requests for logging purposes. Identifies a
98             single invocation of a single component
99           in: header
100           required: true
101           type: string
102       responses:
103         '202':
104           description: >-
105             The request was accepted for processing, but the processing has not
106             been completed.
107           schema:
108             $ref: '#/definitions/DeleteVnfResponse'
109         '400':
110           description: >-
111             An error occurred in the VNFM adapter relating to the given input,
112             for example, if the definition of the given VNF in AAI does not
113             included required information.
114         '404':
115           description: A VNF with the specified ID was not found in AAI.
116         '500':
117           description: >-
118             An error occurred in the VNFM adapter not relating to the given
119             input, or an error is received from the VNFM.
120   '/jobs/{jobId}':
121     get:
122       tags:
123         - SO VNFM Adapter
124       summary: Job query
125       description: Query the status of a job.
126       operationId: job_query
127       consumes:
128         - application/json
129       produces:
130         - application/json
131       parameters:
132         - required: true
133           type: string
134           description: The identifier of the Job.
135           name: jobId
136           in: path
137         - name: X-ONAP-RequestID
138           description: >-
139             Used to track REST requests for logging purposes. Identifies a
140             single top level invocation of ONAP
141           in: header
142           required: true
143           type: string
144         - name: X-InvocationID
145           description: >-
146             Used to track REST requests for logging purposes. Identifies a
147             single invocation of a single component
148           in: header
149           required: true
150           type: string
151       responses:
152         '200':
153           description: ''
154           schema:
155             $ref: '#/definitions/QueryJobResponse'
156         '404':
157           description: A job with the specified ID was not found.
158         '500':
159           description: >-
160             An error occurred in the VNFM adapter not relating to the given
161             input, or an error is received from the VNFM.
162 definitions:
163   CreateVnfRequest:
164     type: object
165     properties:
166       name:
167         type: string
168         description: The name to be applied to the VNF.
169       tenant:
170         $ref: '#/definitions/Tenant'
171       pkgId:
172         type: string
173         description: An identifier for the vnf package.
174       additionalParams:
175         type: object
176         description: >-
177           Additional input parameters for the instantiation process, specific to
178           the VNF being instantiated, as declared in the VNFD as part of
179           "InstantiateVnfOpConfig".
180         additionalProperties:
181           type: string
182       externalVirtualLinks:
183         type: array
184         description: Information about external VLs to connect the VNF to.
185         items:
186           $ref: '#/definitions/ExternalVirtualLink'
187     required:
188       - name
189       - tenant
190   Tenant:
191     type: object
192     description: Details of the tenant that VNFs can be deployed into
193     properties:
194       cloudOwner:
195         type: string
196         description: The owner in AAI of the cloud to which the tenant belongs.
197       regionName:
198         type: string
199         description: The regionName in AAI of the cloud to which the tenant belongs.
200       tenantId:
201         type: string
202         description: The identifier of the tenant in the VIM.
203     required:
204       - cloudOwner
205       - regionName
206       - tenantId
207   CreateVnfResponse:
208     type: object
209     properties:
210       jobId:
211         description: The ID of the job which can be used to query the status of the job
212         type: string
213     required:
214       - jobId
215   DeleteVnfResponse:
216     type: object
217     properties:
218       jobId:
219         description: >-
220           The ID of the job which can be used to query the status of the delete
221           job
222         type: string
223     required:
224       - jobId
225   QueryJobResponse:
226     type: object
227     properties:
228       operationStatusRetrievalStatus:
229         $ref: '#/definitions/OperationStatusRetrievalStatusEnum'
230       id:
231         type: string
232       operation:
233         $ref: '#/definitions/OperationEnum'
234       operationState:
235         $ref: '#/definitions/OperationStateEnum'
236       startTime:
237         type: string
238         format: date-time
239       stateEnteredTime:
240         type: string
241         format: date-time
242       vnfInstanceId:
243         type: string
244     required:
245       - operationStatusRetrievalStatus
246   OperationStatusRetrievalStatusEnum:
247     description: The status of the attempt to retrieve the operation from the VNFM
248     type: string
249     enum:
250       - STATUS_FOUND
251       - WAITING_FOR_STATUS
252       - OPERATION_NOT_FOUND
253       - CANNOT_RETRIEVE_STATUS
254   OperationEnum:
255     description: The operation
256     type: string
257     enum:
258       - INSTANTIATE
259       - SCALE
260       - SCALE_TO_LEVEL
261       - CHANGE_FLAVOUR
262       - TERMINATE
263       - HEAL
264       - OPERATE
265       - CHANGE_EXT_CONN
266       - MODIFY_INFO
267   OperationStateEnum:
268     description: The status of the operation
269     type: string
270     enum:
271       - STARTING
272       - PROCESSING
273       - COMPLETED
274       - FAILED_TEMP
275       - FAILED
276       - ROLLING_BACK
277       - ROLLED_BACK
278   ExternalVirtualLink:
279     description: |
280       This type represents an external VL.
281     type: object
282     required:
283       - id
284       - resourceId
285       - extCps
286     properties:
287       id:
288         description: |
289           An identifier with the intention of being globally unique.
290         type: string
291       tenant:
292         $ref: '#/definitions/Tenant'
293       resourceId:
294         description: |
295           An identifier maintained by the VIM.
296         type: string
297       extCps:
298         description: |
299           External CPs of the VNF to be connected to this external VL.
300         type: array
301         items:
302           description: >
303             This type represents configuration information for external CPs
304             created from a CPD.
305           type: object
306           required:
307             - cpdId
308           properties:
309             cpdId:
310               description: |
311                 An identifier that is unique within a VNF descriptor.
312               type: string
313             cpConfig:
314               description: >
315                 List of instance data that need to be configured on the CP
316                 instances created from the respective CPD.
317               type: array
318               items:
319                 description: >
320                   This type represents an externally provided link port or
321                   network address information per instance of an external
322                   connection point. In case a link port is provided, the VNFM
323                   shall use that link port when connecting the external CP to
324                   the external VL. In a link port is not provided, the VNFM
325                   shall create a link port on the external VL, and use that link
326                   port to connect the external CP to the external VL.
327                 type: object
328                 properties:
329                   cpInstanceId:
330                     description: >
331                       An identifier that is unique for the respective type
332                       within a VNF instance, but may not be globally unique.
333                     type: string
334                   linkPortId:
335                     description: |
336                       An identifier with the intention of being globally unique.
337                     type: string
338                   cpProtocolData:
339                     description: >
340                       Parameters for configuring the network protocols on the
341                       link port that connects the CP to a VL.  The following
342                       conditions apply to the attributes "linkPortId" and
343                       "cpProtocolData":  * The "linkPortId" and "cpProtocolData"
344                       attributes shall both be  absent for the deletion of an
345                       existing external CP instance
346                         addressed by cpInstanceId. 
347                       * At least one of these attributes shall be present for a 
348                       to-be-created external CP instance or an existing external
349                         CP instance.
350                       * If the "linkPortId" attribute is absent, the VNFM shall
351                       create a  link port.
352
353                       * If the "cpProtocolData" attribute is absent, the
354                       "linkPortId"  attribute shall be provided referencing a
355                       pre-created link port,
356                         and the VNFM can use means outside the scope of the present
357                         document to obtain the pre-configured address information for the
358                         connection point from the resource representing the link port.
359                       * If both "cpProtocolData" and "linkportId" are provided,
360                       the API  consumer shall ensure that the cpProtocolData can
361                       be used with the
362                         pre-created link port referenced by "linkPortId".
363                     type: array
364                     items:
365                       description: |
366                         This type represents network protocol data.
367                       type: object
368                       required:
369                         - layerProtocol
370                       properties:
371                         layerProtocol:
372                           description: >
373                             Identifier of layer(s) and protocol(s). This
374                             attribute allows to signal the addition of further
375                             types of layer and protocol in future versions of
376                             the present document in a backwards-compatible way.
377                             In the current version of the present document, only
378                             IP over Ethernet is supported.
379                           type: string
380                           enum:
381                             - IP_OVER_ETHERNET
382                         ipOverEthernet:
383                           description: >
384                             This type represents network address data for IP
385                             over Ethernet.
386                           type: object
387                           properties:
388                             macAddress:
389                               description: >
390                                 A MAC address. Representation: string that
391                                 consists of groups of two hexadecimal digits,
392                                 separated by hyphens or colons.
393                               type: string
394                               format: MAC
395                             ipAddresses:
396                               description: >
397                                 List of IP addresses to assign to the CP
398                                 instance. Each entry represents IP address data
399                                 for fixed or dynamic IP address assignment per
400                                 subnet. If this attribute is not present, no IP
401                                 address shall be assigned.
402                               type: array
403                               items:
404                                 type: object
405                                 required:
406                                   - type
407                                 properties:
408                                   type:
409                                     description: >
410                                       The type of the IP addresses. Permitted
411                                       values: IPV4, IPV6.
412                                     type: string
413                                     enum:
414                                       - IPV4
415                                       - IPV6
416                                   fixedAddresses:
417                                     description: >
418                                       Fixed addresses to assign (from the subnet
419                                       defined by "subnetId" if provided).
420                                       Exactly one of "fixedAddresses",
421                                       "numDynamicAddresses" or "ipAddressRange"
422                                       shall be present.
423                                     type: array
424                                     items:
425                                       description: >
426                                         An IPV4 or IPV6 address. Representation:
427                                         In case of an IPV4 address, string that
428                                         consists of four decimal integers
429                                         separated by dots, each integer ranging
430                                         from 0 to 255. In case of an IPV6
431                                         address, string that  consists of groups
432                                         of zero to four hexadecimal digits,
433                                         separated by colons.
434                                       type: string
435                                       format: IP
436                                   numDynamicAddresses:
437                                     description: >
438                                       Number of dynamic addresses to assign
439                                       (from the subnet defined by "subnetId" if
440                                       provided). Exactly one of
441                                       "fixedAddresses", "numDynamicAddresses" or
442                                       "ipAddressRange" shall be present.
443                                     type: integer
444                                   addressRange:
445                                     description: >
446                                       An IP address range to be used, e.g. in
447                                       case of egress connections. In case this
448                                       attribute is present, IP addresses from
449                                       the range will be used.
450                                     type: object
451                                     required:
452                                       - minAddress
453                                       - maxAddress
454                                     properties:
455                                       minAddress:
456                                         description: >
457                                           An IPV4 or IPV6 address. Representation:
458                                           In case of an IPV4 address, string that
459                                           consists of four decimal integers
460                                           separated by dots, each integer ranging
461                                           from 0 to 255. In case of an IPV6
462                                           address, string that  consists of groups
463                                           of zero to four hexadecimal digits,
464                                           separated by colons.
465                                         type: string
466                                         format: IP
467                                       maxAddress:
468                                         description: >
469                                           An IPV4 or IPV6 address. Representation:
470                                           In case of an IPV4 address, string that
471                                           consists of four decimal integers
472                                           separated by dots, each integer ranging
473                                           from 0 to 255. In case of an IPV6
474                                           address, string that  consists of groups
475                                           of zero to four hexadecimal digits,
476                                           separated by colons.
477                                         type: string
478                                         format: IP
479                                   subnetId:
480                                     description: >
481                                       An identifier maintained by the VIM or
482                                       other resource provider. It is expected to
483                                       be unique within the VIM instance.
484                                     type: string
485       extLinkPorts:
486         description: >
487           Externally provided link ports to be used to connect external
488           connection points to this external VL. If this attribute is not
489           present, the VNFM shall create the link ports on the external VL.
490         type: array
491         items:
492           description: >
493             This type represents an externally provided link port to be used to
494             connect an external connection point to an external VL.
495           type: object
496           required:
497             - id
498             - resourceHandle
499           properties:
500             id:
501               description: |
502                 An identifier with the intention of being globally unique.
503               type: string
504             resourceHandle:
505               required:
506                 - tenant
507                 - resourceId
508               type: object
509               description: >
510                 This type represents the information that allows addressing a
511                 virtualised resource that is used by a VNF instance.
512               properties:
513                 tenant:
514                   $ref: '#/definitions/Tenant'
515                 resourceId:
516                   description: >
517                     An identifier maintained by the VIM or other resource
518                     provider. It is expected to be unique within the VIM
519                     instance.
520                   type: string
521                 vimLevelResourceType:
522                   description: >
523                     Type of the resource in the scope of the VIM or the resource
524                     provider.
525                   type: string