Commits (25)
#!/bin/bash
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
cd "$(dirname "$0")"
run_dir="$(pwd)"
rm build/*-API.yaml
rm build/*-API.json
cd docker
./build-container.sh
./run-container.sh "${run_dir}"
OUTCOME=$?
exit $OUTCOME
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
FROM alpine:3.10.0
RUN env
RUN apk update
RUN apk add bash
RUN apk add nodejs
RUN apk add nodejs-npm
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 --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-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
ADD swg2mrkup /bin/swg2mrkup
RUN chmod +x /bin/swg2mrkup
ADD oas2pdf /bin/oas2pdf
RUN chmod +x /bin/oas2pdf
ENTRYPOINT ["/validate-in-docker.sh"]
#!/bin/bash
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
#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
#!/bin/bash
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
# Change this variable to true if you want
# to copy the created yaml files to a web served directory
#
#
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 "/work" "/storage" "$filter"
else
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 $@
#!/bin/bash
# Copyright ETSI 2017
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt
# Merges OpenAPIs interfaces in the working directory
# and validates them individually.
# Exit status is 0 if all validation passed, 1 otherwise
# Usage:
# $0 <working-directory> <storage-dir>
#set -x
function store_api () {
f="$1"
cp -v "$1" "${storage_dir}/"
}
function validate_api () {
file="$1"
api="$2"
deliverable="$3"
echo "--- Merging file."
merged_file="../build/${deliverable}-${api}-API.yaml"
json_file="../build/${deliverable}-${api}-API.json"
json-refs 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-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
}
# usage get_api_from_fn <file_name>
# e.g. get_api_from_fn /path/to/SOL003/Api1/Api1.yaml returns Api1
function get_api_from_fn () {
echo "$(basename $(dirname $1))"
}
# usage get_api_from_fn <file_name>
# e.g. get_api_from_fn /path/to/SOL003/Api1/Api1.yaml returns Api1
function get_deliverable_from_fn () {
echo "$(basename $(dirname $(dirname $1 )))"
}
## Main ##
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"
echo "Entering dir $wd/src"
cd "$wd/src"
# Stores the overall validation result
# (single results in OR)
fres=0
for f in $(find -name "*.yaml") ; do
# 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
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
chmod -R o+w "$wd/build"
# Exit code needed for jenkins to know the verdict of the build
echo "-- Final validator returns $fres."
exit $fres
openapi: 3.0.2
info:
version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
title: SOL011 - API version interface
description: >
SOL011 - 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
license:
name: ETSI Forge copyright notice
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: NFV-SOL WG
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
paths:
/nsd/api_versions:
$ref: '../endpoints/SOL011_endpoints.yaml#/endpoints/api_versions'
/nslcog/api_versions:
$ref: '../endpoints/SOL011_endpoints.yaml#/endpoints/api_versions'
/nslcm/api_versions:
$ref: '../endpoints/SOL011_endpoints.yaml#/endpoints/api_versions'
/nsiun/api_versions:
$ref: '../endpoints/SOL011_endpoints.yaml#/endpoints/api_versions'
/nspm/api_versions:
$ref: '../endpoints/SOL011_endpoints.yaml#/endpoints/api_versions'
/nsfm/api_versions:
$ref: '../endpoints/SOL011_endpoints.yaml#/endpoints/api_versions'
\ No newline at end of file
swagger: "2.0"
info:
version: "1.1.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: "SOL011 - NSD Management Interface"
description: >
SOL011 - NSD Management 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
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: "NFV-SOL WG"
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
basePath: /nsd/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
"/api_versions":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1api-versions'
"/ns_descriptors":
parameters:
- name: Authorization
description: >
The authorization token for the request.
Reference: IETF RFC 7235.
in: header
required: false
type: string
- name: Version
description: >
Version of the API requested to use when responding to this request.
in: header
required: true
type: string
get:
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSDManagement/NSDManagement.yaml#/paths/~1ns_descriptors/get'
'/ns_descriptors/{nsdInfoId}':
parameters:
- name: nsdInfoId
description: >
Identifier of the individual NS descriptor resource.
in: path
required: true
type: string
- name: Authorization
description: >
The authorization token for the request.
Reference: IETF RFC 7235.
in: header
required: false
type: string
- name: Version
description: >
Version of the API requested to use when responding to this request.
in: header
required: true
type: string
get:
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSDManagement/NSDManagement.yaml#/paths/~1ns_descriptors~1{nsdInfoId}/get'
swagger: "2.0"
info:
version: "1.1.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: "SOL011 - NS Fault Management Interface"
description: >
SOL011 - NS Fault Management 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
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: "NFV-SOL WG"
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
basePath: /nsfm/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
"/api_versions":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSFaultManagement/NSFaultManagement.yaml#/paths/~1api-versions'
"/alarms":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSFaultManagement/NSFaultManagement.yaml#/paths/~1alarms'
"/alarms/{alarmId}":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSFaultManagement/NSFaultManagement.yaml#/paths/~1alarms~1{alarmId}'
"/subscriptions":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSFaultManagement/NSFaultManagement.yaml#/paths/~1subscriptions'
"/subscriptions/{subscriptionId}":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSFaultManagement/NSFaultManagement.yaml#/paths/~1subscriptions~1{subscriptionId}'
swagger: "2.0"
info:
version: "1.1.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: "SOL011 - NS Fault Management Interface"
description: >
SOL011 - NS Fault Management 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
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: "NFV-SOL WG"
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
basePath: /callback/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
'/URI_is_provided_by_the_client_when_creating_the_subscription-AlarmNotification':
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSFaultManagementNotification/NSFaultManagementNotification.yaml#/paths/~1URI_is_provided_by_the_client_when_creating_the_subscription-AlarmNotification'
'/URI_is_provided_by_the_client_when_creating_the_subscription-AlarmClearedNotification':
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSFaultManagementNotification/NSFaultManagementNotification.yaml#/paths/~1URI_is_provided_by_the_client_when_creating_the_subscription-AlarmClearedNotification'
'/URI_is_provided_by_the_client_when_creating_the_subscription-AlarmListRebuiltNotification':
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSFaultManagementNotification/NSFaultManagementNotification.yaml#/paths/~1URI_is_provided_by_the_client_when_creating_the_subscription-AlarmListRebuiltNotification'
swagger: "2.0"
info:
version: "1.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: "SOL011 - NS Lifecycle Management Interface"
description: >
SOL011 - NS Lifecycle Management 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
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: "NFV-SOL WG"
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
basePath: /nslcm/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
"/api_versions":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1api-versions'
"/ns_instances":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1ns_instances'
"/ns_instances/{nsInstanceId}":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1ns_instances~1{nsInstanceId}'
"/ns_instances/{nsInstanceId}/instantiate":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1ns_instances~1{nsInstanceId}~1instantiate'
"/ns_instances/{nsInstanceId}/terminate":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1ns_instances~1{nsInstanceId}~1terminate'
"/ns_instances/{nsInstanceId}/scale":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1ns_instances~1{nsInstanceId}~1scale'
"/ns_instances/{nsInstanceId}/heal":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1ns_instances~1{nsInstanceId}~1heal'
"/ns_lcm_op_occs":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1ns_lcm_op_occs'
"/ns_lcm_op_occs/{nsLcmOpOccId}":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1ns_lcm_op_occs~1{nsLcmOpOccId}'
"/subscriptions":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1subscriptions'
"/subscriptions/{subscriptionId}":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagement/NSLifecycleManagement.yaml#/paths/~1subscriptions~1{subscriptionId}'
swagger: "2.0"
info:
version: "1.2.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: "SOL011 - NS Lifecycle Management Interface"
description: >
SOL011 - NS Lifecycle Management 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
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: "NFV-SOL WG"
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
basePath: /callback/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
'/URI_is_provided_by_the_client_when_creating_the_subscription-NsLcmOperationOccurrenceNotification':
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagementNotification/NSLifecycleManagementNotification.yaml#/paths/~1URI_is_provided_by_the_client_when_creating_the_subscription-NsLcmOperationOccurrenceNotification'
'/URI_is_provided_by_the_client_when_creating_the_subscription-NsIdentifierCreationNotification':
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagementNotification/NSLifecycleManagementNotification.yaml#/paths/~1URI_is_provided_by_the_client_when_creating_the_subscription-NsIdentifierCreationNotification'
'/URI_is_provided_by_the_client_when_creating_the_subscription-NsIdentifierDeletionNotification':
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSLifecycleManagementNotification/NSLifecycleManagementNotification.yaml#/paths/~1URI_is_provided_by_the_client_when_creating_the_subscription-NsIdentifierDeletionNotification'
\ No newline at end of file
openapi: 3.0.2
info:
version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
title: SOL011 - NS Lifecycle Operation Granting Interface
description: >
SOL011 - NS Lifecycle Operation Granting 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/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=
license:
name: ETSI Forge copyright notice
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
security:
- OauthSecurity:
- all
servers:
- url: http://127.0.0.1/nslcog/v1
- url: https://127.0.0.1/nslcog/v1
paths:
"/api_versions":
$ref: '../endpoints/SOL011_endpoints.yaml#/endpoints/api_versions'
"/grants":
description: >-
This resource represents grant. The NFVO-N can use this resource to request a grant.
post:
description: >-
The POST method requests a grant for a particular NS lifecycle operation.
This method shall follow the provisions specified in the tables 7.5.3.3.1-1 and 7.5.3.3.1-2
for URI query parameters, request and response data structures, and response codes.
parameters:
- $ref: "../components/SOL011_params.yaml#/components/parameters/Version"
- $ref: "../components/SOL011_params.yaml#/components/parameters/Accept"
- $ref: "../components/SOL011_params.yaml#/components/parameters/ContentType"
- $ref: "../components/SOL011_params.yaml#/components/parameters/Authorization"
requestBody:
$ref: "#/components/requestBodies/GrantNsLifecycleOperationRequest"
responses:
"201":
$ref: '#/components/responses/Grants.Post.201'
"400":
$ref: ../components/SOL011_resp.yaml#/components/responses/400
"401":
$ref: ../components/SOL011_resp.yaml#/components/responses/401
"403":
$ref: '#/components/responses/Grants.Post.403'
"404":
$ref: ../components/SOL011_resp.yaml#/components/responses/404
"405":
$ref: ../components/SOL011_resp.yaml#/components/responses/405
"406":
$ref: ../components/SOL011_resp.yaml#/components/responses/406
"422":
$ref: ../components/SOL011_resp.yaml#/components/responses/422
"500":
$ref: ../components/SOL011_resp.yaml#/components/responses/500
"503":
$ref: ../components/SOL011_resp.yaml#/components/responses/503
"504":
$ref: ../components/SOL011_resp.yaml#/components/responses/504
"/grants/{grantId}":
description: >-
This resource represents an individual grant..
get:
description: >-
The GET method reads a grant.
This method shall follow the provisions specified in the tables 7.5.4.3.2-1 and 7.5.4.3.2-2
for URI query parameters, request and response data structures, and response codes.
parameters:
- $ref: "#/components/parameters/grantId"
- $ref: "../components/SOL011_params.yaml#/components/parameters/Version"
- $ref: "../components/SOL011_params.yaml#/components/parameters/Accept"
- $ref: "../components/SOL011_params.yaml#/components/parameters/Authorization"
responses:
"200":
$ref: '#/components/responses/Grant.Get.200'
"400":
$ref: ../components/SOL011_resp.yaml#/components/responses/400
"401":
$ref: ../components/SOL011_resp.yaml#/components/responses/401
"403":
$ref: ../components/SOL011_resp.yaml#/components/responses/403
"404":
$ref: ../components/SOL011_resp.yaml#/components/responses/404
"405":
$ref: ../components/SOL011_resp.yaml#/components/responses/405
"406":
$ref: ../components/SOL011_resp.yaml#/components/responses/406
"422":
$ref: ../components/SOL011_resp.yaml#/components/responses/422
"500":
$ref: ../components/SOL011_resp.yaml#/components/responses/500
"503":
$ref: ../components/SOL011_resp.yaml#/components/responses/503
"504":
$ref: ../components/SOL011_resp.yaml#/components/responses/504
components:
parameters:
grantId:
name: grantId
in: path
description: >-
Identifier of the grant
required: true
schema:
$ref: '../components/SOL011_schemas.yaml#/components/schemas/Identifier'
requestBodies:
GrantNsLifecycleOperationRequest:
description: >-
The NS lifecycle operation grant request parameters, as defined in clause 7.6.2.2.
content:
application/json:
schema:
$ref: "#/components/schemas/GrantNsLifecycleOperationRequest"
responses:
Grants.Post.201:
description: >-
Shall be returned when the grant has been created successfully.
A representation of the created "Individual grant" resource shall be returned in the response body.
The HTTP response shall include a "Location" HTTP header that indicates the URI of the
"Individual grant" resource just created.
headers:
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.
schema:
type: string
Version:
description: >
Version of the API used in the response.
schema:
type: string
Location:
description: >
URI of the "Individual grant" resource just created
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Grant'
Grants.Post.403:
description: >-
Shall be returned upon the following error: the grant request was rejected.
A ProblemDetails structure shall be included in the response to provide more
details about the rejection in the "details" attribute.
headers:
Content-Type:
description: The MIME type of the body of the response.
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.
schema:
type: string
Version:
description: >
Version of the API used in the response.
schema:
type: string
content:
application/json:
schema:
$ref: '../components/SOL011_schemas.yaml#/components/schemas/ProblemDetails'
Grant.Get.200:
description: >-
Shall be returned when the grant has been read successfully.
A representation of the "Individual grant" resource shall be returned in the response body.
headers:
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.
schema:
type: string
Version:
description: >
Version of the API used in the response.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Grant'
schemas:
GrantNsLifecycleOperationRequest:
description: >-
This type represents request parameters for the "grant NS lifecycle" operation.
It shall comply with the provisions defined in table 7.6.2.2-1.
type: object
required:
- nsInstanceId
- nsdId
- nsLcmOpOccId
- lifecycleOperation
properties:
nsInstanceId:
description: >-
Identifier of the NS instance which this grant request relates to.
Each NFVO-N instance manages its own namespace for NS instance identifiers.
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Identifier"
nsdId:
description: >-
Identifier of the NSD that defines the NS for which the lifecycle management operation is to be granted.
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Identifier"
nsLcmOpOccId:
description: >-
The identifier of the NS lifecycle management operation occurrence associated to the GrantRequest..
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Identifier"
lifecycleOperation:
description: >-
Type of the lifecycle management operation for which the granting is requested.
The NS LCM operations InstantiateNS, CreateNsIdentifier, DeleteNsIdentifier and
QueryNs can be executed by NFVO-N without requesting granting.
$ref: "#/components/schemas/NsLcmOperation"
additionalParams:
description: >-
Additional parameters passed by NFVO-N, specific to the NS and the lifecycle management operation.
$ref: "../components/SOL011_schemas.yaml#/components/schemas/KeyValuePairs"
NsLcmOperation:
description: >-
The enumeration NsLcmOperation shall comply with the provisions defined in table 7.6.4.3-1.
It indicates the type of the NS lifecycle management operation for which the granting is requested.
type: string
enum:
- SCALE
- TERMINATE
- HEAL
Grant:
description: >-
This type represents a grant. It shall comply with the provisions defined in table 7.6.2.3-1.
type: object
required:
- id
- nsInstanceId
- nsLcmOpOccId
- _links
properties:
id:
description: >-
Identifier of the grant.
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Identifier"
nsInstanceId:
description: >-
Identifier of the NS instance which this grant request relates to.
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Identifier"
nsLcmOpOccId:
description: >-
Identifier of the NS lifecycle management operation occurrence associated to the GrantRequest.
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Identifier"
additionalParams:
description: >-
Additional parameters passed by NFVO-N, specific to the NS and the lifecycle management operation.
$ref: "../components/SOL011_schemas.yaml#/components/schemas/KeyValuePairs"
_links:
description: >-
Links to resources related to this resource.
type: object
required:
- self
- nsLcmOpOcc
- nsInstance
properties:
self:
description: >-
URI of this resource
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Link"
nsLcmOpOcc:
description: >-
Related NS lifecycle management operation occurrence
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Link"
nsInstance:
description: >-
Related NS instance.
$ref: "../components/SOL011_schemas.yaml#/components/schemas/Link"
swagger: "2.0"
info:
version: "1.1.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: "SOL011 - NS Performance Management Interface"
description: >
SOL011 - NS Performance Management 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
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: "NFV-SOL WG"
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
basePath: /nspm/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
"/api_versions":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSPerformanceManagement/NSPerformanceManagement.yaml#/paths/~1api-versions'
"/pm_jobs":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSPerformanceManagement/NSPerformanceManagement.yaml#/paths/~1pm_jobs'
"/pm_jobs/{pmJobId}":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSPerformanceManagement/NSPerformanceManagement.yaml#/paths/~1pm_jobs~1{pmJobId}'
"/thresholds":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSPerformanceManagement/NSPerformanceManagement.yaml#/paths/~1thresholds'
"/thresholds/{thresholdId}":
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSPerformanceManagement/NSPerformanceManagement.yaml#/paths/~1thresholds~1{thresholdId}'
\ No newline at end of file
swagger: "2.0"
info:
version: "1.1.0-impl:etsi.org:ETSI_NFV_OpenAPI:1"
title: "SOL011 - NS Performance Management Interface"
description: >
SOL011 - NS Performance Management 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
license:
name: "ETSI Forge copyright notice"
url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
contact:
name: "NFV-SOL WG"
externalDocs:
description: ETSI GS NFV-SOL 011 V3.3.1
url: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/011/03.03.01_60/gs_NFV-SOL011v030301p.pdf
basePath: /callback/v1
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
'/URI_is_provided_by_the_client_when_creating_the_subscription_PerformanceInformationAvailableNotification':
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSPerformanceManagementNotification/NSPerformanceManagementNotification.yaml#/paths/~1URI_is_provided_by_the_client_when_creating_the_subscription_PerformanceInformationAvailableNotificatio'
'/URI_is_provided_by_the_client_when_creating_the_subscription_ThresholdCrossedNotification':
$ref: 'https://forge.etsi.org/rep/nfv/SOL005/raw/v2.6.1/src/SOL005/NSPerformanceManagementNotification/NSPerformanceManagementNotification.yaml#/paths/~1URI_is_provided_by_the_client_when_creating_the_subscription_ThresholdCrossedNotification'
\ No newline at end of file
components:
parameters:
Version:
name: Version
description: >
Version of the API requested to use when responding to this request.
in: header
required: true
schema:
type: string
Accept:
name: Accept
description: >
Content-Types that are acceptable for the response. Reference: IETF RFC 7231.
in: header
required: true
schema:
type: string
Authorization:
name: Authorization
description: >
The authorization token for the request. Reference: IETF RFC 7235.
in: header
required: false
schema:
type: string
ContentType:
name: Content-Type
description: |
The MIME type of the body of the request. Reference: IETF RFC 7231
in: header
required: true
schema:
type: string
filter:
name: filter
description: >
Attribute-based filtering expression according to clause 5.2 of ETSI
GS NFV-SOL 013. The NFV-MANO functional entity shall support
receiving this parameter as part of the URI query string. The API
consumer may supply this parameter. All attribute names that appear
in the FmSubscription and in data types referenced from it shall be
supported by the NFV-MANO functional entity in the filter
expression.
in: query
required: false
schema:
type: string
all_fields:
name: all_fields
description: >
Include all complex attributes in the response. See clause
5.3 of ETSI GS NFV-SOL 013. The NFV-MANO functional entity
shall support this parameter.
in: query
required: false
schema:
type: string
fields:
name: fields
description: >
Complex attributes to be included into the response. See clause
5.3 of ETSI GS NFV-SOL 013 for details. The NFV-MANO functional
entity should support this parameter.
in: query
required: false
schema:
type: string
exclude_fields:
name: exclude_fields
description: >
Complex attributes to be excluded from the response. See clause
5.3 of ETSI GS NFV-SOL 013 for details. The NFV-MANO functional
entity should support this parameter.
in: query
required: false
schema:
type: string
exclude_default:
name: exclude_default
in: query
description: >-
Indicates to exclude the following complex attributes from the response. See clause 5.3 of ETSI GS NFV-SOL 013
for details. The NFV-MANO functional entity shall support this parameter.
required: false
schema:
type: string
nextpage_opaque_marker:
name: nextpage_opaque_marker
description: >
Marker to obtain the next page of a paged response. Shall be supported by
the NFV-MANO functional entity if the entity supports alternative 2 (paging)
according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 for this resource.
in: query
required: false
schema:
type: string
This diff is collapsed.
components:
schemas:
Link:
description: >
This type represents a link to a resource using an absolute URI.
type: object
required:
- href
properties:
href:
description: >
URI of another resource referenced from a resource.
Shall be an absolute URI (i.e. a UTI that contains {apiRoot}).
$ref: "#/components/schemas/Uri"
NotificationLink:
description: >
This type represents a link to a resource in a notification, using an absolute or relative URI.
type: object
required:
- href
properties:
href:
description: >
URI of a resource referenced from a notification.
Should be an absolute URI (i.e. a URI that contains
{apiRoot}), however, may be a relative URI (i.e. a URI
where the {apiRoot} part is omitted) if the {apiRoot}
information is not available.
$ref: "#/components/schemas/Uri"
IpAddress:
description: >
An IPV4 or IPV6 address. Representation: In case of an IPV4 address, string that consists of four decimal
integers separated by dots, each integer ranging from 0 to 255. In case of an IPV6 address, string that
consists of groups of zero to four hexadecimal digits, separated by colons.
type: string
format: IP
KeyValuePairs:
description: >
This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON,
a set of keyvalue pairs is represented as an object. It shall comply with the provisions defined in clause 4
of IETF RFC 8259. In the following example, a list of key-value pairs with four keys ("aString", "aNumber",
"anArray" and "anObject") is provided to illustrate that the values associated with different keys can be of
different type.
type: object
ApiVersionInformation:
description: >
This type represents API version information.
type: object
required:
- uriPrefix
- apiVersions
properties:
uriPrefix:
description: >
Specifies the URI prefix for the API, in the following
form {apiRoot}/{apiName}/{apiMajorVersion}/.
type: string
apiVersions:
description: >
Version(s) supported for the API signaled by the
uriPrefix attribute.
type: array
items:
type: object
required:
- version
properties:
version:
description: >
Identifies a supported version. The value of the
version attribute shall be a version identifier as
specified in clause 9.1 (SOL013).
type: string
isDeprecated:
description: >
If such information is available, this attribute indicates
whether use of the version signaled by the version
attribute is deprecated (true) or not (false).
A deprecated version is still supported by the API producer but is recommended
not to be used any longer.
When a version is no longer supported, it does not appear in the response body.
type: boolean
retirementDate:
description: >
The date and time after which the API version will no
longer be supported.
This attribute may be included if the value of the
isDeprecated attribute is set to true and shall be
absent otherwise.
$ref: "#/components/schemas/DateTime"
Identifier:
description: >
An identifier with the intention of being globally unique.
type: string
IdentifierInManoEntity:
description: >
An identifier that is unique for the respective type within a NFV-MANO functional entity,
but that need not be globally unique. Representation: string of variable length..
type: string
IdentifierLocal:
description: >
An identifier that is unique within a limited local scope other than above listed identifiers,
such as within a complex data structure or within a request-response pair.
Representation: string of variable length.
type: string
DateTime:
description: >
Date-time stamp.
Representation: String formatted according to IETF RFC 3339.
type: string
format: date-time
Uri:
description: >
String formatted according to IETF RFC 3986.
type: string
Boolean:
description: >
The Boolean is a data type having two values (true and false).
type: boolean
Version:
description: >
A version.
type: string
String:
description: >
A string defined in IETF RFC 8259.
type: string
Number:
description: >
A number defined in IETF RFC 8259.
type: number
UnsignedInt:
description: >
Unsigned integer
type: number
SubscriptionAuthentication:
type: object
required:
- authType
properties:
authType:
description: >
Defines the types of Authentication / Authorization which the API
consumer is willing to accept when receiving a notification.
Permitted values:
* BASIC: In every HTTP request to the notification endpoint, use
HTTP Basic authentication with the client credentials.
* OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the
notification endpoint, use an OAuth 2.0 Bearer token, obtained
using the client credentials grant type.
* TLS_CERT: Every HTTP request to the notification endpoint is sent
over a mutually authenticated TLS session, i.e. not only the
server is authenticated, but also the client is authenticated
during the TLS tunnel setup.
type: array
items:
type: string
enum:
- BASIC
- OAUTH2_CLIENT_CREDENTIALS
- TLS_CERT
paramsBasic:
description: >
Parameters for authentication/authorization using BASIC.
Shall be present if authType is "BASIC" and the contained
information has not been provisioned out of band.
Shall be absent otherwise.
type: object
properties:
userName:
description: >
Username to be used in HTTP Basic authentication. Shall be
present if it has not been provisioned out of band.
type: string
password:
description: >
Password to be used in HTTP Basic authentication. Shall be
present if it has not been provisioned out of band.
type: string
paramsOauth2ClientCredentials:
description: >
Parameters for authentication/authorization using
OAUTH2_CLIENT_CREDENTIALS.
Shall be present if authType is "OAUTH2_CLIENT_CREDENTIALS" and the
contained information has not been provisioned out of band.
Shall be absent otherwise.
type: object
properties:
clientId:
description: >
Client identifier to be used in the access token request of the
OAuth 2.0 client credentials grant type.
Shall be present if it has not been provisioned out of band.
The clientId and clientPassword passed in a subscription shall
not be the same as the clientId and clientPassword that are used
to obtain authorization for API requests. Client credentials may
differ between subscriptions. The value of clientPassword should
be generated by a random process.
type: string
clientPassword:
description: >
Client password to be used in the access token request of the
OAuth 2.0 client credentials grant type.
Shall be present if it has not been provisioned out of band.
The clientId and clientPassword passed in a subscription shall
not be the same as the clientId and clientPassword that are used
to obtain authorization for API requests. Client credentials may
differ between subscriptions. The value of clientPassword should
be generated by a random process.
type: string
tokenEndpoint:
description: >
The token endpoint from which the access token can be obtained.
Shall be present if it has not been provisioned out of band.
$ref: "#/components/schemas/Uri"
ProblemDetails:
description: >
The definition of the general "ProblemDetails" data structure from
IETF RFC 7807 [19] is reproduced inthis structure. Compared to the
general framework defined in IETF RFC 7807 [19], the "status" and
"detail" attributes are mandated to be included by the present document,
to ensure that the response contains additional textual information about
an error. IETF RFC 7807 [19] foresees extensibility of the
"ProblemDetails" type. It is possible that particular APIs in the present
document, or particular implementations, define extensions to define
additional attributes that provide more information about the error.
The description column only provides some explanation of the meaning to
Facilitate understanding of the design. For a full description, see
IETF RFC 7807 [19].
type: object
required:
- status
- detail
properties:
type:
description: >
A URI reference according to IETF RFC 3986 [5] that identifies the
problem type. It is encouraged that the URI provides human-readable
documentation for the problem (e.g. using HTML) when dereferenced.
When this member is not present, its value is assumed to be
"about:blank".
type: string
format: URI
title:
description: >
A short, human-readable summary of the problem type. It should not
change from occurrence to occurrence of the problem, except for
purposes of localization. If type is given and other than
"about:blank", this attribute shall also be provided.
A short, human-readable summary of the problem
type. It SHOULD NOT change from occurrence to occurrence of the
problem, except for purposes of localization (e.g., using
proactive content negotiation; see [RFC7231], Section 3.4).
type: string
status:
description: >
The HTTP status code for this occurrence of the problem.
The HTTP status code ([RFC7231], Section 6) generated by the origin
server for this occurrence of the problem.
type: integer
detail:
description: >
A human-readable explanation specific to this occurrence of the
problem.
type: string
instance:
description: >
A URI reference that identifies the specific occurrence of the
problem. It may yield further information if dereferenced.
type: string
format: URI
#TODO: How to express "any additional attributes"?