Commit 16d8ff1d authored by Francesca Moscatelli's avatar Francesca Moscatelli
Browse files

SOL002 initial migration to OpenAPI v3

parent 4cb43914
Pipeline #3568 failed with stage
in 0 seconds
......@@ -18,6 +18,10 @@ externalDocs:
description: ETSI GS NFV-SOL 002 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_nfv-sol002v020701p.pdf
security:
- OauthSecurity:
- all
servers:
- url: http://127.0.0.1/vnfconfig/v1
- url: https://127.0.0.1/vnfconfig/v1
......
......@@ -18,6 +18,10 @@ externalDocs:
description: ETSI GS NFV-SOL 002 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_nfv-sol002v020701p.pdf
security:
- OauthSecurity:
- all
servers:
- url: http://127.0.0.1/vnffm/v1
- url: https://127.0.0.1/vnffm/v1
......@@ -510,7 +514,7 @@ components:
explode: false
schema:
type: string
content: {}
content: {}
Subscriptions.Get:
description: |
......
......@@ -15,6 +15,10 @@ externalDocs:
description: ETSI GS NFV-SOL 002 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_nfv-sol002v020701p.pdf
security:
- OauthSecurity:
- all
servers:
- url: http://127.0.0.1/vnfind/v1
- url: https://127.0.0.1/vnfind/v1
......
swagger: "2.0"
openapi: 3.0.2
info:
version: "1.4.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: SOL002 - VNF Lifecycle Management interface
description: >
SOL002 - VNF Lifecycle Management interface
IMPORTANT: Please note that this file might be not aligned to the current
version of the ETSI Group Specification it refers to and has not been
approved by the ETSI NFV ISG. In case of discrepancies the published ETSI
Group Specification takes precedence.
Please report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis
description: |
SOL002 - VNF Lifecycle Management interface IMPORTANT: Please note that this file might be not aligned to the
current version of the ETSI Group Specification it refers to and has not been approved by the ETSI NFV ISG.
In case of discrepancies the published ETSI Group Specification takes precedence. Please report bugs to
https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis
contact:
name: NFV-SOL WG
license:
name: ETSI Forge copyright notice
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: NFV-SOL WG
version: 1.4.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
externalDocs:
description: ETSI GS NFV-SOL 002 V2.7.1
description: ETSI GS NFV-SOL 002 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_nfv-sol002v020701p.pdf
basePath: /vnflcm/v1
schemes:
- http
- https
security:
- OauthSecurity:
- all
consumes:
- application/json
produces:
- application/json
servers:
- url: http://127.0.0.1/vnflcm/v1
- url: https://127.0.0.1/vnflcm/v1
paths:
###############################################################################
# API Versions #
###############################################################################
'/api_versions':
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
###############################################################################
# VNF instances #
###############################################################################
'/vnf_instances':
#SOL003 location: 5.4.2
/api_versions:
$ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
/vnf_instances:
parameters:
- name: Version
description: >
Version of the API requested to use when responding to this request.
in: header
required: true
type: string
- name: Authorization
description: >
The authorization token for the request.
Reference: IETF RFC 7235
in: header
required: false
type: string
post:
description: >
The POST method creates a new VNF instance resource.
parameters:
- name: createVnfRequest
description: >
The VNF creation parameters, as defined in clause 5.5.2.3.
in: body
required: true
schema:
$ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/CreateVnfRequest"
- name: Accept
description: >
Content-Types that are acceptable for the response.
Reference: IETF RFC 7231
in: header
required: true
type: string
- name: Content-Type
description: >
The MIME type of the body of the request.
Reference: IETF RFC 7231
in: header
required: true
type: string
responses:
201:
description: >
201 CREATED
Shall be returned when a new "Individual VNF Instance" resource and
the associated VNF instance identifier has been created successfully.
The response body shall contain a representation of the created VNF
instance, as defined in clause 5.5.2.2.
The HTTP response shall include a "Location" HTTP header that contains
the resource URI of the created VNF instance.
headers:
Content-Type:
description: >
The MIME type of the body of the response.
type: string
maximum: 1
minimum: 1
Location:
description: >
The resource URI of the created VNF instance
type: string
format: url
maximum: 1
minimum: 1
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.
type: string
maximum: 1
minimum: 0
Version:
description: >
The used API version.
type: string
maximum: 1
minimum: 1
schema:
$ref: "definitions/SOL002VNFLifecycleManagement_def.yaml#/definitions/VnfInstance"
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
404:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
405:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
416:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/416"
422:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/422"
429:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/429"
500:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500"
503:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503"
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
get:
description: >
description: |
The GET method queries information about multiple VNF instances.
parameters:
- name: Accept
description: >
Content-Types that are acceptable for the response.
Reference: IETF RFC 7231
in: header
required: true
type: string
- name: filter
description: >
Attribute-based filtering expression according to clause 5.2 of ETSI GS NFV-SOL 013.
The VNFM shall support receiving this parameter as part of the URI query string.
The EM may supply this parameter. All attribute names that appear in the VnfInstance
and in data types referenced from it shall be supported by the VNFM in the filter expression.
EXAMPLE
objects
obj1: {"id":123, "weight":100, "parts":[{"id":1, "color":"red"}, {"id":2, "color":"green"}]}
obj2: {"id":456, "weight":500, "parts":[{"id":3, "color":"green"}, {"id":4, "color":"blue"}]}
Request 1:
GET …/container
Response 1:
[
{"id":123, "weight":100, "parts":[{"id":1, "color":"red"}, {"id":2, "color":"green"}]},
{"id":456, "weight":500, "parts":[{"id":3, "color":"green"}, {"id":4, "color":"blue"}]}
]
Request 2:
GET …/container?filter=(eq.weight,100)
Response 2:
[
{"id":123, "weight":100, "parts":[{"id":1, "color":"red"}, {"id":2, "color":"green"}]}
]
#Request 2 in EXAMPLE from clause 4.3.2 probably wrong, since "," should be used after opOne (eq), "." is used
in: query
required: false
type: string
- name: all_fields
description: >
Include all complex attributes in the response.
See clause 5.3 of ETSI GS NFV-SOL 013 for details. The VNFM shall support this parameter.
in: query
required: false
type: string
- name: fields
description: >
Complex attributes to be included into the response.
See clause 5.3 of ETSI GS NFV-SOL 013 for details. The VNFM should support this parameter.
in: query
required: false
type: string
- name: exclude_fields
description: >
Complex attributes to be excluded from the response.
See clause 5.3 of ETSI GS NFV-SOL 013 for details. The VNFM should support this parameter.
in: query
required: false
type: string
- name: exclude_default
description: >
Indicates to exclude the following complex attributes from the response.
See clause 5.3 of ETSI GS NFV-SOL 013 for details. The VNFM shall support this parameter.
The following attributes shall be excluded from the VnfInstance structure
in the response body if this parameter is provided, or none of the parameters
"all_fields," "fields", "exclude_fields", "exclude_default" are provided:
- vnfConfigurableProperties
- instantiatedVnfInfo
- metadata
- extensions
in: query
required: false
type: string
- name: nextpage_opaque_marker
description: >
Marker to obtain the next page of a paged response.
Shall be supported by the VNFM if the VNFM supports
alternative 2 (paging) according to clause 5.4.2.1
of ETSI GS NFV-SOL 013 for this resource.
in: query
required: false
type: string
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Accept
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/filter
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/all_fields
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/fields
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/exclude_fields
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/exclude_default
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/nextpage_opaque_marker
responses:
200:
description: >
200 OK
Information about zero or more VNF instances has been queried
successfully. The response body shall contain in an array the
representations of zero or more VNF instances.
headers:
Content-Type:
description: The MIME type of the body of the response.
type: string
maximum: 1
minimum: 1
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.
type: string
maximum: 1
minimum: 0
Version:
description: The used API version.
type: string
maximum: 1
minimum: 1
schema:
type: array
items:
$ref: "definitions/SOL002VNFLifecycleManagement_def.yaml#/definitions/VnfInstance"
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
404:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
405:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
416:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/416"
422:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/422"
429:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/429"
500:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500"
503:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503"
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
###############################################################################
# Individual VNF instance #
###############################################################################
'/vnf_instances/{vnfInstanceId}':
#SOL003 location: 5.4.3.2
"200":
$ref: '#/components/responses/VnfInstances.Get'
"400":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/400
"401":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/401
"403":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/403
"404":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/404
"405":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/405
"406":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/406
"416":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/416
"422":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/422
"429":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/429
"500":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/500
"503":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/503
"504":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/504
post:
description: |
The POST method creates a new VNF instance resource.
parameters:
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Accept
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/ContentType
requestBody:
$ref: '#/components/requestBodies/VnfInstanceCreationRequest'
responses:
"201":
$ref: '#/components/responses/VnfInstances.Post'
"400":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/400
"401":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/401
"403":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/403
"404":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/404
"405":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/405
"406":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/406
"416":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/416
"422":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/422
"429":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/429
"500":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/500
"503":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/503
"504":
$ref: ../../responses/SOL002SOL003_resp.yaml#/responses/504
/vnf_instances/{vnfInstanceId}:
parameters:
- name: vnfInstanceId
description: >
Identifier of the VNF instance. This identifier can be retrieved from
the resource referenced by the "Location" HTTP header in the response
to a POST request creating a new VNF instance resource. It can also
be retrieved from the "id" attribute in the payload body of that
response.
in: path
type: string
required: true
- name: Version
description: >
Version of the API requested to use when responding to this request.
in: header
required: true
type: string
- name: Authorization
description: >
The authorization token for the request.
Reference: IETF RFC 7235
in: header
required: false
type: string
- $ref: '#/components/parameters/VnfInstanceId'
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
get:
description: >
description: |
Information about a VNF instance by reading an "Individual VNF instance".
responses:
200:
description: >
200 OK
Information about an individual VNF instance has been read successfully.
The response body shall contain a representation of the VNF instance,
as defined in clause 5.5.2.2.
headers:
Content-Type:
description: The MIME type of the body of the response.
type: string
maximum: 1
minimum: 1
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.
type: string
maximum: 1
minimum: 0
Version:
description: The used API version.
type: string
maximum: 1
minimum: 1
schema:
$ref: "definitions/SOL002VNFLifecycleManagement_def.yaml#/definitions/VnfInstance"
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
404:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
405:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
416:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/416"
422:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/422"
429:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/429"
500:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500"
503:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503"
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
patch:
#SOL003 location: 5.4.3.3.4
description: >
This method modifies an "Individual VNF instance" resource. Changes to
the VNF configurable properties are applied to the configuration in
the VNF instance, and are reflected in the representation of this
resource. Other changes are applied to the VNF instance information
managed by the VNFM, and are reflected in the representation of this
resource
parameters:
- name: vnfInfoModifications
description: Input parameters for VNF info modification
required: true
in: body
schema:
$ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfInfoModificationRequest"
responses:
202:
description: >
202 ACCEPTED
The request was accepted for processing, but the processing has not been completed.
On success, the HTTP response shall include a "Location" HTTP header that contains
the URI of the newly-created an "Individual VNF LCM operation occurrence" resource
corresponding to the operation.
The response body shall be empty.
headers:
Content-Type:
description: The MIME type of the body of the response.
type: string
maximum: 1
minimum: 1
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.
type: string
maximum: 1
minimum: 0
Version:
description: The used API version.
type: string
maximum: 1
minimum: 1
Location:
description: >
Used in redirection, or when a new resource has been created.
This header field shall be present if the response status code is 201 or 3xx.
In the present document this header field is also used if the response status
code is 202 and a new resource was created.
type: string
format: url
maximum: 1
minimum: 1
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
404:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
405:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
# description: >
# 409 CONFLICT
# Error: The operation cannot be executed currently, due to a conflict with the state
# of the "Individual VNF instance" resource.
# Typically, this is due to the fact that another LCM operation is ongoing.
# The response body shall contain a ProblemDetails structure, in which the "detail"
# attribute should convey more information about the error.
# schema:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/409"
412:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/412"