Commit 23383090 authored by moscatelli's avatar moscatelli

SOL002: VNF Lifecycle mgmt interface consolidated + error codes fixed

parent abaff410
Pipeline #887 passed with stage
in 0 seconds
......@@ -161,7 +161,7 @@ paths:
schema:
$ref: "./definitions/VNFFaultManagement_def.yaml#/definitions/Alarm"
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400-attr-based-filtering-error"
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
......@@ -605,7 +605,7 @@ paths:
schema:
$ref: "../../definitions/SOL002SOL003VNFFaultManagement_def.yaml#/definitions/FmSubscription"
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400-attr-based-filtering-error"
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
......
......@@ -2,23 +2,21 @@ swagger: "2.0"
info:
version: "1.2.0"
title: "SOL002 - VNF Configuration interface"
title: "SOL002 - VNF Lifecycle Management Interface"
description: >
VNF Configuration interface of ETSI NFV SOL002
VNF Lifecycle Management Interface of ETSI NFV SOL002
IMPORTANT: Please note that this file might be not aligned to the current
version of the ETSI Group Specification it refers to. 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&list_id=61&product=NFV&resolution=---
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
externalDocs:
description: ETSI GS NFV-SOL 002 V2.5.1
description: "ETSI GS NFV-SOL 002 V2.5.1"
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.05.01_60/gs_nfv-sol002v020501p.pdf
basePath: /vnflcm/v1
......@@ -33,7 +31,6 @@ consumes:
produces:
- application/json
paths:
###############################################################################
# API Versions #
......@@ -41,9 +38,9 @@ paths:
'/api-versions':
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
###############################################################################
# VNF instances #
###############################################################################
###############################################################################
# VNF instances #
###############################################################################
'/vnf_instances':
#SOL003 location: 5.4.2
parameters:
......@@ -53,12 +50,21 @@ paths:
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:
#TODO: Add headers defined in 4.3.4.2
description: "The POST method creates a new VNF instance resource."
description: >
The POST method creates a new VNF instance resource.
parameters:
- name: createVnfRequest
description: The VNF creation parameters
description: >
The VNF creation parameters, as defined in clause 5.5.2.3.
in: body
required: true
schema:
......@@ -70,13 +76,6 @@ paths:
in: header
required: true
type: string
- name: Authorization
description: >
The authorization token for the request.
Reference: IETF RFC 7235
in: header
required: true
type: string
- name: Content-Type
description: >
The MIME type of the body of the request.
......@@ -86,22 +85,29 @@ paths:
type: string
responses:
201:
description: A VNF Instance identifier was created successfully
description: >
201 CREATED
A VNF Instance identifier was 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:
#TODO: Add headers defined in 4.3.4.3
Content-Type:
description: The MIME type of the body of the response.
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
description: >
The resource URI of the created VNF instance
type: string
format: url
maximum: 1
minimum: 1
WWW-Authenticate:
description: >
Created
Challenge if the corresponding HTTP request has not provided
authorization, or error details if the corresponding HTTP
request has provided an invalid authorization token.
......@@ -109,7 +115,8 @@ paths:
maximum: 1
minimum: 0
Version:
description: The used API version.
description: >
The used API version.
type: string
maximum: 1
minimum: 1
......@@ -127,16 +134,18 @@ paths:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/409-inconsistent-state"
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"
get:
description: >
The GET method queries information about multiple VNF instances.
......@@ -148,13 +157,6 @@ paths:
in: header
required: true
type: string
- name: Authorization
description: >
The authorization token for the request.
Reference: IETF RFC 7235
in: header
required: true
type: string
- name: filter
description: >
Attribute-based filtering expression according to clause 4.3.2.
......@@ -224,7 +226,7 @@ paths:
responses:
200:
description: >
OK
200 OK
Information about zero or more VNF instances was queried
successfully. The response body shall contain in an array the
......@@ -253,7 +255,7 @@ paths:
items:
$ref: "definitions/VNFLifecycleManagement_def.yaml#/definitions/VnfInstance"
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400-attr-selector"
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
......@@ -264,17 +266,22 @@ paths:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/409-inconsistent-state"
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"
###############################################################################
# Individual VNF instance #
###############################################################################
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
###############################################################################
# Individual VNF instance #
###############################################################################
'/vnf_instances/{vnfInstanceId}':
#SOL003 location: 5.4.3.2
parameters:
......@@ -294,13 +301,20 @@ paths:
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
get:
description: >
Information about an individual VNF instance was queried successfully.
responses:
200:
description: >
OK
200 OK
Information about zero or more VNF instances was queried
successfully. The response body shall contain
......@@ -338,14 +352,18 @@ paths:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/409-inconsistent-state"
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: >
......@@ -364,9 +382,44 @@ paths:
$ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfInfoModificationRequest"
responses:
202:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/202-with-Location"
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 "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-attr-selector"
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
......@@ -378,13 +431,36 @@ paths:
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/409-another-lcm-operation-ongoing"
description: >
409 CONFLICT
Error: The operation cannot be executed currently, due to a conflict with the state
of the 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.
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/409"
412:
# description: >
# 412 PRECONDITION FAILED
#
# Error: A precondition given in an HTTP request header is not fulfilled.
# Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity.
# The response body should contain a ProblemDetails structure, in which the "detail" attribute should convey
# more information about the error.
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/412"
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"
delete:
#SOL003 location: 5.4.3.3.5
description: >
......@@ -392,7 +468,7 @@ paths:
responses:
204:
description: >
No Content
204 NO CONTENT
The VNF instance resource and the associated VNF identifier were
deleted successfully.
......@@ -412,7 +488,7 @@ paths:
maximum: 1
minimum: 1
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400-attr-selector"
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
......@@ -424,16 +500,30 @@ paths:
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/409-state-conflict-INSTANTIATED"
412:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/412"
description: >
409 CONFLICT
Error: The operation cannot be executed currently, due to a conflict with the state of the resource.
Typically, this is due to the fact that the VNF instance resource is in INSTANTIATED state.
The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall
convey more information about the error.
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/409"
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"
###############################################################################
# Instantiate VNF task #
###############################################################################
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
###############################################################################
# Instantiate VNF task #
###############################################################################
'/vnf_instances/{vnfInstanceId}/instantiate':
#SOL003 location: 5.4.4.2
parameters:
......@@ -453,6 +543,13 @@ paths:
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:
#SOL003 location: 5.4.4.3.1
description: >
......@@ -465,13 +562,14 @@ paths:
schema:
$ref: "definitions/VNFLifecycleManagement_def.yaml#/definitions/InstantiateVnfRequest"
responses:
200:
202:
description: >
OK
202 ACCEPTED
Information about zero or more VNF instances was queried
successfully. The response body shall contain
representations of zero or more VNF instances.
The request was accepted for processing, but the processing has not been completed.
The response body shall be empty.
The HTTP response shall include a "Location" HTTP header that contains the URI of the
newly-created "VNF LCM operation occurrence" resource corresponding to the operation.
headers:
Content-Type:
description: The MIME type of the body of the response.
......@@ -491,8 +589,16 @@ paths:
type: string
maximum: 1
minimum: 1
schema:
$ref: "definitions/VNFLifecycleManagement_def.yaml#/definitions/VnfInstance"
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:
......@@ -506,16 +612,30 @@ paths:
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/409-state-conflict-INSTANTIATED"
description: >
409 CONFLICT
Error: The operation cannot be executed currently, due to a conflict with the state of the resource.
Typically, this is due to the fact that the VNF instance resource is in INSTANTIATED state.
The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall
convey more information about the error.
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/409"
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"
###############################################################################
# Scale VNF task #
###############################################################################
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
###############################################################################
# Scale VNF task #
###############################################################################
'/vnf_instances/{vnfInstanceId}/scale':
#SOL003 location: 5.4.5.2
parameters:
......@@ -535,6 +655,13 @@ paths:
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:
#SOL003 location: 5.4.5.3.1
description: >
......@@ -549,7 +676,42 @@ paths:
$ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/ScaleVnfRequest"
responses:
202:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/202-with-Location"
description: >
202 ACCEPTED
The request was accepted for processing, but the processing has not been completed.
The response body shall be empty.
The HTTP response shall include a "Location" HTTP header that contains the URI of the
newly-created "VNF LCM operation occurrence" resource corresponding to the operation.
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:
......@@ -557,20 +719,37 @@ paths:
403:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
404:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported"
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
405:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/409-state-conflict-NOT-INSTANTIATED"
description: >
409 CONFLICT
Error: The operation cannot be executed currently, due to a conflict with the state of the resource.
Typically, this is due to the fact that the VNF instance resource is in NOT_INSTANTIATED state,
or that another lifecycle management operation is ongoing.
The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall
convey more information about the error.
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/409"
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"
###############################################################################
# Scale VNF to Level task #
###############################################################################
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
###############################################################################
# Scale VNF to Level task #
###############################################################################
'/vnf_instances/{vnfInstanceId}/scale_to_level':
#SOL003 location: 5.4.6.2
parameters:
......@@ -590,6 +769,13 @@ paths:
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:
#SOL003 location: 5.4.6.3.1
description: >
......@@ -604,7 +790,42 @@ paths:
$ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/ScaleVnfToLevelRequest"
responses:
202:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/202-with-Location"
description: >
202 ACCEPTED
The request was accepted for processing, but the processing has not been completed.
The response body shall be empty.
The HTTP response shall include a "Location" HTTP header that contains the URI of the
newly-created "VNF LCM operation occurrence" resource corresponding to the operation.
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:
......@@ -612,20 +833,37 @@ paths:
403:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
404:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported"
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
405:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
409:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/409-state-conflict-NOT-INSTANTIATED"
description: >
409 CONFLICT
Error: The operation cannot be executed currently, due to a conflict with the state of the resource.
Typically, this is due to the fact that the VNF instance resource is in NOT_INSTANTIATED state,
or that another lifecycle management operation is ongoing.
The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall
convey more information about the error.
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/409"
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"
###############################################################################
# Change VNF Flavour task #
###############################################################################
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
###############################################################################
# Change VNF Flavour task #
###############################################################################
'/vnf_instances/{vnfInstanceId}/change_flavour':
#SOL003 location: 5.4.7.2
parameters:
......@@ -646,6 +884,13 @@ paths:
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 changes the deployment flavour of a VNF instance.
......@@ -658,7 +903,42 @@ paths:
$ref: "definitions/VNFLifecycleManagement_def.yaml#/definitions/ChangeVnfFlavourRequest"
responses:
202:
$ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/202-with-Location"
description: >
202 ACCEPTED
The request was accepted for processing, but the processing has not been completed.
The response body shall be empty.
The HTTP response shall include a "Location" HTTP header that contains the URI of the