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 (566)
Showing
with 2229 additions and 282 deletions
build/
*.pyc
.idea/
[gerrit]
host=forge.etsi.org
port=29418
project=NFV-SOL002-SOL003
defaultbranch=master
defaultremote=origin
......@@ -8,14 +8,13 @@ run_dir="$(pwd)"
rm build/*-API.yaml
rm build/*-API.json
rm build/*-API.pdf
cd docker
./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
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:
* `Or-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).
## Content structure
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.
src/SOL003/LifeCycleManagement/lifeCycleManagement.yaml
src/SOL003/LifeCycleManagement/lifeCycleManagement.yaml
## Building
......@@ -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
$sudo bash .jenkins.sh
$ sudo bash .jenkins.sh
and the results will be stored in a `build/` directory in the project folder.
## 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
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
Copyright (c) ETSI 2017.
Copyright (c) ETSI 2020.
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
......
# 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
RUN apk add bash
RUN apk add nodejs
RUN apk add nodejs-npm
RUN npm install -g swagger-tools@0.10.3
RUN npm install -g json-refs@3.0.2
RUN npm install -g yamljs@0.3.0
RUN apk add asciidoctor
RUN apk add openjdk8
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
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 @@
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
docker build -t openapivalidator .
\ No newline at end of file
#set -x
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 @@
WEB_PUBLISH=true
f="${1:-`pwd`}"
filter="$2"
echo "Mounting dir $f as /work"
if [ -n "$JOB_BASE_NAME" -a "$WEB_PUBLISH" = true ] ; then
s="/var/www/html/api/nfv/$JOB_BASE_NAME/$BUILD_NUMBER"
mkdir -v -p "$s"
echo "Mounting dir $s as /storage"
docker run -v "$f":/work -v "$s":/storage openapivalidator
echo "Mounting dir $s as /storage"
docker run -v "$f":/work -v "$s":/storage openapivalidator "/work" "/storage" "$filter"
else
docker run -v "$f":/work openapivalidator
docker run -v "$f":/work openapivalidator "/work" "/storage" "$filter"
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 () {
echo "--- Merging file."
merged_file="../build/${deliverable}-${api}-API.yaml"
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}"
# 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}"
swagger-tools validate "${merged_file}"
swagger-cli validate "${merged_file}"
vres=$?
echo "--- Validation done ($vres)."
# If validation succedes, store the generated file
[ $vres -a -d "/storage" ] && store_api "${merged_file}"
[ $vres -a -d "/storage" ] && store_api "${json_file}"
[ $vres -a -d "/storage" ] && store_api "../build/${deliverable}-${api}-API.pdf"
return $vres
}
......@@ -52,8 +59,12 @@ function get_deliverable_from_fn () {
## Main ##
wd="${1?"Usage: $0 <working-directory> <storage-directory>"}"
storage_dir="${2?"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> [<filter_regex>]"}"
filter="$3"
echo "Using filter '$filter'"
echo
mkdir -p "$wd/build"
......@@ -64,16 +75,21 @@ cd "$wd/src"
# (single results in OR)
fres=0
for f in $(find -name "*.yaml") ; do
echo "Found yaml file: $f"
# echo "Found yaml file: $f"
file=$(basename "$f")
api=$(get_api_from_fn $f)
deliverable=$(get_deliverable_from_fn $f)
if [ "$file" = "$api.yaml" ]; then
echo "-- Will validate: $f (api: $api) (deliverable:$deliverable)"
validate_api "$f" "$api" "$deliverable"
res=$?
fres=$(($fres||$res))
if [[ -n "$filter" && ! "$f" =~ ^[a-zA-Z0-9\.\/\-]*$filter[a-zA-Z\.\/0-9\-]*$ ]] ; then
echo "Filtered out: $f (api: $api) (deliverable:$deliverable)."
else
echo "-- Will validate: $f (api: $api) (deliverable:$deliverable)"
validate_api "$f" "$api" "$deliverable"
res=$?
fres=$(($fres||$res))
fi
fi
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:
version: "2.3.1"
title: "VNF Configuration interface"
description: "VNF Indicator interface of ETSI NFV SOL002"
termsOfService: "http://etsi.org"
contact:
name: "NFV-SOL WG"
info:
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. 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"
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
basePath: /vnfconfig/v1
servers:
- url: http://127.0.0.1/vnfconfig/v1
- url: https://127.0.0.1/vnfconfig/v1
schemes:
- http
- https
consumes:
- application/json
paths:
/api_versions:
$ref: '../../endpoints/SOL002SOL003_endpoints.yaml#/endpoints/api-versions'
produces:
- application/json
/configuration:
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:
get:
summary: Read VNF/VNFC configuration from VNF.
description: >
The client can use this method to read configuration information about a VNF instance and/or its VNFC instances.
responses:
200:
description: >
Configuration information about a VNF instance was read successfully.
The response body shall contain a representation of the configuration resource.
schema:
$ref: 'definitions/VnfConfiguration_def.yaml#/definitions/VnfConfiguration'
400: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/400' }
401: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/401' }
403: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/403' }
404: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/404' }
405: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/405' }
406: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/406' }
409: { $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' }
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.
required: true
in: body
schema:
$ref: 'definitions/VnfConfiguration_def.yaml#/definitions/VnfConfigModifications'
responses:
200:
description: >
The request was accepted and completed. The response body shall contain the parameters
of the configuration modification that was applied to the configuration resource.
schema:
$ref: 'definitions/VnfConfiguration_def.yaml#/definitions/VnfConfigModifications'
412: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/412' }
400: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/400' }
401: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/401' }
403: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/403' }
404: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/404' }
405: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/405' }
406: { $ref: '../../responses/SOL002SOL003_resp.yaml#/responses/406' }
409: { $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' }
responses:
Configuration.Get.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.
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
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/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:
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'
# Copyright (c) ETSI 2017.
# https://forge.etsi.org/etsi-forge-copyright-notice.txt
definitions:
VnfConfigModifications:
description: >
This type represents request parameters for the "Set Configuration" operation.
......@@ -27,64 +10,93 @@ 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: >
Modifications to configuration data for the VNF instance. See NOTE 1.
If present, the modifications of the "vnfConfigurationData" attribute shall
be applied according to the rules of JSON Merge PATCH (see IETF RFC 7396).
$ref: '#/definitions/VnfConfigurationData'
$ref: '#/definitions/VnfConfigurationData'
vnfcConfigurationData:
description: >
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:
Modifying an attribute that is an array of objects of type "VnfcConfigurationData".
Assumptions:
1) "oldList" is the "VnfcConfigurationData" array to be modified and "newList"
is the "VnfcConfigurationData" array that contains the changes.
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
has the same content of the "vnfcInstanceId" attribute as the "newEntry";
a "newEntry" has no corresponding entry if no such "oldEntry" exists.
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").
1) "oldList" is the "VnfcConfigurationData" array to be modified and "newList"
is the "VnfcConfigurationData" array that contains the changes.
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
has the same content of the "vnfcInstanceId" attribute as the "newEntry";
a "newEntry" has no corresponding entry if no such "oldEntry" exists.
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").
Provisions:
1) For each "newEntry" in "newList" that has no corresponding entry in "oldList",
the "oldList" array shall be modified by adding that "newEntry".
1) For each "newEntry" in "newList" that has no corresponding entry in "oldList",
the "oldList" array shall be modified by adding that "newEntry".
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 rules of JSON Merge PATCH (see IETF RFC 7396 ).
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 rules of JSON Merge PATCH (see IETF RFC 7396 ).
type: array
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:
description: >
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
properties:
extCpConfig:
description: >
Configuration parameters for the external CPs of the VNF instance.
$ref: '#/definitions/CpConfiguration'
dhcpServer:
description: >
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'
type: array
items:
$ref: '#/definitions/CpConfiguration'
vnfSpecificData:
description: >
Additional configurable properties of the VNF instance declared in the
VNFD as "VnfConfigurableProperties".
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/KeyValuePairs'
VNFD as "VnfConfigurableProperties". see note.
$ref: '../../General_Definitions/SOL002_def.yaml#/definitions/KeyValuePairs'
VnfcConfigurationData:
description: >
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
required:
- vnfcInstanceId
......@@ -92,22 +104,19 @@ definitions:
vnfcInstanceId:
description: >
Identifier of a VNFC instance to which this set of configuration data applies.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnf'
extCpConfig:
description: >
Configuration parameters for the external CPs of the VNFC instance.
$ref: '#/definitions/CpConfiguration'
dhcpServer:
The identifier references the "id" attribute in a "VnfcInfo" structure.
$ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IdentifierInVnf'
intCpConfig:
description: >
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'
Configuration parameters for the internal CPs of the VNFC instance.
type: array
items:
$ref: '#/definitions/CpConfiguration'
vnfcSpecificData:
description: >
Additional configurable properties of the VNFC instance declared in the
VNFD as "VnfcConfigurableProperties".
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/KeyValuePairs'
VNFD as "VnfcConfigurableProperties". See note.
$ref: '../../General_Definitions/SOL002_def.yaml#/definitions/KeyValuePairs'
CpConfiguration:
description: >
......@@ -121,17 +130,17 @@ definitions:
cpId:
description: >
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:
description: >
Identifier of the CPD in the VNFD.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVnfd'
$ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IdentifierInVnfd'
addresses:
description: >
Network address and port assigned to the CP.
type: array
items:
$ref: '#/definitions/CpAddress'
$ref: '#/definitions/CpAddress'
CpAddress:
description: >
......@@ -139,6 +148,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: >
......@@ -148,11 +167,11 @@ definitions:
macAddress:
description: >
Mac address. See NOTE 2.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/MacAddress'
$ref: '../../General_Definitions/SOL002_def.yaml#/definitions/MacAddress'
ipAddress:
description: >
IP address. See NOTE 2.
$ref: '../../../definitions/SOL002SOL003_def.yaml#/definitions/IpAddress'
$ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IpAddress'
useDynamicAddress:
description: >
Set to true if an address shall be assigned dynamically. Otherwise set to false.
......@@ -161,8 +180,4 @@ definitions:
port:
description: >
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.