Commit 87d16118 authored by Michele Carignani's avatar Michele Carignani
Browse files

Merge branch '3.3.1-dev' into 'master'

SOL002/SOL003 OpenAPI representations for v3.3.1

See merge request nfv/SOL002-SOL003!15
parents e3eec91b dad03f46
Pipeline #5022 passed with stage
in 0 seconds
build/ build/
*.pyc *.pyc
.idea/
# NFV SOL002 and SOL003 APIs # NFV SOL002 and SOL003 APIs
This repository hosts the [OpenAPI](https://www.openapis.org/) specificatons and other documentation This repository hosts the [OpenAPI](https://www.openapis.org/) specificatons and other documentation
for the APIs defined in ETSI NFV GSs [SOL002](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_NFV-SOL002v020701p.pdf) and [SOL003](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.07.01_60/gs_nfv-sol003v020701p.pdf). for the APIs defined in ETSI NFV GSs SOL002 and SOL003 v3.3.1.
The APIs described in this repository are defined for the following reference points: The APIs described in this repository are defined for the following reference points:
......
# Copyright ETSI 2017 # Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt # See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
FROM alpine:3.6 FROM alpine:3.10.0
RUN env RUN env
RUN apk update RUN apk update
...@@ -16,9 +16,9 @@ RUN gem install rdoc --pre || gem install rdoc --pre ...@@ -16,9 +16,9 @@ RUN gem install rdoc --pre || gem install rdoc --pre
RUN gem install asciidoctor-pdf-cjk RUN gem install asciidoctor-pdf-cjk
RUN wget https://forge.etsi.org/swagger2markup-cli-1.3.2.jar RUN wget https://forge.etsi.org/swagger2markup-cli-1.3.2.jar
RUN npm config set proxy $http_proxy RUN npm config set proxy $http_proxy
RUN npm install -g swagger-tools@0.10.3 RUN npm install -g swagger-cli
RUN npm install -g json-refs@3.0.4 RUN npm install -g json-refs
RUN npm install -g yamljs@0.3.0 RUN npm install -g yamljs
ADD validate-in-docker.sh /validate-in-docker.sh ADD validate-in-docker.sh /validate-in-docker.sh
RUN chmod +x /validate-in-docker.sh RUN chmod +x /validate-in-docker.sh
......
...@@ -32,7 +32,7 @@ function validate_api () { ...@@ -32,7 +32,7 @@ function validate_api () {
mv "${deliverable}-${api}-API.pdf" "../build/" mv "${deliverable}-${api}-API.pdf" "../build/"
echo "--- Validating ${merged_file}" echo "--- Validating ${merged_file}"
swagger-tools validate "${merged_file}" swagger-cli validate "${merged_file}"
vres=$? vres=$?
echo "--- Validation done ($vres)." echo "--- Validation done ($vres)."
......
swagger: "2.0" openapi: 3.0.2
info: info:
version: "1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: SOL002 - API version interface title: SOL002 - API version interface
description: > description: |
SOL002 - API version Interface SOL002 - API version Interface IMPORTANT: Please note that this file might be not aligned to the current version of
IMPORTANT: Please note that this file might be not aligned to the current the ETSI Group Specification it refers to and has not been approved by the ETSI NFV ISG. In case of discrepancies
version of the ETSI Group Specification it refers to and has not been the published ETSI Group Specification takes precedence.
approved by the ETSI NFV ISG. In case of discrepancies the published ETSI Please report bugs to https://forge.etsi.org/rep/nfv/SOL002-SOL003/issues
Group Specification takes precedence. contact:
Please report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis name: NFV-SOL WG
license: license:
name: ETSI Forge copyright notice name: ETSI Forge copyright notice
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact: version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
name: NFV-SOL WG
externalDocs: 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 url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_NFV-SOL002v030301p.pdf
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths: paths:
############################################################################### /vnfconfig/api_versions:
# API Versions # $ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
############################################################################### /vnffm/api_versions:
'/vnfconfig/api_versions': $ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions' /vnfind/api_versions:
$ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
'/vnffm/api_versions': /vnflcm/api_versions:
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions' $ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
/vnfpm/api_versions:
'/vnfind/api_versions': $ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions' \ No newline at end of file
'/vnflcm/api_versions':
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
'/vnfpm/api_versions':
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
\ No newline at end of file
swagger: "2.0" openapi: 3.0.2
info: info:
version: "1.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: SOL002 - VNF Configuration interface title: SOL002 - VNF Configuration interface
description: > description: |
SOL002 - VNF Configuration Interface SOL002 - VNF Configuration Interface IMPORTANT: Please note that this file might be not aligned to the current
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
version of the ETSI Group Specification it refers to and has not been discrepancies the published ETSI Group Specification takes precedence.
approved by the ETSI NFV ISG. In case of discrepancies the published ETSI Please report bugs to https://forge.etsi.org/rep/nfv/SOL002-SOL003/issues
Group Specification takes precedence. contact:
Please report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis name: NFV-SOL WG
license: license:
name: ETSI Forge copyright notice name: ETSI Forge copyright notice
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact: version: 1.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
name: NFV-SOL WG
externalDocs: 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 url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_NFV-SOL002v030301p.pdf
basePath: /vnfconfig/v1
schemes: servers:
- http - url: http://127.0.0.1/vnfconfig/v1
- https - url: https://127.0.0.1/vnfconfig/v1
consumes:
- application/json
produces:
- application/json
paths: paths:
############################################################################### /api_versions:
# API Versions #
###############################################################################
'/api_versions':
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions' $ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
############################################################################### /configuration:
# VNF Configuration #
###############################################################################
'/configuration':
parameters: parameters:
- name: Version - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
description: > - $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
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
get: get:
summary: Read VNF/VNFC configuration from VNF summary: Read VNF/VNFC configuration from VNF
description: > description: |
The client can use this method to read configuration information about a VNF instance and/or its VNFC instances. The client can use this method to read configuration information about a VNF instance and/or its VNFC instances.
responses: responses:
200: "200":
description: > $ref: '#/components/responses/Configuration.Get'
200 OK "400":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/400
Shall be returned when configuration information about a VNF instance "401":
has been read successfully. $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/401
The response body shall contain a representation of the configuration resource. "403":
schema: $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/403
$ref: 'definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfiguration' "404":
headers: $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/404
Content-Type: "405":
description: The MIME type of the body of the response. $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/405
type: string "406":
maximum: 1 $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/406
minimum: 1 "422":
Version: $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/422
description: The used API version. "429":
type: string $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/429
maximum: 1 "500":
minimum: 1 $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/500
WWW-Authenticate: "503":
description: > $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/503
Challenge if the corresponding HTTP request has not provided "504":
authorization, or error details if the corresponding HTTP $ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/504
request has provided an invalid authorization token.
type: string
maximum: 1
minimum: 0
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"
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: patch:
summary: Modify VNF/VNFC configuration. summary: Modify VNF/VNFC configuration.
description: This method sets or modifies a configuration resource. description: This method sets or modifies a configuration resource.
parameters: requestBody:
- name: configModifications $ref: '#/components/requestBodies/ConfigurationRequest'
description: >
The parameter for the configuration modification, as defined in
clause 9.5.2.2.
required: true
in: body
schema:
$ref: 'definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfigModifications'
responses: responses:
200: "200":
description: > $ref: '#/components/responses/Configuration.Patch'
200 OK "400":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/400
"401":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/401
"403":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/403
"404":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/404
"405":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/405
"406":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/406
"412":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/412
"416":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/416
"422":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/422
"429":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/429
"500":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/500
"503":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/503
"504":
$ref: ../../responses/SOL002SOL003_resp.yaml#/components/responses/504
Shall be returned when the request has been accepted and completed. components:
The response body shall contain the parameters of the configuration requestBodies:
modification that was applied to the configuration resource. ConfigurationRequest:
description: |
The parameter for the configuration modification, as defined in clause 9.5.2.2.
content:
application/json:
schema: schema:
$ref: 'definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfigModifications' $ref: ./definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfigModifications
headers: required: true
Content-Type:
description: The MIME type of the body of the response.
type: string
maximum: 1
minimum: 1
Version:
description: The used API version.
type: string
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"
412:
# description: >
# 412 PRECONDITION FAILED
# Shall be returned upon the following error: A precondition given responses:
# in an HTTP request header is not fulfilled. Configuration.Get:
# Typically, this is due to an ETag mismatch, indicating that the resource description: |
# was modified by another entity. The response body should contain a 200 OK
# ProblemDetails structure, in which the "detail" attribute should convey Shall be returned when configuration information about a VNF instance has been read successfully. The response
# more information about the error. body shall contain a representation of the configuration resource.
# schema: headers:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/412" Version:
416: description: The used API version.
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/416" style: simple
422: explode: false
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/422" schema:
429: type: string
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/429" WWW-Authenticate:
500: description: |
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500" Challenge if the corresponding HTTP request has not provided authorization, or error details if the
503: corresponding HTTP request has provided an invalid authorization token.
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503" style: simple
504: explode: false
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504" schema:
\ No newline at end of file type: string
Content-Type:
description: The MIME type of the body of the response.
style: simple
explode: false
schema:
type: string
content:
application/json:
schema:
$ref: ./definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfiguration
Configuration.Patch:
description: |
200 OK
Shall be returned when the request has been accepted and completed. The response body shall contain the
parameters of the configuration modification that was applied to the configuration resource.
headers:
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.
style: simple
explode: false
schema:
type: string
content:
application/json:
schema:
$ref: ./definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfigModifications
\ No newline at end of file
...@@ -10,6 +10,11 @@ definitions: ...@@ -10,6 +10,11 @@ definitions:
* NOTE 2: The VnfcConfiguration data type can only be used to modify the configuration * NOTE 2: The VnfcConfiguration data type can only be used to modify the configuration
of existing VNFC instances. of existing VNFC instances.
type: object type: object
anyOf:
- required:
- vnfConfigurationData
- required:
- vnfcConfigurationData
properties: properties:
vnfConfigurationData: vnfConfigurationData:
description: > description: >
...@@ -100,6 +105,7 @@ definitions: ...@@ -100,6 +105,7 @@ definitions:
vnfcInstanceId: vnfcInstanceId:
description: > description: >
Identifier of a VNFC instance to which this set of configuration data applies. Identifier of a VNFC instance to which this set of configuration data applies.
The identifier references the "id" attribute in a "VnfcInfo" structure.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf' $ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf'
intCpConfig: intCpConfig:
description: > description: >
...@@ -148,6 +154,16 @@ definitions: ...@@ -148,6 +154,16 @@ definitions:
* NOTE 1: Either "address" or "useDynamicAddress" shall be present. * NOTE 1: Either "address" or "useDynamicAddress" shall be present.
* NOTE 2: At least one of "macAddress" and "ipAddress" shall be present. * NOTE 2: At least one of "macAddress" and "ipAddress" shall be present.
type: object type: object
oneOf:
- required:
- address
- required:
- useDynamicAddress
anyOf:
- required:
- macAddress
- required:
- ipAddress
properties: properties:
address: address:
description: > description: >
......
...@@ -29,6 +29,8 @@ definitions: ...@@ -29,6 +29,8 @@ definitions:
vnfcInstanceIds: vnfcInstanceIds:
description: > description: >
Identifiers of the affected VNFC instances. Identifiers of the affected VNFC instances.
Each identifier references the "id" attribute in a "VnfcInfo" structure.
Shall be present if the alarm affects at least one VNFC instance.
type: array type: array
items: items:
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf" $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf"
...@@ -124,9 +126,64 @@ definitions: ...@@ -124,9 +126,64 @@ definitions:
instance information is accessible as a resource. instance information is accessible as a resource.
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link" $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Link"
AlarmNotification:
description: >
This type represents an alarm notification about VNF faults.
This notification shall be triggered by the VNFM when:
* An alarm has been created.
* An alarm has been updated, e.g. if the severity of the alarm has
changed.
type: object
required:
- id
- notificationType
- subscriptionId
- timeStamp
- alarm
- _links
properties:
id:
description: >
Identifier of this notification. If a notification is sent multiple
times due to multiple subscriptions, the "id" attribute of all these
notifications shall have the same value.
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier"
notificationType:
description: >
Discriminator for the different notification types. Shall be set to
"AlarmNotification" for this notification type.
type: string
enum:
- AlarmNotification
subscriptionId:
description: >
Identifier of the subscription that this notification relates to.
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier"
timeStamp:
description: >
Date-time of the generation of the notification.
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/DateTime"
alarm:
description: >
Information about an alarm including AlarmId, affected VNF
identifier, and FaultDetails.
$ref: "#/definitions/Alarm"
_links:
description: >
Links to resources related to this notification.
type: object
required:
- subscription
properties:
subscription:
description: >
Link to the related subscription.
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/NotificationLink"
PerceivedSeverityRequest: PerceivedSeverityRequest:
description: > description: >
This type represents the escalated value of the perceived severity for an alarm. This type represents the escalated value of the perceived severity for an alarm.