Commit c1d1ce0c authored by Gergely Csatari's avatar Gergely Csatari Committed by Michele Carignani
Browse files

VNF-Lifecycle-Management-interface

   Todo:
      - Finish review

Change-Id: Ic5eb4f3030f485f39947082c95ac1376d1e81b74
parent 18eb0cf2
......@@ -35,6 +35,17 @@ function validate_api () {
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 ##
......@@ -48,43 +59,19 @@ cd "$wd"
# (single results in OR)
fres=0
for d in */ ; do
if [ -z "$d" -o "$d" = "*/" ]; then
continue
fi
deliverable="${d::-1}"
echo "#### Checking directory $deliverable ($d)"
cd "$deliverable"
for dd in */ ; do
if [ -z "$dd" -o "$dd" = "*/" ]; then
continue
fi
api="${dd::-1}"
echo "########## Checking directory $api ($dd)"
cd "$dd"
for file in ./*; do
file_name="${file:2}"
#echo "-- $file"
#echo "-- Checking file $file_name"
if [ "$file_name" == "$api.yaml" ]; then
validate_api "$file_name" "$api" "$deliverable"
res=$?
fres=$(($fres||$res))
fi
done
echo
cd ..
done
cd ..
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
echo "-- Will validate: $f (api: $api) (deliverable:$deliverable)"
validate_api "$f" "$api" "$deliverable"
res=$?
fres=$(($fres||$res))
fi
done
# Exit code needed for jenkins to know the verdict of the build
echo "-- Final validator returns $fres."
exit $fres
......@@ -26,34 +26,6 @@ responses:
minimum: 0
schema:
$ref: "../definitions/VNFLifecycleManagement_def.yaml#/definitions/VnfInstance"
404-task-not-suported-VNF-LCM:
description: >
If the API producer did not find a current representation for the
resource addressed by the URI passed in the request, or is not
willing to disclose that one exists, it shall respond with this
response code.
Specifically in case of this task resource, the reason can also be that
the task is not supported for the VNF LCM operation occurrence
represented by the parent resource, and that the task resource
consequently does not exist.
The "ProblemDetails" structure may be provided, including in the "detail" attribute information about the sourceof the problem, e.g. a
wrong resource URI variable.
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"
409-another-lcm-operation-ongoing:
description: >
The operation cannot be executed currently, due to a conflict with the
......
......@@ -290,9 +290,9 @@ definitions:
linkPorts:
description: >
Link ports of this VL.
type: array
items:
$ref: "#/definitions/ExtLinkPort"
type: array
items:
$ref: "#/definitions/ExtLinkPort"
ExtVirtualLinkData:
#SOL003 location: 4.4.1.11
......
......@@ -193,6 +193,35 @@ responses:
minimum: 0
schema:
$ref: "/../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
404-task-not-suported-VNF-LCM:
description: >
If the API producer did not find a current representation for the
resource addressed by the URI passed in the request, or is not
willing to disclose that one exists, it shall respond with this
response code.
Specifically in case of this task resource, the reason can also be that
the task is not supported for the VNF LCM operation occurrence
represented by the parent resource, and that the task resource
consequently does not exist.
The "ProblemDetails" structure may be provided, including in the
"detail" attribute information about the sourceof the problem, e.g. a
wrong resource URI variable.
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"
405:
description: >
If a particular HTTP method is not supported for a particular
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment