Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nfv/SOL002-SOL003
  • reinaortega/SOL002-SOL003
2 results
Show changes
Commits on Source (565)
Showing
with 2228 additions and 287 deletions
build/ build/
*.pyc *.pyc
.idea/
[gerrit]
host=forge.etsi.org
port=29418
project=NFV-SOL002-SOL003
defaultbranch=master
defaultremote=origin
...@@ -8,14 +8,13 @@ run_dir="$(pwd)" ...@@ -8,14 +8,13 @@ run_dir="$(pwd)"
rm build/*-API.yaml rm build/*-API.yaml
rm build/*-API.json rm build/*-API.json
rm build/*-API.pdf
cd docker cd docker
./build-container.sh ./build-container.sh
./run-container.sh "${run_dir}" ./run-container.sh "${run_dir}" "$1"
OUTCOME=$?
cd .. exit $OUTCOME
python ./scripts/add_change_comment.py
exit $?
ETSI FORGE COPYRIGHT STATEMENT
Copyright (c) ETSI 2017.
This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file
under the following conditions: It is provided "as is", without warranty of any
kind, expressed or implied.
ETSI shall never be liable for any claim, damages, or other liability arising
from its use or inability of use.This permission does not apply to any documentation
associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
software and shall not imply any sub-license right.
Copyright 2019 ETSI
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
# 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](http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.03.01_60/gs_NFV-SOL002v020301p.pdf) and [SOL003](http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.03.01_60/gs_NFV-SOL003v020301p.pdf). for the APIs defined in ETSI NFV GSs SOL002 and SOL003 v3.7.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:
* `Or-Vnfm` * `Or-Vnfm`
* `Ve-vnfm` * `Ve-vnfm`
**IMPORTANT: In case of discrepancies the published ETSI Group Specification takes precedence.**
More information at [NFV Solutions wiki](https://nfvwiki.etsi.org/index.php?title=NFV_Solutions). More information at [NFV Solutions wiki](https://nfvwiki.etsi.org/index.php?title=NFV_Solutions).
## Content structure ## Content structure
All the main OpenAPI files should be put in the `src` directory and organized with the following schema: All the main OpenAPI files should be put in the `src` directory and organized with the following schema:
src/deliverable-number/api-name/api-name.yaml src/deliverable-number/api-name/api-name.yaml
e.g. e.g.
src/SOL003/LifeCycleManagement/lifeCycleManagement.yaml src/SOL003/LifeCycleManagement/lifeCycleManagement.yaml
## Building ## Building
...@@ -26,25 +29,29 @@ The build file `.jenkins.sh` will validate the files, evaluate JSON references a ...@@ -26,25 +29,29 @@ The build file `.jenkins.sh` will validate the files, evaluate JSON references a
To build locally, once Docker is installed, simple run To build locally, once Docker is installed, simple run
$sudo bash .jenkins.sh $ sudo bash .jenkins.sh
and the results will be stored in a `build/` directory in the project folder. and the results will be stored in a `build/` directory in the project folder.
## How to raise issues ## How to raise issues
Change requests can be filed at [ETSI Forge Bugzilla](https://forge.etsi.org/bugzilla/enter_bug.cgi?product=NFV). Please report errors, bugs or other issues [here](https://forge.etsi.org/rep/nfv/SOL002-SOL003/-/issues).
## How to contribute ## How to contribute
Open and closed changes can be reviewed [here](https://forge.etsi.org/gerrit/#/q/project:NFV-SOL002-SOL003). ETSI Forge uses Gitlab to manage submissions to the repository.
More information is available [here](https://nfvwiki.etsi.org/index.php?title=SOL_OpenAPI_Main_Page#How_to_Contribute).
### Latest builds
## Submit and review changes See the recent builds from:
See the recent builds [here](https://forge.etsi.org/jenkins/job/NFV%20-%20Network%20Functions%20Virtualisation/job/sol002-sol003/). * [Master branch](https://forge.etsi.org/jenkins/job/NFV%20-%20Network%20Functions%20Virtualisation/job/sol002-sol003-master/)
* [Other branches](https://forge.etsi.org/jenkins/job/NFV%20-%20Network%20Functions%20Virtualisation/job/sol002-sol003/).
## License ## License
Copyright (c) ETSI 2017. Copyright (c) ETSI 2020.
This software is subject to copyrights owned by ETSI. Non-exclusive permission This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file is hereby granted, free of charge, to copy, reproduce and amend this file
......
# 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 apk update RUN apk update
RUN apk add bash RUN apk add bash
RUN apk add nodejs RUN apk add nodejs
RUN apk add nodejs-npm RUN apk add nodejs-npm
RUN npm install -g swagger-tools@0.10.3 RUN apk add asciidoctor
RUN npm install -g json-refs@3.0.2 RUN apk add openjdk8
RUN npm install -g yamljs@0.3.0 RUN apk add ca-certificates wget && update-ca-certificates
RUN apk add openssl
RUN gem install rdoc -v 6.3.3 || gem install rdoc -v 6.3.3
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-cli
RUN npm install -g json-refs
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
CMD ["/validate-in-docker.sh", "/work", "/storage"] ADD swg2mrkup /bin/swg2mrkup
RUN chmod +x /bin/swg2mrkup
ADD oas2pdf /bin/oas2pdf
RUN chmod +x /bin/oas2pdf
ENTRYPOINT ["/validate-in-docker.sh"]
...@@ -2,4 +2,24 @@ ...@@ -2,4 +2,24 @@
# 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
docker build -t openapivalidator . #set -x
\ No newline at end of file
proxy = ""
if [[ ! -v http_proxy ]]; then
echo "http_proxy is not set"
elif [[ -z "$http_proxy" ]]; then
echo "http_proxy is empty"
else
echo "http_proxy is set to $http_proxy"
if [[ $http_proxy =~ ^http:\/\/[0-9] ]]; then
echo "starts with http"
proxy=$http_proxy
elif [[ $http_proxy =~ ^[0-9] ]]; then
echo "starts with number"
proxy=http://$http_proxy
fi
fi
echo "Proxy set to $proxy"
docker build --build-arg http_proxy=$proxy --build-arg https_proxy=$proxy -t openapivalidator .
\ No newline at end of file
#!/bin/bash
#Copyright (c) ETSI 2017.
# This software is subject to copyrights owned by ETSI. Non-exclusive permission
# is hereby granted, free of charge, to copy, reproduce and amend this file
# under the following conditions: It is provided "as is", without warranty of any
# kind, expressed or implied.
# ETSI shall never be liable for any claim, damages, or other liability arising
# from its use or inability of use.This permission does not apply to any documentation
# associated with this file for which ETSI keeps all rights reserved. The present
# copyright notice shall be included in all copies of whole or part of this
# software and shall not imply any sub-license right.
#
# Author: michele.carignani@etsi.org
#
# This script takes an OpenAPI file in input and creates
# a PDF file with the content.
#
# Prerequisites:
# - https://github.com/Swagger2Markup/swagger2markup-cli
# - Asciidoctor (sudo apt-get install asciidoctor)
# - Asciidoctor-pdf (sudo gem install asciidoctor-pdf)
#
# Usage:
# oas2pdf <oasfile> (e.g. myapi.json)
#
# Result:
# A new pdf file is created in the working directory (e.g. myapi.pdf)
#
#
#
#
# Configuration
# Change this if needed
SWG2MRKUP=swg2mrkup
ASCIIDOCPDF=asciidoctor-pdf
# Setup
WD=$(pwd)
TWD=$(mktemp -d)
INFILE=$(basename ${1?"Error: missing input file name"} )
OUTFILE="${INFILE%.*}"
echo "$INFILE, $OUTFILE"
echo "Converting to asciidoc.."
${SWG2MRKUP} convert -i "$1" -f "$TWD/$OUTFILE"
echo
echo "Converting to PDF.."
"${ASCIIDOCPDF}" "$TWD/${OUTFILE}.adoc" -o "$WD/${OUTFILE}.pdf"
echo
echo "Done."
# Clean up
rm -r $TWD
...@@ -9,16 +9,17 @@ ...@@ -9,16 +9,17 @@
WEB_PUBLISH=true WEB_PUBLISH=true
f="${1:-`pwd`}" f="${1:-`pwd`}"
filter="$2"
echo "Mounting dir $f as /work" echo "Mounting dir $f as /work"
if [ -n "$JOB_BASE_NAME" -a "$WEB_PUBLISH" = true ] ; then if [ -n "$JOB_BASE_NAME" -a "$WEB_PUBLISH" = true ] ; then
s="/var/www/html/api/nfv/$JOB_BASE_NAME/$BUILD_NUMBER" s="/var/www/html/api/nfv/$JOB_BASE_NAME/$BUILD_NUMBER"
mkdir -v -p "$s" mkdir -v -p "$s"
echo "Mounting dir $s as /storage" echo "Mounting dir $s as /storage"
docker run -v "$f":/work -v "$s":/storage openapivalidator docker run -v "$f":/work -v "$s":/storage openapivalidator "/work" "/storage" "$filter"
else else
docker run -v "$f":/work openapivalidator docker run -v "$f":/work openapivalidator "/work" "/storage" "$filter"
fi fi
......
#!/bin/bash
#Copyright (c) ETSI 2017.
# This software is subject to copyrights owned by ETSI. Non-exclusive permission
# is hereby granted, free of charge, to copy, reproduce and amend this file
# under the following conditions: It is provided "as is", without warranty of any
# kind, expressed or implied.
# ETSI shall never be liable for any claim, damages, or other liability arising
# from its use or inability of use.This permission does not apply to any documentation
# associated with this file for which ETSI keeps all rights reserved. The present
# copyright notice shall be included in all copies of whole or part of this
# software and shall not imply any sub-license right.
#
# Author: michele.carignani@etsi.org
java -jar /swagger2markup-cli-1.3.2.jar $@
...@@ -23,17 +23,24 @@ function validate_api () { ...@@ -23,17 +23,24 @@ function validate_api () {
echo "--- Merging file." echo "--- Merging file."
merged_file="../build/${deliverable}-${api}-API.yaml" merged_file="../build/${deliverable}-${api}-API.yaml"
json_file="../build/${deliverable}-${api}-API.json" json_file="../build/${deliverable}-${api}-API.json"
json-refs resolve "${file}" > "${merged_file}" json-refs --filter relative resolve "${file}" > "${merged_file}"
yaml2json "${merged_file}" > "${json_file}" yaml2json "${merged_file}" > "${json_file}"
# Create the PDF version
echo "--- Create PDF..."
oas2pdf "${json_file}" 2>/dev/null 1>/dev/null
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)."
# If validation succedes, store the generated file # If validation succedes, store the generated file
[ $vres -a -d "/storage" ] && store_api "${merged_file}" [ $vres -a -d "/storage" ] && store_api "${merged_file}"
[ $vres -a -d "/storage" ] && store_api "${json_file}" [ $vres -a -d "/storage" ] && store_api "${json_file}"
[ $vres -a -d "/storage" ] && store_api "../build/${deliverable}-${api}-API.pdf"
return $vres return $vres
} }
...@@ -52,8 +59,12 @@ function get_deliverable_from_fn () { ...@@ -52,8 +59,12 @@ function get_deliverable_from_fn () {
## Main ## ## Main ##
wd="${1?"Usage: $0 <working-directory> <storage-directory>"}" wd="${1?"Usage: $0 <working-directory> <storage-directory> [<filter_regex>]"}"
storage_dir="${2?"Usage: $0 <working-directory> <storage-directory>"}" storage_dir="${2?"Usage: $0 <working-directory> <storage-directory> [<filter_regex>]"}"
filter="$3"
echo "Using filter '$filter'"
echo
mkdir -p "$wd/build" mkdir -p "$wd/build"
...@@ -64,16 +75,21 @@ cd "$wd/src" ...@@ -64,16 +75,21 @@ cd "$wd/src"
# (single results in OR) # (single results in OR)
fres=0 fres=0
for f in $(find -name "*.yaml") ; do for f in $(find -name "*.yaml") ; do
echo "Found yaml file: $f" # echo "Found yaml file: $f"
file=$(basename "$f") file=$(basename "$f")
api=$(get_api_from_fn $f) api=$(get_api_from_fn $f)
deliverable=$(get_deliverable_from_fn $f) deliverable=$(get_deliverable_from_fn $f)
if [ "$file" = "$api.yaml" ]; then if [ "$file" = "$api.yaml" ]; then
echo "-- Will validate: $f (api: $api) (deliverable:$deliverable)" if [[ -n "$filter" && ! "$f" =~ ^[a-zA-Z0-9\.\/\-]*$filter[a-zA-Z\.\/0-9\-]*$ ]] ; then
validate_api "$f" "$api" "$deliverable" echo "Filtered out: $f (api: $api) (deliverable:$deliverable)."
res=$? else
fres=$(($fres||$res)) echo "-- Will validate: $f (api: $api) (deliverable:$deliverable)"
validate_api "$f" "$api" "$deliverable"
res=$?
fres=$(($fres||$res))
fi
fi fi
done done
......
"""
Add comments on gerrit
"""
import os
import sys
import jnk_grt_comment as jgc
import glob
CHANGE = os.environ.get('GERRIT_CHANGE_NUMBER') or None
PATCH = os.environ.get('GERRIT_PATCHSET_NUMBER') or None
URL = os.environ.get('BUILD_URL') or None
# print glob.glob("**/*-API.yaml")
if not (CHANGE and PATCH and URL):
print "No Gerrit change information found. Exiting"
sys.exit()
print "START Comment on Gerrit change ---"
jgc.comment_openapis_artifacts(CHANGE, PATCH, URL)
print "DONE Comment on Gerrit change ---\n"
#!/env/python2.7
"""
Comments on gerrit
"""
import os.path
import subprocess
import glob
def mk_swg_ui_link(artifact, build_uri):
"""
creates the link to the swagger ui
"""
swg_ui = "https://forge.etsi.org/swagger/ui"
return swg_ui + "/?url=" + build_uri + "/artifact/"+ artifact +"/*view*/"
def mk_swg_ui_comment(files, bu):
"""
creates the link to the swagger ui
"""
msg = "Review links for the built OpenAPIS:"
for artifact in glob.glob(files):
msg += "\n * " + os.path.basename(artifact) + ": " + mk_swg_ui_link(artifact, bu)
return msg
def mk_grt_comment_cmd(change, payload):
"""
creates the link to the swagger ui
"""
command = "ssh -p 29418 forge.etsi.org \"gerrit review --message '"+payload+"' "+change + "\""
print command
return command
def send_gerrit_comment(change, patchset):
"""
creates the link to the swagger ui
"""
cmd = mk_grt_comment_cmd(change, patchset)
print "Executing: " + cmd
subprocess.call(cmd, shell=True)
def jenkins_gerrit_comment(change_num, patch_num, comment):
send_gerrit_comment(change_num+","+patch_num, comment)
def comment_openapis_artifacts(cn, pn, bu):
comment = mk_swg_ui_comment("**/*-API.yaml", bu)
# print "comment: "+comment
jenkins_gerrit_comment(str(cn), str(pn), comment)
\ No newline at end of file
openapi: 3.0.2
info:
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. 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
version: 1.3.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
externalDocs:
description: ETSI GS NFV-SOL 002 V3.7.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.07.01_60/gs_NFV-SOL002v030701p.pdf
paths:
/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
/lcmcoord/api_versions:
$ref: ../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions
\ No newline at end of file
swagger: "2.0" openapi: 3.0.2
info:
title: SOL002 - VNF Configuration interface
description: |
SOL002 - VNF Configuration Interface
info:
version: "2.3.1"
title: "DRAFT VNF Configuration interface"
description: >
DRAFT VNF Configuration interface of ETSI NFV SOL002
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 version of the ETSI Group Specification it refers to. In case of
approved by the ETSI NFV ISG. In case of discrepancies the published ETSI discrepancies the published ETSI Group Specification takes precedence.
Group Specification takes precedence.
Please report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=--- Please report bugs to https://forge.etsi.org/rep/nfv/SOL002-SOL003/issues
termsOfService: "http://etsi.org"
contact: contact:
name: "NFV-SOL WG" 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
version: 1.3.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
externalDocs:
description: ETSI GS NFV-SOL 002 V3.7.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.07.01_60/gs_NFV-SOL002v030701p.pdf
basePath: /vnfconfig/v1 servers:
- url: http://127.0.0.1/vnfconfig/v1
- url: https://127.0.0.1/vnfconfig/v1
schemes: paths:
- http /api_versions:
- https $ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
consumes:
- application/json
produces: /configuration:
- application/json parameters:
- $ref: ../../components/SOL002_params.yaml#/components/parameters/Version
- $ref: ../../components/SOL002_params.yaml#/components/parameters/Authorization
get:
description: |
The API consumer can use this method to read configuration information about a VNF instance and/or its VNFC instances.
See clause 9.4.2.3.2.
responses:
"200":
$ref: '#/components/responses/Configuration.Get.200'
"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:
description: |
This method sets or modifies a configuration resource. See clause 9.4.2.3.4.
parameters:
- $ref: ../../components/SOL002_params.yaml#/components/parameters/If-Unmodified-Since
- $ref: ../../components/SOL002_params.yaml#/components/parameters/If-Match
requestBody:
$ref: '#/components/requestBodies/ConfigurationRequest'
responses:
"200":
$ref: '#/components/responses/Configuration.Patch.200'
"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
paths: 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
required: true
/configuration: responses:
get: Configuration.Get.200:
summary: Read VNF/VNFC configuration from VNF. description: |
description: > 200 OK
The client can use this method to read configuration information about a VNF instance and/or its VNFC instances. Shall be returned when configuration information about a VNF instance has been read successfully. The response
responses: body shall contain a representation of the configuration resource.
200: headers:
description: > Version:
Configuration information about a VNF instance was read successfully. description: The used API version.
The response body shall contain a representation of the configuration resource. style: simple
schema: explode: false
$ref: 'definitions/VnfConfiguration_def.yaml#/definitions/VnfConfiguration' schema:
400: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/400' } type: string
401: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/401' } WWW-Authenticate:
403: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/403' } description: |
404: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/404' } Challenge if the corresponding HTTP request has not provided authorization, or error details if the
405: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/405' } corresponding HTTP request has provided an invalid authorization token.
406: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/406' } style: simple
409: { $ref: 'responses/VNFConfiguration_resp.yaml#/responses/409' } explode: false
416: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/416' } schema:
422: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/422' } type: string
500: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/500' } Content-Type:
503: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/503' } description: The MIME type of the body of the response.
patch: style: simple
summary: Modify VNF/VNFC configuration. explode: false
description: This method sets or modifies a configuration resource. schema:
parameters: type: string
- name: configModifications ETag:
description: The parameter for the configuration modification. description: >
required: true Used to provide the current entity-tag for the selected resource representation. It can be sent in
in: body "200 OK", "201 Created" and "204 No Content" responses.
schema: style: simple
$ref: 'definitions/VnfConfiguration_def.yaml#/definitions/VnfConfigModifications' schema:
responses: type: string
200: Last-Modified:
description: > description: >
The request was accepted and completed. The response body shall contain the parameters Used to provide a timestamp indicating the date and time at which the server believes the selected resource
of the configuration modification that was applied to the configuration resource. representation was last modified. It can be sent in "200 OK", "201 Created" and "204 No Content" responses.
schema: style: simple
$ref: 'definitions/VnfConfiguration_def.yaml#/definitions/VnfConfigModifications' schema:
412: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/412' } type: string
400: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/400' } format: date-time
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: { $ref: 'responses/VNFConfiguration_resp.yaml#/responses/409' }
416: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/416' }
422: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/422' }
500: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/500' }
503: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/503' }
content:
application/json:
schema:
$ref: ./definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfiguration
Configuration.Patch.200:
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
ETag:
description: >
Used to provide the current entity-tag for the selected resource representation. It can be sent in
"200 OK", "201 Created" and "204 No Content" responses.
style: simple
schema:
type: string
Last-Modified:
description: >
Used to provide a timestamp indicating the date and time at which the server believes the selected resource
representation was last modified. It can be sent in "200 OK", "201 Created" and "204 No Content" responses.
style: simple
schema:
type: string
format: date-time
content:
application/json:
schema:
$ref: ./definitions/SOL002VNFConfiguration_def.yaml#/definitions/VnfConfigModifications
\ No newline at end of file
definitions: # Copyright (c) ETSI 2017.
# https://forge.etsi.org/etsi-forge-copyright-notice.txt
VnfConfiguration:
description: >
This type represents configuration parameters of a VNF instance and its VNFC instances.
type: object
required:
- vnfConfigurationData
properties:
vnfConfigurationData:
description: >
Configuration parameters of the VNF instance.
$ref: '#/definitions/VnfConfigurationData'
vnfcConfigurationData:
description: >
Configuration parameters of the VNFC instances.
type: array
items:
$ref: '#/definitions/VnfcConfigurationData'
definitions:
VnfConfigModifications: VnfConfigModifications:
description: > description: >
This type represents request parameters for the "Set Configuration" operation. This type represents request parameters for the "Set Configuration" operation.
...@@ -27,64 +10,93 @@ definitions: ...@@ -27,64 +10,93 @@ 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: >
Modifications to configuration data for the VNF instance. See NOTE 1. Modifications to configuration data for the VNF instance. See NOTE 1.
If present, the modifications of the "vnfConfigurationData" attribute shall If present, the modifications of the "vnfConfigurationData" attribute shall
be applied according to the rules of JSON Merge PATCH (see IETF RFC 7396). be applied according to the rules of JSON Merge PATCH (see IETF RFC 7396).
$ref: '#/definitions/VnfConfigurationData' $ref: '#/definitions/VnfConfigurationData'
vnfcConfigurationData: vnfcConfigurationData:
description: > description: >
Modifications to configuration data for certain VNFC instances. See NOTE 1 and NOTE 2. Modifications to configuration data for certain VNFC instances. See NOTE 1 and NOTE 2.
If present, the modifications of the "vnfcConfigurationData" attribute shall follow these If present, the modifications of the "vnfcConfigurationData" attribute shall follow these
provisions: provisions:
Modifying an attribute that is an array of objects of type "VnfcConfigurationData". Modifying an attribute that is an array of objects of type "VnfcConfigurationData".
Assumptions: Assumptions:
1) "oldList" is the "VnfcConfigurationData" array to be modified and "newList" 1) "oldList" is the "VnfcConfigurationData" array to be modified and "newList"
is the "VnfcConfigurationData" array that contains the changes. is the "VnfcConfigurationData" array that contains the changes.
2) "oldEntry" is an entry in "oldList" and "newEntry" is an entry in "newList". 2) "oldEntry" is an entry in "oldList" and "newEntry" is an entry in "newList".
3) A "newEntry" has a "corresponding entry" if there exists an "oldEntry" that 3) A "newEntry" has a "corresponding entry" if there exists an "oldEntry" that
has the same content of the "vnfcInstanceId" attribute as the "newEntry"; has the same content of the "vnfcInstanceId" attribute as the "newEntry";
a "newEntry" has no corresponding entry if no such "oldEntry" exists. a "newEntry" has no corresponding entry if no such "oldEntry" exists.
4) In any array of "VnfcConfigurationData" structures, the content of "vnfcInstanceId" 4) In any array of "VnfcConfigurationData" structures, the content of "vnfcInstanceId"
is unique (i.e. there shall be no two entries with the same content of "vnfcInstanceId"). is unique (i.e. there shall be no two entries with the same content of "vnfcInstanceId").
Provisions: Provisions:
1) For each "newEntry" in "newList" that has no corresponding entry in "oldList", 1) For each "newEntry" in "newList" that has no corresponding entry in "oldList",
the "oldList" array shall be modified by adding that "newEntry". the "oldList" array shall be modified by adding that "newEntry".
2) For each "newEntry" in "newList" that has a corresponding "oldEntry" in "oldList", 2) For each "newEntry" in "newList" that has a corresponding "oldEntry" in "oldList",
the value of "oldEntry" shall be updated with the value of "newEntry" according to the value of "oldEntry" shall be updated with the value of "newEntry" according to
the rules of JSON Merge PATCH (see IETF RFC 7396 ). the rules of JSON Merge PATCH (see IETF RFC 7396 ).
type: array type: array
items: items:
$ref: '#/definitions/VnfcConfigurationData' $ref: '#/definitions/VnfcConfigurationData'
vnfcConfigurationDataDeleteIds:
description: >
List of identifiers entries to be deleted from the 'vnfcConfigurationData" attribute array to be used
as "deleteIdList" as defined below this table.
type: array
items:
$ref: "../../General_Definitions/SOL002_def.yaml#/definitions/Identifier"
VnfConfiguration:
description: >
This type represents configuration parameters of a VNF instance and its VNFC instances.
type: object
required:
- vnfConfigurationData
properties:
vnfConfigurationData:
description: >
Configuration parameters of the VNF instance.
$ref: '#/definitions/VnfConfigurationData'
vnfcConfigurationData:
description: >
Configuration parameters of the VNFC instances.
type: array
items:
$ref: '#/definitions/VnfcConfigurationData'
VnfConfigurationData: VnfConfigurationData:
description: > description: >
This type represents configuration parameters of a VNF instance. This type represents configuration parameters of a VNF instance.
* NOTE: ETSI GS NFV-SOL 001 specifies the structure and format of
the VNFD based on TOSCA specifications.
type: object type: object
properties: properties:
extCpConfig: extCpConfig:
description: > description: >
Configuration parameters for the external CPs of the VNF instance. Configuration parameters for the external CPs of the VNF instance.
$ref: '#/definitions/CpConfiguration' type: array
dhcpServer: items:
description: > $ref: '#/definitions/CpConfiguration'
IP address of the DHCP server that the VNF instance can use to obtain
IP addresses to be assigned to its external CPs.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IpAddress'
vnfSpecificData: vnfSpecificData:
description: > description: >
Additional configurable properties of the VNF instance declared in the Additional configurable properties of the VNF instance declared in the
VNFD as "VnfConfigurableProperties". VNFD as "VnfConfigurableProperties". see note.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/KeyValuePairs' $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/KeyValuePairs'
VnfcConfigurationData: VnfcConfigurationData:
description: > description: >
This type represents configuration parameters of a VNFC instance. This type represents configuration parameters of a VNFC instance.
* NOTE: ETSI GS NFV-SOL 001 specifies the structure and format
of the VNFD based on TOSCA specifications.
type: object type: object
required: required:
- vnfcInstanceId - vnfcInstanceId
...@@ -92,22 +104,19 @@ definitions: ...@@ -92,22 +104,19 @@ 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.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf' The identifier references the "id" attribute in a "VnfcInfo" structure.
extCpConfig: $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IdentifierInVnf'
description: > intCpConfig:
Configuration parameters for the external CPs of the VNFC instance.
$ref: '#/definitions/CpConfiguration'
dhcpServer:
description: > description: >
IP address of the DHCP server that the VNF instance can use to obtain Configuration parameters for the internal CPs of the VNFC instance.
IP addresses to be assigned to its external CPs. type: array
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IpAddress' items:
$ref: '#/definitions/CpConfiguration'
vnfcSpecificData: vnfcSpecificData:
description: > description: >
Additional configurable properties of the VNFC instance declared in the Additional configurable properties of the VNFC instance declared in the
VNFD as "VnfcConfigurableProperties". VNFD as "VnfcConfigurableProperties". See note.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/KeyValuePairs' $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/KeyValuePairs'
CpConfiguration: CpConfiguration:
description: > description: >
...@@ -121,17 +130,17 @@ definitions: ...@@ -121,17 +130,17 @@ definitions:
cpId: cpId:
description: > description: >
Identifier of a CP instance within the namespace of a specific VNF instance or a VNFC instance. Identifier of a CP instance within the namespace of a specific VNF instance or a VNFC instance.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf' $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IdentifierInVnf'
cpdId: cpdId:
description: > description: >
Identifier of the CPD in the VNFD. Identifier of the CPD in the VNFD.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnfd' $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IdentifierInVnfd'
addresses: addresses:
description: > description: >
Network address and port assigned to the CP. Network address and port assigned to the CP.
type: array type: array
items: items:
$ref: '#/definitions/CpAddress' $ref: '#/definitions/CpAddress'
CpAddress: CpAddress:
description: > description: >
...@@ -139,6 +148,16 @@ definitions: ...@@ -139,6 +148,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: >
...@@ -148,11 +167,11 @@ definitions: ...@@ -148,11 +167,11 @@ definitions:
macAddress: macAddress:
description: > description: >
Mac address. See NOTE 2. Mac address. See NOTE 2.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/MacAddress' $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/MacAddress'
ipAddress: ipAddress:
description: > description: >
IP address. See NOTE 2. IP address. See NOTE 2.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IpAddress' $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IpAddress'
useDynamicAddress: useDynamicAddress:
description: > description: >
Set to true if an address shall be assigned dynamically. Otherwise set to false. Set to true if an address shall be assigned dynamically. Otherwise set to false.
...@@ -161,8 +180,4 @@ definitions: ...@@ -161,8 +180,4 @@ definitions:
port: port:
description: > description: >
The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.). The port assigned to the CP instance (e.g. IP port number, Ethernet port number, etc.).
type: integer type: integer
\ No newline at end of file
responses:
409:
description: >
Another request is in progress that prohibits the fulfilment of
the current request, or the current resource state is inconsistent
with the request.
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
schema:
$ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
This diff is collapsed.