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
Loading
Loading
Loading
Loading
+19 −32
Changes for docker/validate-in-docker.sh: 19 added lines, 32 removed lines.
Original line number Diff line number Diff line
@@ -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"
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
        echo 
        cd ..
     done
     cd ..
done

# Exit code needed for jenkins to know the verdict of the build
echo "-- Final validator returns $fres."
exit $fres
+11 −368

File changed.

Preview size limit exceeded, changes collapsed.

+0 −28
Changes for src/SOL003/VNFLifecycleManagement/responses/VNFLifecycleManagement_resp.yaml: 0 added lines, 28 removed lines.
Original line number Diff line number Diff line
@@ -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
+29 −0

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3

File changed.

Contains only whitespace changes.