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 !15
parents e3eec91b dad03f46
Pipeline #5022 passed with stage
in 0 seconds
# NFV SOL002 and SOL003 APIs
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:
......
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
FROM alpine:3.6
FROM alpine:3.10.0
RUN env
RUN apk update
......@@ -16,9 +16,9 @@ RUN gem install rdoc --pre || gem install rdoc --pre
RUN gem install asciidoctor-pdf-cjk
RUN wget https://forge.etsi.org/swagger2markup-cli-1.3.2.jar
RUN npm config set proxy $http_proxy
RUN npm install -g swagger-tools@0.10.3
RUN npm install -g json-refs@3.0.4
RUN npm install -g yamljs@0.3.0
RUN npm install -g swagger-cli
RUN npm install -g json-refs
RUN npm install -g yamljs
ADD validate-in-docker.sh /validate-in-docker.sh
RUN chmod +x /validate-in-docker.sh
......
......@@ -32,7 +32,7 @@ function validate_api () {
mv "${deliverable}-${api}-API.pdf" "../build/"
echo "--- Validating ${merged_file}"
swagger-tools validate "${merged_file}"
swagger-cli validate "${merged_file}"
vres=$?
echo "--- Validation done ($vres)."
......
swagger: "2.0"
openapi: 3.0.2
info:
version: "1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: SOL002 - API version interface
description: >
SOL002 - API version 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 - API version 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/rep/nfv/SOL002-SOL003/issues
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.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
externalDocs:
description: ETSI GS NFV-SOL 002 V2.7.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_nfv-sol002v020701p.pdf
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
description: ETSI GS NFV-SOL 002 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_NFV-SOL002v030301p.pdf
paths:
###############################################################################
# API Versions #
###############################################################################
'/vnfconfig/api_versions':
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
'/vnffm/api_versions':
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
'/vnfind/api_versions':
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
'/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
/vnfconfig/api_versions:
$ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
/vnffm/api_versions:
$ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
/vnfind/api_versions:
$ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
/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:
version: "1.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: SOL002 - VNF Configuration interface
description: >
SOL002 - VNF Configuration 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 Configuration 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/rep/nfv/SOL002-SOL003/issues
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.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
externalDocs:
description: ETSI GS NFV-SOL 002 V2.7.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_nfv-sol002v020701p.pdf
basePath: /vnfconfig/v1
description: ETSI GS NFV-SOL 002 V3.3.1
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
servers:
- url: http://127.0.0.1/vnfconfig/v1
- url: https://127.0.0.1/vnfconfig/v1
paths:
###############################################################################
# API Versions #
###############################################################################
'/api_versions':
/api_versions:
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
###############################################################################
# VNF Configuration #
###############################################################################
'/configuration':
/configuration:
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
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Version
- $ref: ../../components/SOL002SOL003_params.yaml#/components/parameters/Authorization
get:
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.
responses:
200:
description: >
200 OK
Shall be returned when configuration information about a VNF instance
has been read successfully.
The response body shall contain a representation of the configuration resource.
schema:
$ref: 'definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfiguration'
headers:
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
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
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"
"200":
$ref: '#/components/responses/Configuration.Get'
"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
"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
patch:
summary: Modify VNF/VNFC configuration.
description: This method sets or modifies a configuration resource.
parameters:
- name: configModifications
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'
requestBody:
$ref: '#/components/requestBodies/ConfigurationRequest'
responses:
200:
description: >
200 OK
"200":
$ref: '#/components/responses/Configuration.Patch'
"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.
The response body shall contain the parameters of the configuration
modification that was applied to the configuration resource.
components:
requestBodies:
ConfigurationRequest:
description: |
The parameter for the configuration modification, as defined in clause 9.5.2.2.
content:
application/json:
schema:
$ref: 'definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfigModifications'
headers:
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
$ref: ./definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfigModifications
required: true
# Shall be returned upon the following 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.
# schema:
$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"
\ No newline at end of file
responses:
Configuration.Get:
description: |
200 OK
Shall be returned when configuration information about a VNF instance has been read successfully. The response
body shall contain a representation of the configuration resource.
headers:
Version:
description: The used API version.
style: simple
explode: false
schema:
type: string
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
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:
* NOTE 2: The VnfcConfiguration data type can only be used to modify the configuration
of existing VNFC instances.
type: object
anyOf:
- required:
- vnfConfigurationData
- required:
- vnfcConfigurationData
properties:
vnfConfigurationData:
description: >
......@@ -100,6 +105,7 @@ definitions:
vnfcInstanceId:
description: >
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'
intCpConfig:
description: >
......@@ -148,6 +154,16 @@ definitions:
* NOTE 1: Either "address" or "useDynamicAddress" shall be present.
* NOTE 2: At least one of "macAddress" and "ipAddress" shall be present.
type: object
oneOf:
- required:
- address
- required:
- useDynamicAddress
anyOf:
- required:
- macAddress
- required:
- ipAddress
properties:
address:
description: >
......
......@@ -29,6 +29,8 @@ definitions:
vnfcInstanceIds:
description: >
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
items:
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf"
......@@ -124,9 +126,64 @@ definitions:
instance information is accessible as a resource.
$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:
description: >
This type represents the escalated value of the perceived severity for an alarm.
type: object
required:
- proposedPerceivedSeverity
properties:
......
This diff is collapsed.
swagger: "2.0"
openapi: 3.0.2
info:
version: "1.2.1-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: SOL002 - VNF Indicator Notification Endpoint interface
description: >
SOL002 - VNF Indicator Notification Endpoint 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
title: SOL002 - VNF Indicator Notification interface
description: |
SOL002 - VNF Indicator Notification 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/rep/nfv/SOL002-SOL003/issues
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.3.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
externalDocs:
description: ETSI GS NFV-SOL 002 V2.7.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_nfv-sol002v020701p.pdf
schemes:
- http
- https
description: ETSI GS NFV-SOL 002 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_NFV-SOL002v030301p.pdf